Version Description
Release Date 15.01.2019
-
Added
- Animations
- Gutenberg blocks "Fruitful Blocks"
- Shortcode Button : added button background color and button border color options
- New position for button "Fruitful shortcodes"
- "Custom shortcode" proposal button
-
Tested
- To WordPress 5.0.3
-
Fixed
- Plugin css styles
Download this release
Release Info
Developer | fruitfulcode |
Plugin | Fruitful Shortcodes |
Version | 2.1 |
Comparing to | |
See all releases |
Code changes from version 2.0 to 2.1
- ff-shortcodes.php +1 -1
- fruitful-shortcodes-2.0.0/assets/css/admin.css +1 -1
- fruitful-shortcodes-2.0.0/assets/css/admin.less +18 -15
- fruitful-shortcodes-2.0.0/assets/css/blocks_editor.css +1 -0
- fruitful-shortcodes-2.0.0/assets/css/blocks_editor.less +18 -0
- fruitful-shortcodes-2.0.0/assets/css/front.css +1 -1
- fruitful-shortcodes-2.0.0/assets/img/pro/fruitful_glitch.svg +14 -0
- fruitful-shortcodes-2.0.0/assets/img/suggest_your_shortcode/admin-icon.svg +13 -0
- fruitful-shortcodes-2.0.0/assets/js/admin.js +1 -1
- fruitful-shortcodes-2.0.0/assets/js/animation.js +8 -0
- fruitful-shortcodes-2.0.0/assets/js/mce_button.js +18 -0
- fruitful-shortcodes-2.0.0/assets/js/modal.js +1 -1
- fruitful-shortcodes-2.0.0/assets/js/modal_ui.js +10 -5
- fruitful-shortcodes-2.0.0/assets/libs/aos/aos.min.css +2 -0
- fruitful-shortcodes-2.0.0/assets/libs/aos/aos.min.js +2 -0
- fruitful-shortcodes-2.0.0/assets/libs/bootstrap/bootstrap-grid.css +4 -4
- fruitful-shortcodes-2.0.0/assets/libs/bootstrap/bootstrap-grid.min.css +6 -1
- fruitful-shortcodes-2.0.0/assets/shared/fruitful_recent_posts/css/styles.css +1 -1
- fruitful-shortcodes-2.0.0/assets/shared/fruitful_recent_posts/css/styles.less +2 -1
- fruitful-shortcodes-2.0.0/assets/shared/fruitful_recent_posts_slider/css/styles.css +1 -1
- fruitful-shortcodes-2.0.0/assets/shared/fruitful_recent_posts_slider/css/styles.less +1 -1
- fruitful-shortcodes-2.0.0/assets/shared/fruitful_recent_posts_slider/js/scripts.js +9 -4
- fruitful-shortcodes-2.0.0/assets/shared/fruitful_recent_posts_slider/js/scripts.min.js +1 -1
- fruitful-shortcodes-2.0.0/core/config/animation.php +115 -0
- fruitful-shortcodes-2.0.0/core/config/config.php +5 -0
- fruitful-shortcodes-2.0.0/core/config/pro_shortcodes.php +76 -0
- fruitful-shortcodes-2.0.0/core/controller/backend.php +303 -143
- fruitful-shortcodes-2.0.0/core/controller/front.php +106 -4
- fruitful-shortcodes-2.0.0/core/core.php +47 -89
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_alert/block/block.build.js +291 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_alert/block/block.build.js.map +1 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_alert/block/block.js +173 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_alert/init.php +63 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_btn/block/block.build.js +588 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_btn/block/block.build.js.map +1 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_btn/block/block.js +472 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_btn/init.php +65 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_dbox/block/block.build.js +370 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_dbox/block/block.build.js.map +1 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_dbox/block/block.js +250 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_dbox/init.php +62 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_pbar/block/block.build.js +419 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_pbar/block/block.build.js.map +1 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_pbar/block/block.js +271 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_pbar/init.php +66 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts/block/block.build.js +499 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts/block/block.build.js.map +1 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts/block/block.js +340 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts/init.php +170 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts_slider/block/block.build.js +567 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts_slider/block/block.build.js.map +1 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts_slider/block/block.js +400 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts_slider/init.php +201 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_sep/block/block.build.js +273 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_sep/block/block.build.js.map +1 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_sep/block/block.js +153 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_sep/init.php +46 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_tabs/block/block.build.js +505 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_tabs/block/block.build.js.map +1 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_tabs/block/block.js +310 -0
- fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_tabs/init.php +63 -0
- fruitful-shortcodes-2.0.0/core/helper/admin_options.php +35 -13
- fruitful-shortcodes-2.0.0/core/helper/utils.php +30 -8
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_alert/config.php +30 -26
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_alert/init.php +31 -25
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_alert/modal.php +5 -5
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_alert/view.php +14 -11
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_bar/view.php +1 -0
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_btn/config.php +137 -126
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_btn/init.php +51 -44
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_btn/modal.php +5 -5
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_btn/view.php +18 -2
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_dbox/config.php +39 -34
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_dbox/init.php +33 -27
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_dbox/modal.php +5 -5
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_dbox/view.php +17 -14
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_ibox/view.php +1 -2
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_ibox_row/config.php +83 -78
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_ibox_row/init.php +21 -15
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_ibox_row/modal.php +5 -5
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_ibox_row/view.php +13 -2
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_pbar/config.php +44 -38
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_pbar/init.php +23 -13
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_pbar/modal.php +5 -5
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_pbar/view.php +17 -2
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_recent_posts/config.php +114 -113
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_recent_posts/init.php +55 -50
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_recent_posts/modal.php +5 -5
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_recent_posts/view.php +9 -6
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_recent_posts_slider/config.php +152 -152
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_recent_posts_slider/init.php +63 -58
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_recent_posts_slider/modal.php +5 -5
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_recent_posts_slider/view.php +71 -67
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_sep/config.php +29 -24
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_sep/init.php +24 -18
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_sep/modal.php +5 -5
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_sep/view.php +21 -17
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_tabs/config.php +59 -58
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_tabs/init.php +26 -21
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_tabs/modal.php +5 -5
- fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_tabs/view.php +6 -3
- fruitful-shortcodes-2.0.0/core/view/backend/button.php +0 -3
- fruitful-shortcodes-2.0.0/core/view/backend/modal/window.php +6 -2
- fruitful-shortcodes-2.0.0/core/view/view.php +1 -1
- package-lock.json +12 -31
- package.json +1 -1
- readme.txt +19 -3
- webpack.config.js +5 -5
ff-shortcodes.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Fruitful Shortcodes
|
4 |
Plugin URI: https://wordpress.org/plugins/fruitful-shortcodes
|
5 |
Description: Add additional content shortcodes: Alert, Button, Promo-text, Columns, Progress-bar, Recent-posts, Posts-slider, Separator, Tabs
|
6 |
-
Version: 2.
|
7 |
Author: fruitfulcode
|
8 |
Author URI: https://fruitfulcode.com
|
9 |
License: GPL2
|
3 |
Plugin Name: Fruitful Shortcodes
|
4 |
Plugin URI: https://wordpress.org/plugins/fruitful-shortcodes
|
5 |
Description: Add additional content shortcodes: Alert, Button, Promo-text, Columns, Progress-bar, Recent-posts, Posts-slider, Separator, Tabs
|
6 |
+
Version: 2.1
|
7 |
Author: fruitfulcode
|
8 |
Author URI: https://fruitfulcode.com
|
9 |
License: GPL2
|
fruitful-shortcodes-2.0.0/assets/css/admin.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#ff-shortcodes-button .ff-shortcodes-icon{display:inline-block;width:18px;height:18px;vertical-align:text-top;margin:0 2px}#ff-shortcodes-button .ff-shortcodes-icon:before{font:400 18px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f116"}.ff-shortcodes-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9990;transition:all .3s;background:transparent}.loaded>.ff-shortcodes-overlay{background-color:rgba(0,0,0,0.65)}.ff-shortcodes-overlay.invisible{visibility:hidden}#ff-shortcodes-modal-window{position:fixed;z-index:9995;background-color:#fff;border-radius:4px;box-shadow:0 8px 40px 0 rgba(0,0,0,0.5);width:670px;top:50%;left:50%;transition:opacity .5s;transform:translateX(-50%);opacity:0}#ff-shortcodes-modal-window *{outline:none}#ff-shortcodes-modal-window a:focus{box-shadow:none}#ff-shortcodes-modal-window a{text-decoration:none}#ff-shortcodes-modal-window h1,#ff-shortcodes-modal-window h2,#ff-shortcodes-modal-window h3,#ff-shortcodes-modal-window h4,#ff-shortcodes-modal-window h5,#ff-shortcodes-modal-window h6{font-family:Raleway}#ff-shortcodes-modal-window h4.pro-only{padding-left:20px;padding-right:20px;text-align:center}#ff-shortcodes-modal-window h4.pro-only a{margin-top:15px;display:inline-block;padding:10px 20px;border-radius:4px;box-shadow:inset 0 2px 0 0 #f5f5f5;background-color:#fafafa;border:solid 1px #e0e0e0}#ff-shortcodes-modal-window header{position:relative;background-color:#333;line-height:48px;border-top-left-radius:4px;border-top-right-radius:4px}#ff-shortcodes-modal-window header a{width:20px;height:20px;position:absolute;top:50%;transform:translateY(-50%)}#ff-shortcodes-modal-window header .ff-shortcodes-back{left:15px;height:20px;background:url(../img/return.svg) center center no-repeat;display:none}#ff-shortcodes-modal-window header .ff-shortcodes-rollup{right:45px;height:12px;background:url(../img/minimize-a-window.svg) center bottom no-repeat}#ff-shortcodes-modal-window header .ff-shortcodes-close{right:17px;background:url(../img/close-a-window.svg) center center no-repeat}#ff-shortcodes-modal-window header h4{color:#fff;margin:0;padding:0;display:block;text-align:center;font-size:16px;font-weight:600;line-height:48px}#ff-shortcodes-modal-window footer{background-color:#fbfbfb;padding:15px;border-top:1px solid #e0e0e0;border-bottom:1px solid #e0e0e0;text-align:right}#ff-shortcodes-modal-window footer .ff-button{display:inline-block;border-radius:4px;border:1px solid #e0e0e0;background:#fff;line-height:40px;font-size:14px;padding:0 20px;color:#333;transition:all .2s;margin-left:8px;min-width:50px;text-align:center}#ff-shortcodes-modal-window footer .ff-button:hover{border-color:#19bc9c;background-color:#f3fbfa}#ff-shortcodes-modal-window footer .add-shortcode,#ff-shortcodes-modal-window footer .add-shortcode:hover{border-color:#00ad8a;background-color:#19bc9c;color:#fff}#ff-shortcodes-modal-window.rolled-up{top:auto;bottom:0;right:0;left:auto;width:280px;transform:translateX(0) !important}#ff-shortcodes-modal-window.rolled-up header{cursor:pointer}#ff-shortcodes-modal-window.rolled-up header h4{text-align:left;padding-left:20px}#ff-shortcodes-modal-window.rolled-up header .ff-shortcodes-rollup,#ff-shortcodes-modal-window.rolled-up header .ff-shortcodes-back{display:none !important}#ff-shortcodes-modal-window.rolled-up #ff-shortcodes-modal-content{display:none}@media screen and (max-width:995px){#ff-shortcodes-modal-window{width:90%;height:70%;overflow-x:hidden;overflow-y:auto}}.loaded>#ff-shortcodes-modal-window{opacity:1;transform:translate(-50%, -50%)}#ff-shortcodes-modal-content{position:relative;max-height:550px}#ff-shortcodes-modal-window form.ff-shortcode-params{margin:0;padding:0 0 80px 0;min-height:calc( 100% - 80px );position:relative}#ff-shortcodes-modal-window form.ff-shortcode-params footer{position:absolute;left:0;right:0;bottom:0}#ff-shortcodes-modal-window .shortcodes-list .search-shortcodes{padding:16px 15px 0 15px;position:relative}#ff-shortcodes-modal-window .shortcodes-list .search-shortcodes input[type=text]{display:block;border-radius:4px;box-shadow:inset 0 2px 0 0 #f5f5f5;background-color:#fff;border:solid 1px #e0e0e0;margin:0;padding:9px 15px;font-family:Raleway;font-size:14px;font-weight:500;color:#4a4a4a;width:100%;box-sizing:border-box;padding-left:40px;background-image:url(../img/search.svg);background-repeat:no-repeat;background-position:15px center}#ff-shortcodes-modal-window .shortcodes-list .search-shortcodes .clear-search{display:none}#ff-shortcodes-modal-window .shortcodes-list .search-shortcodes.active .clear-search{display:block;position:absolute;right:25px;top:28px;width:16px;height:16px;background:url(../img/clear-normal.svg) center center no-repeat}#ff-shortcodes-modal-window .shortcodes-list .search-shortcodes.active .clear-search:hover{background-image:url(../img/clear-hover.svg)}#ff-shortcodes-modal-window .shortcodes-list .list{width:100%;padding:15px 13px 13px 13px;box-sizing:border-box;display:flex;flex-wrap:wrap}#ff-shortcodes-modal-window .shortcodes-list .list .elem{flex-basis:33.333%;position:relative}#ff-shortcodes-modal-window .shortcodes-list .list .elem a{border:solid 1px #efefef;border-radius:4px;background-color:#f5f5f5;display:block;position:relative;margin:1px;padding:14px;transition:background-color .1s}#ff-shortcodes-modal-window .shortcodes-list .list .elem .desc{padding-left:45px}#ff-shortcodes-modal-window .shortcodes-list .list .elem .desc h4{font-family:Raleway;font-size:14px;font-weight:500;font-style:normal;line-height:16px;letter-spacing:normal;text-align:left;color:#4a4a4a;margin:0}#ff-shortcodes-modal-window .shortcodes-list .list .elem .desc span{display:block;font-family:Raleway;font-size:10px;font-weight:500;font-style:normal;letter-spacing:normal;text-align:left;color:#9b9b9b}#ff-shortcodes-modal-window .shortcodes-list .list .elem img{width:32px;height:auto;position:absolute;top:50%;transform:translateY(-50%);left:15px}#ff-shortcodes-modal-window .shortcodes-list .list .elem.filtered{flex-basis:100%;opacity:1 !important}#ff-shortcodes-modal-window .shortcodes-list .list .elem:hover a{border:1px dashed #19bc9c;background-color:#fff}#ff-shortcodes-modal-window .shortcodes-list .list .elem:hover .desc h4{color:#00bb9e}#ff-shortcodes-modal-window .shortcodes-list .list .elem.pro{opacity:.5}#ff-shortcodes-modal-window .shortcodes-list .list .elem.pro:after{content:'PRO';background:#e8e8e8 url(../img/window/crown.svg) 9px 4px no-repeat;color:#4a4a4a;text-transform:uppercase;font-size:8px;line-height:23px;padding:0 8px 0 25px;border-top-right-radius:4px;border-bottom-left-radius:6px;position:absolute;right:2px;top:2px}#ff-shortcodes-modal-window .shortcodes-list .list .elem.pro:hover{opacity:1}#ff-shortcodes-modal-window .shortcodes-list .list .elem.pro:hover a{border:1px solid #9b9b9b;background-color:#f5f5f5}#ff-shortcodes-modal-window .shortcodes-list .list .elem.pro:hover .desc h4{color:#4a4a4a}#ff-shortcodes-modal-window.ff-pro-active .shortcodes-list .list .elem.pro{opacity:1}#ff-shortcodes-modal-window.ff-pro-active .shortcodes-list .list .elem:hover a{border:1px dashed #19bc9c;background-color:#fff}#ff-shortcodes-modal-window.ff-pro-active .shortcodes-list .list .elem:hover .desc h4{color:#00bb9e}@media screen and (max-width:995px){#ff-shortcodes-modal-window .shortcodes-list .list .elem{flex-basis:100%}}#ff-shortcodes-modal-window .ff-controls{padding:25px 25px 0 25px}#ff-shortcodes-modal-window .ff-tabs{background:#fbfbfb;display:flex;padding:16px 25px 0 25px;border-bottom:1px solid #e0e0e0;margin-bottom:30px}#ff-shortcodes-modal-window .ff-tabs a{display:block;padding:0 20px;background:#fbfbfb;border-top:1px solid #e0e0e0;border-left:1px solid #e0e0e0;border-top-right-radius:4px;border-top-left-radius:4px;line-height:40px;font-size:14px;font-weight:500;text-align:center;color:#4a4a4a;transition:all .3s;font-family:Raleway;position:relative}#ff-shortcodes-modal-window .ff-tabs a.current{font-weight:600;color:#19bc9c}#ff-shortcodes-modal-window .ff-tabs a.current:after{content:'';border-bottom:1px solid #fff;position:absolute;bottom:-1px;left:0;right:0}#ff-shortcodes-modal-window .ff-tabs a:hover{background-color:#eee}#ff-shortcodes-modal-window .ff-tabs a.current{background-color:#fff;border-top-color:#19bc9c}#ff-shortcodes-modal-window .ff-tabs a:last-of-type{border-right:1px solid #e0e0e0}#ff-shortcodes-modal-window .ff-tab{padding:0 25px 0 25px}#ff-shortcodes-modal-window .ff-row{margin-bottom:25px}#ff-shortcodes-modal-window .ff-row h4{transition:color .3s;font-size:12px;font-weight:bold;text-transform:uppercase;margin-bottom:12px}#ff-shortcodes-modal-window .ff-control-text label,#ff-shortcodes-modal-window .ff-control-textarea label,#ff-shortcodes-modal-window .ff-control-dropdown label,#ff-shortcodes-modal-window .ff-control-color-picker label,#ff-shortcodes-modal-window .ff-control-icon-picker label,#ff-shortcodes-modal-window .ff-control-alignment label,#ff-shortcodes-modal-window .ff-control-switch label,#ff-shortcodes-modal-window .ff-control-image-picker label,#ff-shortcodes-modal-window .ff-control-text-unit label,#ff-shortcodes-modal-window .ff-control-radio>label{font-family:Raleway;font-size:12px;line-height:14px;font-weight:bold;color:#4a4a4a;display:block;margin-bottom:5px}#ff-shortcodes-modal-window .ff-control .desc{font-size:12px;line-height:14px;font-weight:500;color:#9b9b9b;display:block;margin-top:5px}#ff-shortcodes-modal-window .search-shortcodes input[type=text],#ff-shortcodes-modal-window .ff-control-text input[type=text],#ff-shortcodes-modal-window .ff-control-textarea textarea,#ff-shortcodes-modal-window .ff-control-dropdown select,#ff-shortcodes-modal-window .ff-control-icon-picker input[type=text],#ff-shortcodes-modal-window .ff-control-text-unit input[type=text]{display:block;border-radius:4px;box-shadow:inset 0 2px 0 0 #f5f5f5;background-color:#fff;border:solid 1px #e0e0e0;margin:0;padding:10px 15px;font-family:Raleway;font-size:14px;line-height:20px;font-weight:500;color:#4a4a4a;width:100%;box-sizing:border-box}#ff-shortcodes-modal-window .search-shortcodes input[type=text]:hover,#ff-shortcodes-modal-window .ff-control-text input[type=text]:hover,#ff-shortcodes-modal-window .ff-control-textarea textarea:hover,#ff-shortcodes-modal-window .ff-control-dropdown select:hover,#ff-shortcodes-modal-window .ff-control-icon-picker input[type=text]:hover,#ff-shortcodes-modal-window .ff-control-color-picker input[type=text]:hover,#ff-shortcodes-modal-window .ff-control-text-unit input[type=text]:hover{border-color:#9b9b9b}#ff-shortcodes-modal-window .search-shortcodes input[type=text]:focus,#ff-shortcodes-modal-window .ff-control-text input[type=text]:focus,#ff-shortcodes-modal-window .ff-control-textarea textarea:focus,#ff-shortcodes-modal-window .ff-control-dropdown select:focus,#ff-shortcodes-modal-window .ff-control-icon-picker input[type=text]:focus,#ff-shortcodes-modal-window .ff-control-color-picker input[type=text]:focus,#ff-shortcodes-modal-window .ff-control-text-unit input[type=text]:focus{border-color:#19bc9c}#ff-shortcodes-modal-window .ff-control-textarea textarea{min-height:115px;resize:none}#ff-shortcodes-modal-window .ff-control-dropdown select{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield;height:42px}#ff-shortcodes-modal-window .ff-control-dropdown .dropdown-wrapper{position:relative}#ff-shortcodes-modal-window .ff-control-dropdown .dropdown-wrapper:after{content:'';width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#4a4a4a transparent transparent transparent;position:absolute;right:11px;top:50%;transform:translateY(-50%)}#ff-shortcodes-modal-window .ff-control-radio .radios{display:flex;flex-wrap:wrap}#ff-shortcodes-modal-window .ff-control-radio .radios .ff-radio{flex-basis:33.333%}#ff-shortcodes-modal-window .ff-control-radio .radios .ff-radio input[type=radio]{position:absolute;opacity:0;visibility:hidden}#ff-shortcodes-modal-window .ff-control-radio .radios .ff-radio label{display:block;margin:0 4px 4px 0;cursor:pointer;background-color:#fbfbfb;padding:14px 20px 14px 45px;position:relative;border:1px solid #f8f8f8;border-radius:4px;transition:all .3s}#ff-shortcodes-modal-window .ff-control-radio .radios .ff-radio label:before{content:'';position:absolute;box-shadow:inset 0 1px 2px 0 rgba(0,0,0,0.2);background-color:#fff;border:solid 1px #cbcbcb;width:16px;height:16px;border-radius:50%;left:20px;top:50%;transform:translateY(-50%)}#ff-shortcodes-modal-window .ff-control-radio .radios .ff-radio:hover label{background-color:#fff;border-style:dashed;border-color:#00bb9e}#ff-shortcodes-modal-window .ff-control-radio .radios .selected label{border-color:#00bb9e;color:#00bb9e}#ff-shortcodes-modal-window .ff-control-radio .radios .selected label:before{border-color:#19bc9c}#ff-shortcodes-modal-window .ff-control-radio .radios .selected label:after{content:'';position:absolute;width:8px;height:8px;border-radius:50%;background:#19bc9c;top:50%;transform:translateY(-50%);left:25px}#ff-shortcodes-modal-window .ff-control-icon-picker .ff-picker .picker-input{position:relative}#ff-shortcodes-modal-window .ff-control-icon-picker .ff-picker input[type=text]{padding-left:60px;background-image:url(../img/search.svg);background-position:right 11px center;background-repeat:no-repeat;padding-right:25px}#ff-shortcodes-modal-window .ff-control-icon-picker .ff-picker .icon{display:block;position:absolute;top:1px;left:1px;bottom:1px;border-top-left-radius:4px;border-bottom-left-radius:4px;background:#f5f5f5;text-align:center;width:45px;border-right:1px solid #e0e0e0}#ff-shortcodes-modal-window .ff-control-icon-picker .ff-picker .icon i{color:#646464;font-size:14px;line-height:38px;cursor:pointer}#ff-shortcodes-modal-window .ff-control-icon-picker .ff-picker .all-icons{display:none;height:150px;overflow-x:hidden;overflow-y:auto;margin-top:5px;border:1px solid #e0e0e0;border-radius:4px}#ff-shortcodes-modal-window .ff-control-icon-picker .ff-picker .all-icons a{color:#646464;display:inline-block;width:40px;height:40px;margin:4px 0 0 4px;font-size:18px;line-height:40px;text-align:center;border:1px solid #e0e0e0;border-radius:4px;transition:all .3s}#ff-shortcodes-modal-window .ff-control-icon-picker .ff-picker .all-icons a:hover{background-color:#f5f5f5;border-color:#00bb9e}#ff-shortcodes-modal-window .ff-control-icon-picker.no-icon input[type=text]{padding-left:15px}#ff-shortcodes-modal-window .ff-control-icon-picker.no-icon .icon{display:none}#ff-shortcodes-modal-window .wp-picker-input-wrap>label{float:left}#ff-shortcodes-modal-window .ff-control-text-unit .ff-picker{position:relative;display:block;max-width:120px}#ff-shortcodes-modal-window .ff-control-text-unit .ff-picker input{padding-right:47px}#ff-shortcodes-modal-window .ff-control-text-unit .ff-picker div{position:absolute;right:1px;top:1px;bottom:1px;border-left:1px solid #e7e7e7;line-height:38px;text-align:center;background:#f7f7f7;width:45px;border-top-right-radius:4px;border-bottom-right-radius:4px}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker{display:flex}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker label{display:block;width:40px;height:32px;border:1px solid #e0e0e0;border-radius:4px;margin-right:4px;cursor:pointer;background-position:center center;background-repeat:no-repeat;transition:border-color .3s,background-color .3s}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker label:hover{border-color:#9b9b9b}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker label.selected{border-color:#19bc9c;background-color:#f3fbfa}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker .left{background:#fff url(../img/left.svg) center center no-repeat}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker .center{background:#fff url(../img/center.svg) center center no-repeat}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker .right{background:#fff url(../img/right.svg) center center no-repeat}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker .justify{background:#fff url(../img/justify.svg) center center no-repeat}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker .left.selected{background-image:url(../img/left-green.svg)}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker .center.selected{background-image:url(../img/center-green.svg)}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker .right.selected{background-image:url(../img/right-green.svg)}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker .justify.selected{background-image:url(../img/justify-green.svg)}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker input[type=radio]{visibility:hidden;opacity:0;position:absolute}#ff-shortcodes-modal-window .ff-control-switch label{display:block;margin-bottom:4px}#ff-shortcodes-modal-window .ff-control-switch .ff-picker{position:relative;display:inline-block;cursor:pointer}#ff-shortcodes-modal-window .ff-control-switch .ff-picker input[type=checkbox]{visibility:hidden;opacity:0;position:absolute}#ff-shortcodes-modal-window .ff-control-switch .ff-picker span{display:inline-block;height:28px;background-color:#f0f0f0;border-radius:16px;font-size:12px;font-weight:bold;color:#4a4a4a;line-height:24px;transition:all .3s}#ff-shortcodes-modal-window .ff-control-switch .ff-picker .label-off:hover{background-color:#d8d8d8}#ff-shortcodes-modal-window .ff-control-switch .ff-picker .label-on:hover{background-color:#19bc9c}#ff-shortcodes-modal-window .ff-control-switch .ff-picker span:before{content:'';position:absolute;width:20px;height:20px;background:#fff;transform:translateY(-50%);top:50%;box-shadow:0 1px 3px 0 rgba(0,0,0,0.3);border-radius:50%}#ff-shortcodes-modal-window .ff-control-switch .ff-picker span:hover:before{box-shadow:0 1px 3px 0 rgba(0,0,0,0.3)}#ff-shortcodes-modal-window .ff-control-switch .ff-picker .label-off{padding-left:30px;padding-right:15px}#ff-shortcodes-modal-window .ff-control-switch .ff-picker .label-off:before{left:4px}#ff-shortcodes-modal-window .ff-control-switch .ff-picker .label-on{padding-right:30px;padding-left:15px;background-color:#43c7ad;color:#fff}#ff-shortcodes-modal-window .ff-control-switch .ff-picker .label-on:before{box-shadow:0 1px 3px 0 rgba(0,0,0,0.3)}#ff-shortcodes-modal-window .ff-control-switch .ff-picker .label-on:before{right:4px}#ff-shortcodes-modal-window .ff-control-switch .ff-picker.on .label-off{display:none}#ff-shortcodes-modal-window .ff-control-switch .ff-picker.off .label-on{display:none}#ff-shortcodes-modal-window .ff-control-image-picker .ff-picker{position:relative;display:flex}#ff-shortcodes-modal-window .ff-control-image-picker .ff-thumb{width:96px;height:96px;position:relative;margin-right:16px;border-radius:4px;background:#fbfbfb;border:1px solid #e0e0e0}#ff-shortcodes-modal-window .ff-control-image-picker .ff-thumb .img-holder{position:absolute;border-radius:4px;top:0;right:0;left:0;bottom:0;background-position:center center;background-repeat:no-repeat}#ff-shortcodes-modal-window .ff-control-image-picker .add{width:96px;height:96px;border:1px dashed #e0e0e0;border-radius:4px;transition:border-color .3s;background:#fff url(../img/plus.svg) center center no-repeat}#ff-shortcodes-modal-window .ff-control-image-picker .add:hover{border-color:#19bc9c;background-image:url(../img/plus-green.svg)}#ff-shortcodes-modal-window .ff-control-image-picker .remove{position:absolute;display:none;right:-10px;top:-10px;width:32px;height:32px;border-radius:50%;background:#fff url(../img/trash.svg) center center no-repeat;border:1px solid #efefef}#ff-shortcodes-modal-window .ff-control-image-picker.img-selected .remove{display:block}@media screen and (max-width:995px){#ff-shortcodes-modal-window .ff-control-radio .ff-radio{flex-basis:100%}#ff-shortcodes-modal-window .ff-control-radio label{margin:0 0 4px 0}}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row{background-color:#fbfbfb;border-radius:4px;padding:0 15px 1px 15px;margin-bottom:25px}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-row{display:none}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls{border-top-right-radius:4px;border-top-left-radius:4px;background-color:#f5f5f5;line-height:47px;margin:0 -15px 0 -15px;padding:0 15px;position:relative}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls h4{color:#4a4a4a;text-transform:none;line-height:47px;margin:0;padding-left:50px;text-transform:capitalize}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls a{border-radius:50%;background:#fff;background-repeat:no-repeat;background-position:center center;display:block;width:32px;height:32px;position:absolute;top:50%;transform:translateY(-50%)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls a:hover{border-color:transparent}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls .toggle{left:15px;background-image:url(../img/toggle.svg)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls .toggle:hover{background-image:url(../img/toggle-hover.svg)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls .move{right:15px;cursor:move;background-image:url(../img/move.svg)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls .move:hover{background-image:url(../img/move-hover.svg)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls .duplicate{right:55px;background-image:url(../img/duplicate.svg)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls .duplicate:hover{background-image:url(../img/duplicate-hover.svg)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls .remove{right:95px;background-image:url(../img/remove.svg)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls .remove:hover{background-image:url(../img/remove-hover.svg)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row.open .ff-row{display:block}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row.open .ff-shortcodes-dynamic-controls{margin:0 -15px 25px -15px}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row+.ff-shortcodes-dynamic-row,#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row+.ff-shortcodes-dynamic-row-add{margin-top:-15px}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row-add{display:block;margin-bottom:15px;border:1px dashed #e0e0e0;height:50px;background:#fff url(../img/plus.svg) center center no-repeat;border-radius:4px}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row-add:hover{background-image:url(../img/plus-green.svg);border-color:#19bc9c}a.ff-get-pro{font-weight:bold;color:#008000}.ff-settings-options-form{border:1px solid #d3d3d3;padding:20px;background:#fff}.ff-settings-options-form .description{margin-bottom:15px}.ff-settings-options-form .form-group{margin-bottom:5px}.ff-settings-options-form .submit-btn__wrapper{text-align:right;margin-top:15px}.ff-settings-options-form .floating-placeholder__wrapper{position:relative;height:30px;margin-top:15px}.ff-settings-options-form .floating-placeholder__wrapper input{height:100%;width:100%;position:relative;background-color:transparent;z-index:1}.ff-settings-options-form .floating-placeholder__wrapper input::placeholder{color:transparent}.ff-settings-options-form .floating-placeholder__wrapper label,.ff-settings-options-form .floating-placeholder__wrapper input:placeholder-shown:focus+label,.ff-settings-options-form .floating-placeholder__wrapper input:placeholder-shown:active+label{font-size:12px;font-style:italic;line-height:1;position:absolute;left:5px;top:0;transform:translateY(-50%);transition:.3s;display:block;padding:0 3px;background-color:#fff;color:#666;z-index:2;cursor:default}.ff-settings-options-form .floating-placeholder__wrapper input:placeholder-shown+label{transform:translateY(50%);font-size:16px;z-index:0;transition:.3s}
|
1 |
+
.mce-ff_shortcodes_button.mce-btn .mce-txt{line-height:1.4}.mce-toolbar .mce-btn-group .mce-btn.mce-ff_shortcodes_button{border:1px solid #19bc9c}.mce-toolbar .mce-btn-group .mce-btn.mce-ff_shortcodes_button:hover{border:1px dashed #19bc9c}.mce-ff_shortcodes_button i.mce-ico{padding-right:5px}.ff-shortcodes-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9990;transition:all .3s;background:transparent}.loaded>.ff-shortcodes-overlay{background-color:rgba(0,0,0,0.65)}.ff-shortcodes-overlay.invisible{visibility:hidden}#ff-shortcodes-modal-window{position:fixed;z-index:9995;background-color:#fff;border-radius:4px;box-shadow:0 8px 40px 0 rgba(0,0,0,0.5);width:670px;top:50%;left:50%;transition:opacity .5s;transform:translateX(-50%);opacity:0}#ff-shortcodes-modal-window *{outline:none}#ff-shortcodes-modal-window a:focus{box-shadow:none}#ff-shortcodes-modal-window a{text-decoration:none}#ff-shortcodes-modal-window h1,#ff-shortcodes-modal-window h2,#ff-shortcodes-modal-window h3,#ff-shortcodes-modal-window h4,#ff-shortcodes-modal-window h5,#ff-shortcodes-modal-window h6{font-family:Raleway}#ff-shortcodes-modal-window h4.pro-only{padding-left:20px;padding-right:20px;text-align:center}#ff-shortcodes-modal-window h4.pro-only a{margin-top:15px;display:inline-block;padding:10px 20px;border-radius:4px;box-shadow:inset 0 2px 0 0 #f5f5f5;background-color:#fafafa;border:solid 1px #e0e0e0}#ff-shortcodes-modal-window header{position:relative;background-color:#333;line-height:48px;border-top-left-radius:4px;border-top-right-radius:4px}#ff-shortcodes-modal-window header a{width:20px;height:20px;position:absolute;top:50%;transform:translateY(-50%)}#ff-shortcodes-modal-window header .ff-shortcodes-back{left:15px;height:20px;background:url(../img/return.svg) center center no-repeat;display:none}#ff-shortcodes-modal-window header .ff-shortcodes-rollup{right:45px;height:12px;background:url(../img/minimize-a-window.svg) center bottom no-repeat}#ff-shortcodes-modal-window header .ff-shortcodes-close{right:17px;background:url(../img/close-a-window.svg) center center no-repeat}#ff-shortcodes-modal-window header h4{color:#fff;margin:0;padding:0;display:block;text-align:center;font-size:16px;font-weight:600;line-height:48px}#ff-shortcodes-modal-window footer{background-color:#fbfbfb;padding:15px;border-top:1px solid #e0e0e0;border-bottom:1px solid #e0e0e0;text-align:right}#ff-shortcodes-modal-window footer .ff-button{display:inline-block;border-radius:4px;border:1px solid #e0e0e0;background:#fff;line-height:40px;font-size:14px;padding:0 20px;color:#333;transition:all .2s;margin-left:8px;min-width:50px;text-align:center}#ff-shortcodes-modal-window footer .ff-button:hover{border-color:#19bc9c;background-color:#f3fbfa}#ff-shortcodes-modal-window footer .add-shortcode,#ff-shortcodes-modal-window footer .add-shortcode:hover{border-color:#00ad8a;background-color:#19bc9c;color:#fff}#ff-shortcodes-modal-window.rolled-up{top:auto;bottom:0;right:0;left:auto;width:280px;transform:translateX(0) !important}#ff-shortcodes-modal-window.rolled-up header{cursor:pointer}#ff-shortcodes-modal-window.rolled-up header h4{text-align:left;padding-left:20px}#ff-shortcodes-modal-window.rolled-up header .ff-shortcodes-rollup,#ff-shortcodes-modal-window.rolled-up header .ff-shortcodes-back{display:none !important}#ff-shortcodes-modal-window.rolled-up #ff-shortcodes-modal-content{display:none}@media screen and (max-width:995px){#ff-shortcodes-modal-window{width:90%;height:70%;overflow-x:hidden;overflow-y:auto}}.loaded>#ff-shortcodes-modal-window{opacity:1;transform:translate(-50%, -50%)}#ff-shortcodes-modal-content{position:relative;max-height:550px}#ff-shortcodes-modal-window form.ff-shortcode-params{margin:0;padding:0 0 80px 0;min-height:calc( 100% - 80px );position:relative}#ff-shortcodes-modal-window form.ff-shortcode-params footer{position:absolute;left:0;right:0;bottom:0}#ff-shortcodes-modal-window .shortcodes-list .search-shortcodes{padding:16px 15px 0 15px;position:relative}#ff-shortcodes-modal-window .shortcodes-list .search-shortcodes input[type=text]{display:block;border-radius:4px;box-shadow:inset 0 2px 0 0 #f5f5f5;background-color:#fff;border:solid 1px #e0e0e0;margin:0;padding:9px 15px;font-family:Raleway;font-size:14px;font-weight:500;color:#4a4a4a;width:100%;box-sizing:border-box;padding-left:40px;background-image:url(../img/search.svg);background-repeat:no-repeat;background-position:15px center}#ff-shortcodes-modal-window .shortcodes-list .search-shortcodes .clear-search{display:none}#ff-shortcodes-modal-window .shortcodes-list .search-shortcodes.active .clear-search{display:block;position:absolute;right:25px;top:28px;width:16px;height:16px;background:url(../img/clear-normal.svg) center center no-repeat}#ff-shortcodes-modal-window .shortcodes-list .search-shortcodes.active .clear-search:hover{background-image:url(../img/clear-hover.svg)}#ff-shortcodes-modal-window .shortcodes-list .list{width:100%;padding:15px 13px 13px 13px;box-sizing:border-box;display:flex;flex-wrap:wrap}#ff-shortcodes-modal-window .shortcodes-list .list .elem{flex-basis:33.333%;position:relative}#ff-shortcodes-modal-window .shortcodes-list .list .elem a{border:solid 1px #efefef;border-radius:4px;background-color:#f5f5f5;display:block;position:relative;margin:1px;padding:14px;transition:background-color .1s}#ff-shortcodes-modal-window .shortcodes-list .list .elem .desc{padding-left:45px}#ff-shortcodes-modal-window .shortcodes-list .list .elem .desc h4{font-family:Raleway;font-size:14px;font-weight:500;font-style:normal;line-height:16px;letter-spacing:normal;text-align:left;color:#4a4a4a;margin:0}#ff-shortcodes-modal-window .shortcodes-list .list .elem .desc span{display:block;font-family:Raleway;font-size:10px;font-weight:500;font-style:normal;letter-spacing:normal;text-align:left;color:#9b9b9b}#ff-shortcodes-modal-window .shortcodes-list .list .elem img{width:32px;height:auto;position:absolute;top:50%;transform:translateY(-50%);left:15px}#ff-shortcodes-modal-window .shortcodes-list .list .elem.filtered{flex-basis:100%;opacity:1 !important}#ff-shortcodes-modal-window .shortcodes-list .list .elem:hover a{border:1px dashed #19bc9c;background-color:#fff}#ff-shortcodes-modal-window .shortcodes-list .list .elem:hover .desc h4{color:#00bb9e}#ff-shortcodes-modal-window .shortcodes-list .list .elem.pro{opacity:.5}#ff-shortcodes-modal-window .shortcodes-list .list .elem.pro:after{content:'PRO';background:#e8e8e8 url(../img/window/crown.svg) 9px 4px no-repeat;color:#4a4a4a;text-transform:uppercase;font-size:8px;line-height:23px;padding:0 8px 0 25px;border-top-right-radius:4px;border-bottom-left-radius:6px;position:absolute;right:2px;top:2px}#ff-shortcodes-modal-window .shortcodes-list .list .elem.pro:hover{opacity:1}#ff-shortcodes-modal-window .shortcodes-list .list .elem.pro:hover a{border:1px solid #9b9b9b;background-color:#f5f5f5}#ff-shortcodes-modal-window .shortcodes-list .list .elem.pro:hover .desc h4{color:#4a4a4a}#ff-shortcodes-modal-window.ff-pro-active .shortcodes-list .list .elem.pro{opacity:1}#ff-shortcodes-modal-window.ff-pro-active .shortcodes-list .list .elem:hover a{border:1px dashed #19bc9c;background-color:#fff}#ff-shortcodes-modal-window.ff-pro-active .shortcodes-list .list .elem:hover .desc h4{color:#00bb9e}@media screen and (max-width:995px){#ff-shortcodes-modal-window .shortcodes-list .list .elem{flex-basis:100%}}#ff-shortcodes-modal-window .ff-controls{padding:25px 25px 0 25px}#ff-shortcodes-modal-window .ff-tabs{background:#fbfbfb;display:flex;padding:16px 25px 0 25px;border-bottom:1px solid #e0e0e0;margin-bottom:30px}#ff-shortcodes-modal-window .ff-tabs a{display:block;padding:0 20px;background:#fbfbfb;border-top:1px solid #e0e0e0;border-left:1px solid #e0e0e0;border-top-right-radius:4px;border-top-left-radius:4px;line-height:40px;font-size:14px;font-weight:500;text-align:center;color:#4a4a4a;transition:all .3s;font-family:Raleway;position:relative}#ff-shortcodes-modal-window .ff-tabs a.current{font-weight:600;color:#19bc9c}#ff-shortcodes-modal-window .ff-tabs a.current:after{content:'';border-bottom:1px solid #fff;position:absolute;bottom:-1px;left:0;right:0}#ff-shortcodes-modal-window .ff-tabs a:hover{background-color:#eee}#ff-shortcodes-modal-window .ff-tabs a.current{background-color:#fff;border-top-color:#19bc9c}#ff-shortcodes-modal-window .ff-tabs a:last-of-type{border-right:1px solid #e0e0e0}#ff-shortcodes-modal-window .ff-tab{padding:0 25px 0 25px}#ff-shortcodes-modal-window .ff-bk-row{margin-bottom:25px}#ff-shortcodes-modal-window .ff-bk-row h4{transition:color .3s;font-size:12px;font-weight:bold;text-transform:uppercase;margin-bottom:12px}#ff-shortcodes-modal-window .ff-control-text label,#ff-shortcodes-modal-window .ff-control-textarea label,#ff-shortcodes-modal-window .ff-control-dropdown label,#ff-shortcodes-modal-window .ff-control-color-picker label,#ff-shortcodes-modal-window .ff-control-icon-picker label,#ff-shortcodes-modal-window .ff-control-alignment label,#ff-shortcodes-modal-window .ff-control-switch label,#ff-shortcodes-modal-window .ff-control-image-picker label,#ff-shortcodes-modal-window .ff-control-text-unit label,#ff-shortcodes-modal-window .ff-control-radio>label{font-family:Raleway;font-size:12px;line-height:14px;font-weight:bold;color:#4a4a4a;display:block;margin-bottom:5px}#ff-shortcodes-modal-window .ff-control .desc{font-size:12px;line-height:14px;font-weight:500;color:#9b9b9b;display:block;margin-top:5px}#ff-shortcodes-modal-window .search-shortcodes input[type=text],#ff-shortcodes-modal-window .ff-control-text input[type=text],#ff-shortcodes-modal-window .ff-control-textarea textarea,#ff-shortcodes-modal-window .ff-control-dropdown select,#ff-shortcodes-modal-window .ff-control-icon-picker input[type=text],#ff-shortcodes-modal-window .ff-control-text-unit input[type=text]{display:block;border-radius:4px;box-shadow:inset 0 2px 0 0 #f5f5f5;background-color:#fff;border:solid 1px #e0e0e0;margin:0;padding:10px 15px;font-family:Raleway;font-size:14px;line-height:20px;font-weight:500;color:#4a4a4a;width:100%;box-sizing:border-box}#ff-shortcodes-modal-window .search-shortcodes input[type=text]:hover,#ff-shortcodes-modal-window .ff-control-text input[type=text]:hover,#ff-shortcodes-modal-window .ff-control-textarea textarea:hover,#ff-shortcodes-modal-window .ff-control-dropdown select:hover,#ff-shortcodes-modal-window .ff-control-icon-picker input[type=text]:hover,#ff-shortcodes-modal-window .ff-control-color-picker input[type=text]:hover,#ff-shortcodes-modal-window .ff-control-text-unit input[type=text]:hover{border-color:#9b9b9b}#ff-shortcodes-modal-window .search-shortcodes input[type=text]:focus,#ff-shortcodes-modal-window .ff-control-text input[type=text]:focus,#ff-shortcodes-modal-window .ff-control-textarea textarea:focus,#ff-shortcodes-modal-window .ff-control-dropdown select:focus,#ff-shortcodes-modal-window .ff-control-icon-picker input[type=text]:focus,#ff-shortcodes-modal-window .ff-control-color-picker input[type=text]:focus,#ff-shortcodes-modal-window .ff-control-text-unit input[type=text]:focus{border-color:#19bc9c}#ff-shortcodes-modal-window .ff-control-textarea textarea{min-height:115px;resize:none}#ff-shortcodes-modal-window .ff-control-dropdown select{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield;height:42px}#ff-shortcodes-modal-window .ff-control-dropdown .dropdown-wrapper{position:relative}#ff-shortcodes-modal-window .ff-control-dropdown .dropdown-wrapper:after{content:'';width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#4a4a4a transparent transparent transparent;position:absolute;right:11px;top:50%;transform:translateY(-50%)}#ff-shortcodes-modal-window .ff-control-radio .radios{display:flex;flex-wrap:wrap}#ff-shortcodes-modal-window .ff-control-radio .radios .ff-radio{flex-basis:33.333%}#ff-shortcodes-modal-window .ff-control-radio .radios .ff-radio input[type=radio]{position:absolute;opacity:0;visibility:hidden}#ff-shortcodes-modal-window .ff-control-radio .radios .ff-radio label{display:block;margin:0 4px 4px 0;cursor:pointer;background-color:#fbfbfb;padding:14px 20px 14px 45px;position:relative;border:1px solid #f8f8f8;border-radius:4px;transition:all .3s}#ff-shortcodes-modal-window .ff-control-radio .radios .ff-radio label:before{content:'';position:absolute;box-shadow:inset 0 1px 2px 0 rgba(0,0,0,0.2);background-color:#fff;border:solid 1px #cbcbcb;width:16px;height:16px;border-radius:50%;left:20px;top:50%;transform:translateY(-50%)}#ff-shortcodes-modal-window .ff-control-radio .radios .ff-radio:hover label{background-color:#fff;border-style:dashed;border-color:#00bb9e}#ff-shortcodes-modal-window .ff-control-radio .radios .selected label{border-color:#00bb9e;color:#00bb9e}#ff-shortcodes-modal-window .ff-control-radio .radios .selected label:before{border-color:#19bc9c}#ff-shortcodes-modal-window .ff-control-radio .radios .selected label:after{content:'';position:absolute;width:8px;height:8px;border-radius:50%;background:#19bc9c;top:50%;transform:translateY(-50%);left:25px}#ff-shortcodes-modal-window .ff-control-icon-picker .ff-picker .picker-input{position:relative}#ff-shortcodes-modal-window .ff-control-icon-picker .ff-picker input[type=text]{padding-left:60px;background-image:url(../img/search.svg);background-position:right 11px center;background-repeat:no-repeat;padding-right:25px}#ff-shortcodes-modal-window .ff-control-icon-picker .ff-picker .icon{display:block;position:absolute;top:1px;left:1px;bottom:1px;border-top-left-radius:4px;border-bottom-left-radius:4px;background:#f5f5f5;text-align:center;width:45px;border-right:1px solid #e0e0e0}#ff-shortcodes-modal-window .ff-control-icon-picker .ff-picker .icon i{color:#646464;font-size:14px;line-height:38px;cursor:pointer}#ff-shortcodes-modal-window .ff-control-icon-picker .ff-picker .all-icons{display:none;height:150px;overflow-x:hidden;overflow-y:auto;margin-top:5px;border:1px solid #e0e0e0;border-radius:4px}#ff-shortcodes-modal-window .ff-control-icon-picker .ff-picker .all-icons a{color:#646464;display:inline-block;width:40px;height:40px;margin:4px 0 0 4px;font-size:18px;line-height:40px;text-align:center;border:1px solid #e0e0e0;border-radius:4px;transition:all .3s}#ff-shortcodes-modal-window .ff-control-icon-picker .ff-picker .all-icons a:hover{background-color:#f5f5f5;border-color:#00bb9e}#ff-shortcodes-modal-window .ff-control-icon-picker.no-icon input[type=text]{padding-left:15px}#ff-shortcodes-modal-window .ff-control-icon-picker.no-icon .icon{display:none}#ff-shortcodes-modal-window .wp-picker-input-wrap>label{float:left}#ff-shortcodes-modal-window .ff-control-text-unit .ff-picker{position:relative;display:block;max-width:120px}#ff-shortcodes-modal-window .ff-control-text-unit .ff-picker input{padding-right:47px}#ff-shortcodes-modal-window .ff-control-text-unit .ff-picker div{position:absolute;right:1px;top:1px;bottom:1px;border-left:1px solid #e7e7e7;line-height:38px;text-align:center;background:#f7f7f7;width:45px;border-top-right-radius:4px;border-bottom-right-radius:4px}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker{display:flex}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker label{display:block;width:40px;height:32px;border:1px solid #e0e0e0;border-radius:4px;margin-right:4px;cursor:pointer;background-position:center center;background-repeat:no-repeat;transition:border-color .3s,background-color .3s}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker label:hover{border-color:#9b9b9b}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker label.selected{border-color:#19bc9c;background-color:#f3fbfa}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker .left{background:#fff url(../img/left.svg) center center no-repeat}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker .center{background:#fff url(../img/center.svg) center center no-repeat}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker .right{background:#fff url(../img/right.svg) center center no-repeat}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker .justify{background:#fff url(../img/justify.svg) center center no-repeat}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker .left.selected{background-image:url(../img/left-green.svg)}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker .center.selected{background-image:url(../img/center-green.svg)}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker .right.selected{background-image:url(../img/right-green.svg)}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker .justify.selected{background-image:url(../img/justify-green.svg)}#ff-shortcodes-modal-window .ff-control-alignment .ff-picker input[type=radio]{visibility:hidden;opacity:0;position:absolute}#ff-shortcodes-modal-window .ff-control-switch label{display:block;margin-bottom:4px}#ff-shortcodes-modal-window .ff-control-switch .ff-picker{position:relative;display:inline-block;cursor:pointer}#ff-shortcodes-modal-window .ff-control-switch .ff-picker input[type=checkbox]{visibility:hidden;opacity:0;position:absolute}#ff-shortcodes-modal-window .ff-control-switch .ff-picker span{display:inline-block;height:28px;background-color:#f0f0f0;border-radius:16px;font-size:12px;font-weight:bold;color:#4a4a4a;line-height:24px;transition:all .3s}#ff-shortcodes-modal-window .ff-control-switch .ff-picker .label-off:hover{background-color:#d8d8d8}#ff-shortcodes-modal-window .ff-control-switch .ff-picker .label-on:hover{background-color:#19bc9c}#ff-shortcodes-modal-window .ff-control-switch .ff-picker span:before{content:'';position:absolute;width:20px;height:20px;background:#fff;transform:translateY(-50%);top:50%;box-shadow:0 1px 3px 0 rgba(0,0,0,0.3);border-radius:50%}#ff-shortcodes-modal-window .ff-control-switch .ff-picker span:hover:before{box-shadow:0 1px 3px 0 rgba(0,0,0,0.3)}#ff-shortcodes-modal-window .ff-control-switch .ff-picker .label-off{padding-left:30px;padding-right:15px}#ff-shortcodes-modal-window .ff-control-switch .ff-picker .label-off:before{left:4px}#ff-shortcodes-modal-window .ff-control-switch .ff-picker .label-on{padding-right:30px;padding-left:15px;background-color:#43c7ad;color:#fff}#ff-shortcodes-modal-window .ff-control-switch .ff-picker .label-on:before{box-shadow:0 1px 3px 0 rgba(0,0,0,0.3)}#ff-shortcodes-modal-window .ff-control-switch .ff-picker .label-on:before{right:4px}#ff-shortcodes-modal-window .ff-control-switch .ff-picker.on .label-off{display:none}#ff-shortcodes-modal-window .ff-control-switch .ff-picker.off .label-on{display:none}#ff-shortcodes-modal-window .ff-control-image-picker .ff-picker{position:relative;display:flex}#ff-shortcodes-modal-window .ff-control-image-picker .ff-thumb{width:96px;height:96px;position:relative;margin-right:16px;border-radius:4px;background:#fbfbfb;border:1px solid #e0e0e0}#ff-shortcodes-modal-window .ff-control-image-picker .ff-thumb .img-holder{position:absolute;border-radius:4px;top:0;right:0;left:0;bottom:0;background-position:center center;background-repeat:no-repeat;background-size:contain}#ff-shortcodes-modal-window .ff-control-image-picker .add{width:96px;height:96px;border:1px dashed #e0e0e0;border-radius:4px;transition:border-color .3s;background:#fff url(../img/plus.svg) center center no-repeat}#ff-shortcodes-modal-window .ff-control-image-picker .add:hover{border-color:#19bc9c;background-image:url(../img/plus-green.svg)}#ff-shortcodes-modal-window .ff-control-image-picker .remove{position:absolute;display:none;right:-10px;top:-10px;width:32px;height:32px;border-radius:50%;background:#fff url(../img/trash.svg) center center no-repeat;border:1px solid #efefef}#ff-shortcodes-modal-window .ff-control-image-picker.img-selected .remove{display:block}@media screen and (max-width:995px){#ff-shortcodes-modal-window .ff-control-radio .ff-radio{flex-basis:100%}#ff-shortcodes-modal-window .ff-control-radio label{margin:0 0 4px 0}}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row{background-color:#fbfbfb;border-radius:4px;padding:0 15px 1px 15px;margin-bottom:25px}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-bk-row{display:none}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls{border-top-right-radius:4px;border-top-left-radius:4px;background-color:#f5f5f5;line-height:47px;margin:0 -15px 0 -15px;padding:0 15px;position:relative}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls h4{color:#4a4a4a;text-transform:none;line-height:47px;margin:0;padding-left:50px;text-transform:capitalize}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls a{border-radius:50%;background:#fff;background-repeat:no-repeat;background-position:center center;display:block;width:32px;height:32px;position:absolute;top:50%;transform:translateY(-50%)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls a:hover{border-color:transparent}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls .toggle{left:15px;background-image:url(../img/toggle.svg)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls .toggle:hover{background-image:url(../img/toggle-hover.svg)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls .move{right:15px;cursor:move;background-image:url(../img/move.svg)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls .move:hover{background-image:url(../img/move-hover.svg)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls .duplicate{right:55px;background-image:url(../img/duplicate.svg)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls .duplicate:hover{background-image:url(../img/duplicate-hover.svg)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls .remove{right:95px;background-image:url(../img/remove.svg)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row .ff-shortcodes-dynamic-controls .remove:hover{background-image:url(../img/remove-hover.svg)}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row.open .ff-bk-row{display:block}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row.open .ff-shortcodes-dynamic-controls{margin:0 -15px 25px -15px}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row+.ff-shortcodes-dynamic-row,#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row+.ff-shortcodes-dynamic-row-add{margin-top:-15px}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row-add{display:block;margin-bottom:15px;border:1px dashed #e0e0e0;height:50px;background:#fff url(../img/plus.svg) center center no-repeat;border-radius:4px}#ff-shortcodes-modal-window .ff-shortcodes-dynamic-row-add:hover{background-image:url(../img/plus-green.svg);border-color:#19bc9c}a.ff-get-pro{font-weight:bold;color:#008000}.ff-settings-options-form{border:1px solid #d3d3d3;padding:20px;background:#fff}.ff-settings-options-form .description{margin-bottom:15px}.ff-settings-options-form .form-group{margin-bottom:5px}.ff-settings-options-form .submit-btn__wrapper{text-align:right;margin-top:15px}.ff-settings-options-form .floating-placeholder__wrapper{position:relative;height:30px;margin-top:15px}.ff-settings-options-form .floating-placeholder__wrapper input{height:100%;width:100%;position:relative;background-color:transparent;z-index:1}.ff-settings-options-form .floating-placeholder__wrapper input::placeholder{color:transparent}.ff-settings-options-form .floating-placeholder__wrapper label,.ff-settings-options-form .floating-placeholder__wrapper input:placeholder-shown:focus+label,.ff-settings-options-form .floating-placeholder__wrapper input:placeholder-shown:active+label{font-size:12px;font-style:italic;line-height:1;position:absolute;left:5px;top:0;transform:translateY(-50%);transition:.3s;display:block;padding:0 3px;background-color:#fff;color:#666;z-index:2;cursor:default}.ff-settings-options-form .floating-placeholder__wrapper input:placeholder-shown+label{transform:translateY(50%);font-size:16px;z-index:0;transition:.3s}
|
fruitful-shortcodes-2.0.0/assets/css/admin.less
CHANGED
@@ -13,19 +13,21 @@
|
|
13 |
/*------------------------------------------------------------------
|
14 |
0. Add Shortcodes Button
|
15 |
-------------------------------------------------------------------*/
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
-
.
|
25 |
-
|
26 |
-
-webkit-font-smoothing: antialiased;
|
27 |
-
-moz-osx-font-smoothing: grayscale;
|
28 |
-
content: "\f116";
|
29 |
}
|
30 |
}
|
31 |
|
@@ -453,7 +455,7 @@
|
|
453 |
3. Elements
|
454 |
-------------------------------------------------------------------*/
|
455 |
#ff-shortcodes-modal-window {
|
456 |
-
.ff-row {
|
457 |
margin-bottom: 25px;
|
458 |
h4 {
|
459 |
transition: color 0.3s;
|
@@ -864,6 +866,7 @@
|
|
864 |
bottom: 0;
|
865 |
background-position: center center;
|
866 |
background-repeat: no-repeat;
|
|
|
867 |
}
|
868 |
}
|
869 |
.add {
|
@@ -920,7 +923,7 @@
|
|
920 |
border-radius: 4px;
|
921 |
padding: 0 15px 1px 15px;
|
922 |
margin-bottom: 25px;
|
923 |
-
.ff-row {
|
924 |
display: none;
|
925 |
}
|
926 |
.ff-shortcodes-dynamic-controls {
|
@@ -988,7 +991,7 @@
|
|
988 |
}
|
989 |
|
990 |
.ff-shortcodes-dynamic-row.open {
|
991 |
-
.ff-row {
|
992 |
display: block;
|
993 |
}
|
994 |
.ff-shortcodes-dynamic-controls {
|
13 |
/*------------------------------------------------------------------
|
14 |
0. Add Shortcodes Button
|
15 |
-------------------------------------------------------------------*/
|
16 |
+
|
17 |
+
.mce-ff_shortcodes_button {
|
18 |
+
&.mce-btn {
|
19 |
+
.mce-txt {
|
20 |
+
line-height: 1.4;
|
21 |
+
}
|
22 |
+
}
|
23 |
+
.mce-toolbar .mce-btn-group .mce-btn& {
|
24 |
+
border: 1px solid #19bc9c; // #19bc9c , #777777
|
25 |
+
&:hover {
|
26 |
+
border: 1px dashed #19bc9c; // #555d66
|
27 |
+
}
|
28 |
}
|
29 |
+
i.mce-ico {
|
30 |
+
padding-right: 5px;
|
|
|
|
|
|
|
31 |
}
|
32 |
}
|
33 |
|
455 |
3. Elements
|
456 |
-------------------------------------------------------------------*/
|
457 |
#ff-shortcodes-modal-window {
|
458 |
+
.ff-bk-row {
|
459 |
margin-bottom: 25px;
|
460 |
h4 {
|
461 |
transition: color 0.3s;
|
866 |
bottom: 0;
|
867 |
background-position: center center;
|
868 |
background-repeat: no-repeat;
|
869 |
+
background-size: contain;
|
870 |
}
|
871 |
}
|
872 |
.add {
|
923 |
border-radius: 4px;
|
924 |
padding: 0 15px 1px 15px;
|
925 |
margin-bottom: 25px;
|
926 |
+
.ff-bk-row {
|
927 |
display: none;
|
928 |
}
|
929 |
.ff-shortcodes-dynamic-controls {
|
991 |
}
|
992 |
|
993 |
.ff-shortcodes-dynamic-row.open {
|
994 |
+
.ff-bk-row {
|
995 |
display: block;
|
996 |
}
|
997 |
.ff-shortcodes-dynamic-controls {
|
fruitful-shortcodes-2.0.0/assets/css/blocks_editor.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.editor-block-types-list__item:not(:disabled)[class*="editor-block-list-item-fruitful-blocks"]:hover{border:1px dashed #19bc9c}.editor-block-types-list__item:not(:disabled)[class*="editor-block-list-item-fruitful-blocks"]:hover .editor-block-types-list__item-title{color:#19bc9c}
|
fruitful-shortcodes-2.0.0/assets/css/blocks_editor.less
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*------------------------------------------------------------------
|
2 |
+
Add Styles for Gutenberg editor
|
3 |
+
-------------------------------------------------------------------*/
|
4 |
+
.editor-block-types-list__item:not(:disabled) {
|
5 |
+
|
6 |
+
&[class*="editor-block-list-item-fruitful-blocks"] {
|
7 |
+
|
8 |
+
&:hover {
|
9 |
+
border: 1px dashed #19bc9c;
|
10 |
+
.editor-block-types-list__item-title {
|
11 |
+
color: #19bc9c;
|
12 |
+
}
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
17 |
+
|
18 |
+
|
fruitful-shortcodes-2.0.0/assets/css/front.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.ff>.ff-container-fluid,.ff>.ff-container{padding-left:0;padding-right:0}.ff .text-align-center{text-align:center}.ff .text-align-left{text-align:left}.ff .text-align-right{text-align:right}.ff-row>br{display:none}.ff-col-elem{margin-bottom:32px;box-sizing:border-box}.ff-col-elem .ff-col-image{margin-bottom:15px}.ff-col-elem .ff-col-image img{display:inline-block}.ff-col-elem .ff-col-title{margin:0 0 10px 0}.ff-one-five-col{max-width:20%;flex:0 0 20%;width:20%}@media screen and (max-width:991px){.ff-one-five-col{max-width:100%;width:100%;flex:0 0 100%}}.fruitful_sep{display:block;margin:32px 0}.ff-w-100{display:block;width:100%}.ff-col-md-0{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.ffs-icon-container
|
1 |
+
.ff>.ff-container-fluid,.ff>.ff-container{padding-left:0;padding-right:0}.ff .text-align-center{text-align:center}.ff .text-align-left{text-align:left}.ff .text-align-right{text-align:right}.ff-row>br{display:none}.ff-col-elem{margin-bottom:32px;box-sizing:border-box}.ff-col-elem .ff-col-image{margin-bottom:15px}.ff-col-elem .ff-col-image img{display:inline-block}.ff-col-elem .ff-col-title{margin:0 0 10px 0}.ff-one-five-col{max-width:20%;flex:0 0 20%;width:20%}@media screen and (max-width:991px){.ff-one-five-col{max-width:100%;width:100%;flex:0 0 100%}}.fruitful_sep{display:block;margin:32px 0}.ff-w-100{display:block;width:100%}.ff-col-md-0{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.ffs-icon-container{text-align:center;margin:0 auto 10px auto;width:auto;background-color:#000;display:inline-block;border-radius:50%}.ffs-icon-container i{text-align:center;font-size:26px;padding:5px 10px;margin:5px 0;color:#fff}.ffs-info-box.center .ffs-icon-box,.ffs-info-box.center .ffs-content-box{width:100%}.ffs-info-box.center .ffs-icon-box{text-align:center}.ffs-info-box.left .ffs-icon-box,.ffs-info-box.right .ffs-icon-box{width:20%;display:block}.ffs-info-box.left .ffs-content-box,.ffs-info-box.right .ffs-content-box{width:80%;display:block}.ffs-info-box.left .ffs-icon-box,.ffs-info-box.right .ffs-content-box{float:left}.ffs-info-box.right .ffs-icon-box,.ffs-info-box.left .ffs-content-box{float:right}
|
fruitful-shortcodes-2.0.0/assets/img/pro/fruitful_glitch.svg
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="90px" height="58px" viewBox="0 0 90 58" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
|
4 |
+
<title>noun_glitch_856131</title>
|
5 |
+
<desc>Created with Sketch.</desc>
|
6 |
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
7 |
+
<g id="noun_glitch_856131" transform="translate(-1.000000, 0.000000)" fill="#4A4A4A">
|
8 |
+
<path d="M70.493,57.351 L13.575,57.351 L13.575,36.245 L22.559,33.885 L6.315,31.517 L18.661,26.615 L0.954,23.371 L16.573,16.616 L16.573,0.649 L73.491,0.649 L73.491,18.66 L65.309,21.558 L83.204,25.769 L72.458,29.7 L91,31.825 L70.493,38.491 L70.493,57.351 Z M16.573,54.353 L67.496,54.353 L67.496,36.313 L76.966,33.233 L59.535,31.236 L72.771,26.393 L54.693,22.141 L70.494,16.541 L70.494,3.647 L19.571,3.647 L19.571,18.586 L11.209,22.203 L29.473,25.548 L17.838,30.169 L37.566,33.044 L16.573,38.559 L16.573,54.353 Z" id="Shape" fill-rule="nonzero"></path>
|
9 |
+
<text id="Text" font-family="Gilroy-ExtraBold, Gilroy" font-size="11" font-weight="600">
|
10 |
+
<tspan x="33" y="31">Text</tspan>
|
11 |
+
</text>
|
12 |
+
</g>
|
13 |
+
</g>
|
14 |
+
</svg>
|
fruitful-shortcodes-2.0.0/assets/img/suggest_your_shortcode/admin-icon.svg
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="32px" height="32px" viewBox="0 0 68 68" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<title>Shortcodes-Icons/Suggest</title>
|
4 |
+
<desc>Created with Sketch.</desc>
|
5 |
+
<g id="Shortcodes-Icons/Suggest" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
6 |
+
<g id="Shortcodes-Icons/Suggest2" fill="#000000" fill-rule="nonzero">
|
7 |
+
<g id="Shortcodes-Icons/Suggest3">
|
8 |
+
<path d="M66.4,29.6 C65.9,28.7 64.9,28.1 63.9,28.1 C63.9,28.1 63.9,28.1 63.9,28.1 L59.8,28.1 C59.3,28.1 58.8,27.8 58.7,27.3 C58.1,25.2 57.3,23.2 56.2,21.3 C55.9,20.9 56,20.3 56.4,19.9 L59.3,17 C60,16.3 60.3,15.2 60,14.2 C59.7,13.3 59.1,11.9 57.6,10.4 C56.1,8.9 54.7,8.3 53.8,8 C52.8,7.7 51.7,8 51,8.7 L48,11.7 C47.6,12.1 47,12.2 46.6,11.9 C44.7,10.8 42.7,10 40.6,9.4 C40.1,9.3 39.8,8.8 39.8,8.3 L39.8,4.2 C39.8,3.2 39.2,2.2 38.3,1.7 C37.5,1.2 36,0.7 33.9,0.7 C33.9,0.7 33.9,0.7 33.9,0.7 C31.8,0.7 30.4,1.3 29.5,1.7 C28.6,2.2 28,3.2 28,4.2 L28,8.3 C28,8.8 27.7,9.3 27.2,9.4 C25.1,10 23.1,10.8 21.2,11.9 C20.8,12.2 20.2,12.1 19.8,11.7 L17,8.8 C16.3,8.1 15.2,7.8 14.2,8.1 C13.3,8.4 11.9,9 10.4,10.5 C8.9,12 8.3,13.4 8,14.3 C7.7,15.3 8,16.4 8.7,17.1 L11.6,20 C12,20.4 12.1,21 11.8,21.4 C10.7,23.3 9.9,25.3 9.3,27.4 C9.2,27.9 8.7,28.2 8.2,28.2 L4.1,28.2 C3.1,28.2 2.1,28.8 1.6,29.7 C1.1,30.5 0.6,32 0.6,34.1 C0.6,36.2 1.2,37.6 1.6,38.5 C2.1,39.4 3.1,40 4.1,40 C4.1,40 4.1,40 4.1,40 L8.2,40 C8.2,40 8.2,40 8.2,40 C8.7,40 9.2,40.3 9.3,40.8 C9.9,42.9 10.7,44.9 11.8,46.8 C12.1,47.2 12,47.8 11.6,48.2 L8.8,51 C8.1,51.7 7.8,52.8 8.1,53.8 C8.4,54.7 9,56.1 10.5,57.6 C12,59.1 13.4,59.7 14.3,60 C15.3,60.3 16.4,60 17.1,59.3 L20,56.4 C20.4,56 21,55.9 21.4,56.2 C23.3,57.3 25.3,58.1 27.4,58.7 C27.9,58.8 28.2,59.3 28.2,59.8 L28.2,63.9 C28.2,64.9 28.8,65.9 29.7,66.4 C30.5,66.9 32,67.4 34.1,67.4 C34.1,67.4 34.1,67.4 34.1,67.4 C36.2,67.4 37.6,66.8 38.5,66.4 C39.4,65.9 40,64.9 40,63.9 L40,59.8 C40,59.3 40.3,58.8 40.8,58.7 C42.9,58.1 44.9,57.3 46.8,56.2 C47.2,55.9 47.8,56 48.2,56.4 L51.1,59.3 C51.8,60 52.9,60.3 53.9,60 C54.8,59.7 56.2,59.1 57.7,57.6 C59.2,56.1 59.8,54.7 60.1,53.8 C60.4,52.8 60.1,51.7 59.4,51 L56.3,48 C55.9,47.6 55.8,47 56.1,46.6 C57.2,44.7 58,42.7 58.6,40.6 C58.7,40.1 59.2,39.8 59.7,39.8 L63.8,39.8 C64.8,39.8 65.8,39.2 66.3,38.3 C66.8,37.5 67.3,36 67.3,33.9 C67.4,31.8 66.8,30.4 66.4,29.6 Z M64.6,37.3 C64.4,37.6 64.2,37.7 63.8,37.7 L59.7,37.7 C58.3,37.7 57,38.7 56.6,40 C56.1,41.9 55.3,43.8 54.3,45.5 C53.6,46.7 53.8,48.3 54.9,49.3 L57.8,52.2 C58,52.4 58.1,52.8 58,53.1 C57.8,53.8 57.3,54.9 56.1,56 C54.9,57.2 53.8,57.7 53.2,57.9 C52.9,58 52.6,57.9 52.3,57.7 L49.4,54.8 C48.4,53.8 46.8,53.6 45.6,54.3 C43.9,55.3 42,56.1 40.1,56.6 C38.7,57 37.8,58.2 37.8,59.7 L37.8,63.8 C37.8,64.1 37.6,64.4 37.4,64.6 C36.8,65 35.7,65.4 34,65.4 C34,65.4 34,65.4 34,65.4 C32.3,65.4 31.2,65 30.6,64.6 C30.3,64.4 30.2,64.2 30.2,63.8 L30.2,59.7 C30.2,58.3 29.2,57 27.9,56.6 C26,56.1 24.1,55.3 22.4,54.3 C21.9,54 21.4,53.9 20.9,53.9 C20.1,53.9 19.2,54.2 18.6,54.9 L15.7,57.8 C15.5,58 15.1,58.1 14.8,58 C14.1,57.8 13,57.3 11.8,56.1 C10.6,54.9 10.1,53.8 9.9,53.2 C9.8,52.9 9.9,52.6 10.1,52.3 L13,49.4 C14,48.4 14.2,46.8 13.5,45.6 C12.5,43.9 11.7,42 11.2,40.1 C10.8,38.7 9.6,37.8 8.1,37.8 C8.1,37.8 8.1,37.8 8.1,37.8 L4,37.8 C4,37.8 4,37.8 4,37.8 C3.7,37.8 3.4,37.6 3.2,37.4 C2.8,36.8 2.4,35.7 2.4,34 C2.4,32.3 2.8,31.2 3.2,30.6 C3.4,30.3 3.6,30.2 4,30.2 L8.1,30.2 C9.5,30.2 10.8,29.2 11.2,27.9 C11.7,26 12.5,24.1 13.5,22.4 C14.2,21.2 14,19.6 12.9,18.6 L10,15.7 C9.8,15.5 9.7,15.1 9.8,14.8 C10,14.1 10.5,13 11.7,11.8 C12.9,10.6 13.9,10.1 14.6,9.9 C14.9,9.8 15.2,9.9 15.5,10.1 L18.4,13 C19.4,14 21,14.2 22.2,13.5 C23.9,12.5 25.8,11.7 27.7,11.2 C29.1,10.8 30,9.6 30,8.1 L30,4 C30,3.7 30.2,3.4 30.4,3.2 C31,2.8 32.1,2.4 33.8,2.4 C33.8,2.4 33.8,2.4 33.8,2.4 C35.5,2.4 36.6,2.8 37.2,3.2 C37.5,3.4 37.6,3.6 37.6,4 L37.6,8.1 C37.6,9.5 38.6,10.8 39.9,11.2 C41.8,11.7 43.7,12.5 45.4,13.5 C46.6,14.2 48.2,14 49.2,12.9 L52.1,10 C52.3,9.8 52.7,9.7 53,9.8 C53.7,10 54.8,10.5 55.9,11.7 C57.1,12.9 57.6,13.9 57.8,14.6 C57.9,14.9 57.8,15.2 57.6,15.5 L54.7,18.4 C53.7,19.4 53.5,21 54.2,22.2 C55.2,23.9 56,25.8 56.5,27.7 C56.9,29.1 58.1,30 59.6,30 C59.6,30 59.6,30 59.6,30 L63.7,30 C63.7,30 63.7,30 63.7,30 C64,30 64.3,30.2 64.5,30.4 C64.5,30.4 64.5,30.4 64.5,30.4 C64.9,31 65.3,32.1 65.3,33.8 C65.4,35.6 65,36.7 64.6,37.3 Z" id="Shape"></path>
|
9 |
+
<path d="M34.3,21.5 C30.9,21.4 27.8,22.6 25.4,25 C23,27.3 21.6,30.4 21.5,33.8 C21.4,37.1 22.6,40.3 25,42.7 C27.3,45.1 30.4,46.5 33.8,46.6 C33.9,46.6 34,46.6 34.1,46.6 C37.3,46.6 40.4,45.4 42.7,43.1 C45.1,40.8 46.5,37.7 46.6,34.3 C46.7,31 45.5,27.8 43.1,25.4 C40.7,22.9 37.6,21.6 34.3,21.5 Z M41.3,41.6 C39.3,43.5 36.6,44.6 33.8,44.5 C31,44.4 28.4,43.3 26.4,41.2 C24.5,39.2 23.4,36.5 23.5,33.7 C23.6,30.9 24.7,28.3 26.8,26.3 C28.8,24.4 31.3,23.4 34,23.4 C34.1,23.4 34.2,23.4 34.3,23.4 C37.1,23.5 39.7,24.6 41.7,26.7 C43.6,28.7 44.7,31.4 44.6,34.2 C44.4,37.1 43.3,39.7 41.3,41.6 Z" id="Shape"></path>
|
10 |
+
</g>
|
11 |
+
</g>
|
12 |
+
</g>
|
13 |
+
</svg>
|
fruitful-shortcodes-2.0.0/assets/js/admin.js
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
'ajaxLoadModalAction' : 'ff_shortcodes_load_modal',
|
7 |
'ajaxLoadModalPromoAction' : 'ff_shortcodes_load_modal_promo',
|
8 |
'ajaxLoadShortocdeAction' : 'ff_shortcodes_load_shortcode',
|
9 |
-
'
|
10 |
'modalForm' : '#ff-shortcode-params-form',
|
11 |
'modalContainerId' : '#ff-shortcodes-modal-container',
|
12 |
'modalWindowId' : '#ff-shortcodes-modal-window',
|
6 |
'ajaxLoadModalAction' : 'ff_shortcodes_load_modal',
|
7 |
'ajaxLoadModalPromoAction' : 'ff_shortcodes_load_modal_promo',
|
8 |
'ajaxLoadShortocdeAction' : 'ff_shortcodes_load_shortcode',
|
9 |
+
'addShortcodesBtnSelector' : '.mce-ff_shortcodes_button button',
|
10 |
'modalForm' : '#ff-shortcode-params-form',
|
11 |
'modalContainerId' : '#ff-shortcodes-modal-container',
|
12 |
'modalWindowId' : '#ff-shortcodes-modal-window',
|
fruitful-shortcodes-2.0.0/assets/js/animation.js
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
AOS.init({
|
2 |
+
// Global settings
|
3 |
+
offset: 200, // default 120
|
4 |
+
duration: 800, // default 400
|
5 |
+
easing: 'ease-in-out', // default 'ease'
|
6 |
+
delay: 300, // default 0
|
7 |
+
once: false, // default false
|
8 |
+
});
|
fruitful-shortcodes-2.0.0/assets/js/mce_button.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function () {
|
2 |
+
|
3 |
+
tinymce.PluginManager.add('ff_shortcodes_button', function (editor, url) {
|
4 |
+
|
5 |
+
editor.addButton('ff_shortcodes_button', {
|
6 |
+
text: 'Fruitful Shortcodes',
|
7 |
+
classes: 'ff_shortcodes_button',
|
8 |
+
icon: 'dashicons dashicons-before dashicons-welcome-widgets-menus',
|
9 |
+
type: 'button',
|
10 |
+
title: 'Fruitful Shortcodes',
|
11 |
+
onclick: function () {
|
12 |
+
window.ff_shortcodes_mce_editor = editor;
|
13 |
+
}
|
14 |
+
|
15 |
+
});
|
16 |
+
|
17 |
+
});
|
18 |
+
})();
|
fruitful-shortcodes-2.0.0/assets/js/modal.js
CHANGED
@@ -58,7 +58,7 @@
|
|
58 |
$modal = $( this.config.modalContainerId );
|
59 |
}
|
60 |
|
61 |
-
$( document ).on( 'click', this.config.
|
62 |
|
63 |
self.loadModalContent( self.config.ajaxLoadModalAction, self.config.modalContainerId );
|
64 |
|
58 |
$modal = $( this.config.modalContainerId );
|
59 |
}
|
60 |
|
61 |
+
$( document ).on( 'click', this.config.addShortcodesBtnSelector, function() {
|
62 |
|
63 |
self.loadModalContent( self.config.ajaxLoadModalAction, self.config.modalContainerId );
|
64 |
|
fruitful-shortcodes-2.0.0/assets/js/modal_ui.js
CHANGED
@@ -553,14 +553,19 @@
|
|
553 |
shortcodeOut += innerShortcodeOut;
|
554 |
shortcodeOut += '[/' + formObj._ff_shortcode_name + ']';
|
555 |
}
|
556 |
-
|
557 |
-
|
558 |
-
var $_editorTextArea = $('#content');
|
559 |
-
$_editorTextArea.is(':visible') ? $_editorTextArea.val( $_editorTextArea.val() + shortcodeOut ) : tinyMCE.get('content').setContent( tinyMCE.get('content').getContent() + shortcodeOut );
|
560 |
-
|
561 |
// close modal window
|
562 |
window.ff_shortcodes_modal_window.closeModalWindow();
|
563 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
564 |
return false;
|
565 |
|
566 |
});
|
553 |
shortcodeOut += innerShortcodeOut;
|
554 |
shortcodeOut += '[/' + formObj._ff_shortcode_name + ']';
|
555 |
}
|
556 |
+
|
557 |
+
|
|
|
|
|
|
|
558 |
// close modal window
|
559 |
window.ff_shortcodes_modal_window.closeModalWindow();
|
560 |
|
561 |
+
// paste generated shortcode to WP editor
|
562 |
+
try {
|
563 |
+
window.ff_shortcodes_mce_editor.focus();
|
564 |
+
window.ff_shortcodes_mce_editor.insertContent(shortcodeOut);
|
565 |
+
} catch (e) {
|
566 |
+
console.error(e);
|
567 |
+
}
|
568 |
+
|
569 |
return false;
|
570 |
|
571 |
});
|
fruitful-shortcodes-2.0.0/assets/libs/aos/aos.min.css
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
/*ver 2.3.4*/
|
2 |
+
[data-aos][data-aos][data-aos-duration="50"],body[data-aos-duration="50"] [data-aos]{transition-duration:50ms}[data-aos][data-aos][data-aos-delay="50"],body[data-aos-delay="50"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="50"].aos-animate,body[data-aos-delay="50"] [data-aos].aos-animate{transition-delay:50ms}[data-aos][data-aos][data-aos-duration="100"],body[data-aos-duration="100"] [data-aos]{transition-duration:.1s}[data-aos][data-aos][data-aos-delay="100"],body[data-aos-delay="100"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="100"].aos-animate,body[data-aos-delay="100"] [data-aos].aos-animate{transition-delay:.1s}[data-aos][data-aos][data-aos-duration="150"],body[data-aos-duration="150"] [data-aos]{transition-duration:.15s}[data-aos][data-aos][data-aos-delay="150"],body[data-aos-delay="150"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="150"].aos-animate,body[data-aos-delay="150"] [data-aos].aos-animate{transition-delay:.15s}[data-aos][data-aos][data-aos-duration="200"],body[data-aos-duration="200"] [data-aos]{transition-duration:.2s}[data-aos][data-aos][data-aos-delay="200"],body[data-aos-delay="200"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="200"].aos-animate,body[data-aos-delay="200"] [data-aos].aos-animate{transition-delay:.2s}[data-aos][data-aos][data-aos-duration="250"],body[data-aos-duration="250"] [data-aos]{transition-duration:.25s}[data-aos][data-aos][data-aos-delay="250"],body[data-aos-delay="250"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="250"].aos-animate,body[data-aos-delay="250"] [data-aos].aos-animate{transition-delay:.25s}[data-aos][data-aos][data-aos-duration="300"],body[data-aos-duration="300"] [data-aos]{transition-duration:.3s}[data-aos][data-aos][data-aos-delay="300"],body[data-aos-delay="300"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="300"].aos-animate,body[data-aos-delay="300"] [data-aos].aos-animate{transition-delay:.3s}[data-aos][data-aos][data-aos-duration="350"],body[data-aos-duration="350"] [data-aos]{transition-duration:.35s}[data-aos][data-aos][data-aos-delay="350"],body[data-aos-delay="350"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="350"].aos-animate,body[data-aos-delay="350"] [data-aos].aos-animate{transition-delay:.35s}[data-aos][data-aos][data-aos-duration="400"],body[data-aos-duration="400"] [data-aos]{transition-duration:.4s}[data-aos][data-aos][data-aos-delay="400"],body[data-aos-delay="400"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="400"].aos-animate,body[data-aos-delay="400"] [data-aos].aos-animate{transition-delay:.4s}[data-aos][data-aos][data-aos-duration="450"],body[data-aos-duration="450"] [data-aos]{transition-duration:.45s}[data-aos][data-aos][data-aos-delay="450"],body[data-aos-delay="450"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="450"].aos-animate,body[data-aos-delay="450"] [data-aos].aos-animate{transition-delay:.45s}[data-aos][data-aos][data-aos-duration="500"],body[data-aos-duration="500"] [data-aos]{transition-duration:.5s}[data-aos][data-aos][data-aos-delay="500"],body[data-aos-delay="500"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="500"].aos-animate,body[data-aos-delay="500"] [data-aos].aos-animate{transition-delay:.5s}[data-aos][data-aos][data-aos-duration="550"],body[data-aos-duration="550"] [data-aos]{transition-duration:.55s}[data-aos][data-aos][data-aos-delay="550"],body[data-aos-delay="550"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="550"].aos-animate,body[data-aos-delay="550"] [data-aos].aos-animate{transition-delay:.55s}[data-aos][data-aos][data-aos-duration="600"],body[data-aos-duration="600"] [data-aos]{transition-duration:.6s}[data-aos][data-aos][data-aos-delay="600"],body[data-aos-delay="600"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="600"].aos-animate,body[data-aos-delay="600"] [data-aos].aos-animate{transition-delay:.6s}[data-aos][data-aos][data-aos-duration="650"],body[data-aos-duration="650"] [data-aos]{transition-duration:.65s}[data-aos][data-aos][data-aos-delay="650"],body[data-aos-delay="650"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="650"].aos-animate,body[data-aos-delay="650"] [data-aos].aos-animate{transition-delay:.65s}[data-aos][data-aos][data-aos-duration="700"],body[data-aos-duration="700"] [data-aos]{transition-duration:.7s}[data-aos][data-aos][data-aos-delay="700"],body[data-aos-delay="700"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="700"].aos-animate,body[data-aos-delay="700"] [data-aos].aos-animate{transition-delay:.7s}[data-aos][data-aos][data-aos-duration="750"],body[data-aos-duration="750"] [data-aos]{transition-duration:.75s}[data-aos][data-aos][data-aos-delay="750"],body[data-aos-delay="750"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="750"].aos-animate,body[data-aos-delay="750"] [data-aos].aos-animate{transition-delay:.75s}[data-aos][data-aos][data-aos-duration="800"],body[data-aos-duration="800"] [data-aos]{transition-duration:.8s}[data-aos][data-aos][data-aos-delay="800"],body[data-aos-delay="800"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="800"].aos-animate,body[data-aos-delay="800"] [data-aos].aos-animate{transition-delay:.8s}[data-aos][data-aos][data-aos-duration="850"],body[data-aos-duration="850"] [data-aos]{transition-duration:.85s}[data-aos][data-aos][data-aos-delay="850"],body[data-aos-delay="850"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="850"].aos-animate,body[data-aos-delay="850"] [data-aos].aos-animate{transition-delay:.85s}[data-aos][data-aos][data-aos-duration="900"],body[data-aos-duration="900"] [data-aos]{transition-duration:.9s}[data-aos][data-aos][data-aos-delay="900"],body[data-aos-delay="900"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="900"].aos-animate,body[data-aos-delay="900"] [data-aos].aos-animate{transition-delay:.9s}[data-aos][data-aos][data-aos-duration="950"],body[data-aos-duration="950"] [data-aos]{transition-duration:.95s}[data-aos][data-aos][data-aos-delay="950"],body[data-aos-delay="950"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="950"].aos-animate,body[data-aos-delay="950"] [data-aos].aos-animate{transition-delay:.95s}[data-aos][data-aos][data-aos-duration="1000"],body[data-aos-duration="1000"] [data-aos]{transition-duration:1s}[data-aos][data-aos][data-aos-delay="1000"],body[data-aos-delay="1000"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1000"].aos-animate,body[data-aos-delay="1000"] [data-aos].aos-animate{transition-delay:1s}[data-aos][data-aos][data-aos-duration="1050"],body[data-aos-duration="1050"] [data-aos]{transition-duration:1.05s}[data-aos][data-aos][data-aos-delay="1050"],body[data-aos-delay="1050"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1050"].aos-animate,body[data-aos-delay="1050"] [data-aos].aos-animate{transition-delay:1.05s}[data-aos][data-aos][data-aos-duration="1100"],body[data-aos-duration="1100"] [data-aos]{transition-duration:1.1s}[data-aos][data-aos][data-aos-delay="1100"],body[data-aos-delay="1100"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1100"].aos-animate,body[data-aos-delay="1100"] [data-aos].aos-animate{transition-delay:1.1s}[data-aos][data-aos][data-aos-duration="1150"],body[data-aos-duration="1150"] [data-aos]{transition-duration:1.15s}[data-aos][data-aos][data-aos-delay="1150"],body[data-aos-delay="1150"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1150"].aos-animate,body[data-aos-delay="1150"] [data-aos].aos-animate{transition-delay:1.15s}[data-aos][data-aos][data-aos-duration="1200"],body[data-aos-duration="1200"] [data-aos]{transition-duration:1.2s}[data-aos][data-aos][data-aos-delay="1200"],body[data-aos-delay="1200"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1200"].aos-animate,body[data-aos-delay="1200"] [data-aos].aos-animate{transition-delay:1.2s}[data-aos][data-aos][data-aos-duration="1250"],body[data-aos-duration="1250"] [data-aos]{transition-duration:1.25s}[data-aos][data-aos][data-aos-delay="1250"],body[data-aos-delay="1250"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1250"].aos-animate,body[data-aos-delay="1250"] [data-aos].aos-animate{transition-delay:1.25s}[data-aos][data-aos][data-aos-duration="1300"],body[data-aos-duration="1300"] [data-aos]{transition-duration:1.3s}[data-aos][data-aos][data-aos-delay="1300"],body[data-aos-delay="1300"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1300"].aos-animate,body[data-aos-delay="1300"] [data-aos].aos-animate{transition-delay:1.3s}[data-aos][data-aos][data-aos-duration="1350"],body[data-aos-duration="1350"] [data-aos]{transition-duration:1.35s}[data-aos][data-aos][data-aos-delay="1350"],body[data-aos-delay="1350"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1350"].aos-animate,body[data-aos-delay="1350"] [data-aos].aos-animate{transition-delay:1.35s}[data-aos][data-aos][data-aos-duration="1400"],body[data-aos-duration="1400"] [data-aos]{transition-duration:1.4s}[data-aos][data-aos][data-aos-delay="1400"],body[data-aos-delay="1400"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1400"].aos-animate,body[data-aos-delay="1400"] [data-aos].aos-animate{transition-delay:1.4s}[data-aos][data-aos][data-aos-duration="1450"],body[data-aos-duration="1450"] [data-aos]{transition-duration:1.45s}[data-aos][data-aos][data-aos-delay="1450"],body[data-aos-delay="1450"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1450"].aos-animate,body[data-aos-delay="1450"] [data-aos].aos-animate{transition-delay:1.45s}[data-aos][data-aos][data-aos-duration="1500"],body[data-aos-duration="1500"] [data-aos]{transition-duration:1.5s}[data-aos][data-aos][data-aos-delay="1500"],body[data-aos-delay="1500"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1500"].aos-animate,body[data-aos-delay="1500"] [data-aos].aos-animate{transition-delay:1.5s}[data-aos][data-aos][data-aos-duration="1550"],body[data-aos-duration="1550"] [data-aos]{transition-duration:1.55s}[data-aos][data-aos][data-aos-delay="1550"],body[data-aos-delay="1550"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1550"].aos-animate,body[data-aos-delay="1550"] [data-aos].aos-animate{transition-delay:1.55s}[data-aos][data-aos][data-aos-duration="1600"],body[data-aos-duration="1600"] [data-aos]{transition-duration:1.6s}[data-aos][data-aos][data-aos-delay="1600"],body[data-aos-delay="1600"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1600"].aos-animate,body[data-aos-delay="1600"] [data-aos].aos-animate{transition-delay:1.6s}[data-aos][data-aos][data-aos-duration="1650"],body[data-aos-duration="1650"] [data-aos]{transition-duration:1.65s}[data-aos][data-aos][data-aos-delay="1650"],body[data-aos-delay="1650"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1650"].aos-animate,body[data-aos-delay="1650"] [data-aos].aos-animate{transition-delay:1.65s}[data-aos][data-aos][data-aos-duration="1700"],body[data-aos-duration="1700"] [data-aos]{transition-duration:1.7s}[data-aos][data-aos][data-aos-delay="1700"],body[data-aos-delay="1700"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1700"].aos-animate,body[data-aos-delay="1700"] [data-aos].aos-animate{transition-delay:1.7s}[data-aos][data-aos][data-aos-duration="1750"],body[data-aos-duration="1750"] [data-aos]{transition-duration:1.75s}[data-aos][data-aos][data-aos-delay="1750"],body[data-aos-delay="1750"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1750"].aos-animate,body[data-aos-delay="1750"] [data-aos].aos-animate{transition-delay:1.75s}[data-aos][data-aos][data-aos-duration="1800"],body[data-aos-duration="1800"] [data-aos]{transition-duration:1.8s}[data-aos][data-aos][data-aos-delay="1800"],body[data-aos-delay="1800"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1800"].aos-animate,body[data-aos-delay="1800"] [data-aos].aos-animate{transition-delay:1.8s}[data-aos][data-aos][data-aos-duration="1850"],body[data-aos-duration="1850"] [data-aos]{transition-duration:1.85s}[data-aos][data-aos][data-aos-delay="1850"],body[data-aos-delay="1850"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1850"].aos-animate,body[data-aos-delay="1850"] [data-aos].aos-animate{transition-delay:1.85s}[data-aos][data-aos][data-aos-duration="1900"],body[data-aos-duration="1900"] [data-aos]{transition-duration:1.9s}[data-aos][data-aos][data-aos-delay="1900"],body[data-aos-delay="1900"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1900"].aos-animate,body[data-aos-delay="1900"] [data-aos].aos-animate{transition-delay:1.9s}[data-aos][data-aos][data-aos-duration="1950"],body[data-aos-duration="1950"] [data-aos]{transition-duration:1.95s}[data-aos][data-aos][data-aos-delay="1950"],body[data-aos-delay="1950"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1950"].aos-animate,body[data-aos-delay="1950"] [data-aos].aos-animate{transition-delay:1.95s}[data-aos][data-aos][data-aos-duration="2000"],body[data-aos-duration="2000"] [data-aos]{transition-duration:2s}[data-aos][data-aos][data-aos-delay="2000"],body[data-aos-delay="2000"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2000"].aos-animate,body[data-aos-delay="2000"] [data-aos].aos-animate{transition-delay:2s}[data-aos][data-aos][data-aos-duration="2050"],body[data-aos-duration="2050"] [data-aos]{transition-duration:2.05s}[data-aos][data-aos][data-aos-delay="2050"],body[data-aos-delay="2050"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2050"].aos-animate,body[data-aos-delay="2050"] [data-aos].aos-animate{transition-delay:2.05s}[data-aos][data-aos][data-aos-duration="2100"],body[data-aos-duration="2100"] [data-aos]{transition-duration:2.1s}[data-aos][data-aos][data-aos-delay="2100"],body[data-aos-delay="2100"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2100"].aos-animate,body[data-aos-delay="2100"] [data-aos].aos-animate{transition-delay:2.1s}[data-aos][data-aos][data-aos-duration="2150"],body[data-aos-duration="2150"] [data-aos]{transition-duration:2.15s}[data-aos][data-aos][data-aos-delay="2150"],body[data-aos-delay="2150"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2150"].aos-animate,body[data-aos-delay="2150"] [data-aos].aos-animate{transition-delay:2.15s}[data-aos][data-aos][data-aos-duration="2200"],body[data-aos-duration="2200"] [data-aos]{transition-duration:2.2s}[data-aos][data-aos][data-aos-delay="2200"],body[data-aos-delay="2200"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2200"].aos-animate,body[data-aos-delay="2200"] [data-aos].aos-animate{transition-delay:2.2s}[data-aos][data-aos][data-aos-duration="2250"],body[data-aos-duration="2250"] [data-aos]{transition-duration:2.25s}[data-aos][data-aos][data-aos-delay="2250"],body[data-aos-delay="2250"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2250"].aos-animate,body[data-aos-delay="2250"] [data-aos].aos-animate{transition-delay:2.25s}[data-aos][data-aos][data-aos-duration="2300"],body[data-aos-duration="2300"] [data-aos]{transition-duration:2.3s}[data-aos][data-aos][data-aos-delay="2300"],body[data-aos-delay="2300"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2300"].aos-animate,body[data-aos-delay="2300"] [data-aos].aos-animate{transition-delay:2.3s}[data-aos][data-aos][data-aos-duration="2350"],body[data-aos-duration="2350"] [data-aos]{transition-duration:2.35s}[data-aos][data-aos][data-aos-delay="2350"],body[data-aos-delay="2350"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2350"].aos-animate,body[data-aos-delay="2350"] [data-aos].aos-animate{transition-delay:2.35s}[data-aos][data-aos][data-aos-duration="2400"],body[data-aos-duration="2400"] [data-aos]{transition-duration:2.4s}[data-aos][data-aos][data-aos-delay="2400"],body[data-aos-delay="2400"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2400"].aos-animate,body[data-aos-delay="2400"] [data-aos].aos-animate{transition-delay:2.4s}[data-aos][data-aos][data-aos-duration="2450"],body[data-aos-duration="2450"] [data-aos]{transition-duration:2.45s}[data-aos][data-aos][data-aos-delay="2450"],body[data-aos-delay="2450"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2450"].aos-animate,body[data-aos-delay="2450"] [data-aos].aos-animate{transition-delay:2.45s}[data-aos][data-aos][data-aos-duration="2500"],body[data-aos-duration="2500"] [data-aos]{transition-duration:2.5s}[data-aos][data-aos][data-aos-delay="2500"],body[data-aos-delay="2500"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2500"].aos-animate,body[data-aos-delay="2500"] [data-aos].aos-animate{transition-delay:2.5s}[data-aos][data-aos][data-aos-duration="2550"],body[data-aos-duration="2550"] [data-aos]{transition-duration:2.55s}[data-aos][data-aos][data-aos-delay="2550"],body[data-aos-delay="2550"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2550"].aos-animate,body[data-aos-delay="2550"] [data-aos].aos-animate{transition-delay:2.55s}[data-aos][data-aos][data-aos-duration="2600"],body[data-aos-duration="2600"] [data-aos]{transition-duration:2.6s}[data-aos][data-aos][data-aos-delay="2600"],body[data-aos-delay="2600"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2600"].aos-animate,body[data-aos-delay="2600"] [data-aos].aos-animate{transition-delay:2.6s}[data-aos][data-aos][data-aos-duration="2650"],body[data-aos-duration="2650"] [data-aos]{transition-duration:2.65s}[data-aos][data-aos][data-aos-delay="2650"],body[data-aos-delay="2650"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2650"].aos-animate,body[data-aos-delay="2650"] [data-aos].aos-animate{transition-delay:2.65s}[data-aos][data-aos][data-aos-duration="2700"],body[data-aos-duration="2700"] [data-aos]{transition-duration:2.7s}[data-aos][data-aos][data-aos-delay="2700"],body[data-aos-delay="2700"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2700"].aos-animate,body[data-aos-delay="2700"] [data-aos].aos-animate{transition-delay:2.7s}[data-aos][data-aos][data-aos-duration="2750"],body[data-aos-duration="2750"] [data-aos]{transition-duration:2.75s}[data-aos][data-aos][data-aos-delay="2750"],body[data-aos-delay="2750"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2750"].aos-animate,body[data-aos-delay="2750"] [data-aos].aos-animate{transition-delay:2.75s}[data-aos][data-aos][data-aos-duration="2800"],body[data-aos-duration="2800"] [data-aos]{transition-duration:2.8s}[data-aos][data-aos][data-aos-delay="2800"],body[data-aos-delay="2800"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2800"].aos-animate,body[data-aos-delay="2800"] [data-aos].aos-animate{transition-delay:2.8s}[data-aos][data-aos][data-aos-duration="2850"],body[data-aos-duration="2850"] [data-aos]{transition-duration:2.85s}[data-aos][data-aos][data-aos-delay="2850"],body[data-aos-delay="2850"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2850"].aos-animate,body[data-aos-delay="2850"] [data-aos].aos-animate{transition-delay:2.85s}[data-aos][data-aos][data-aos-duration="2900"],body[data-aos-duration="2900"] [data-aos]{transition-duration:2.9s}[data-aos][data-aos][data-aos-delay="2900"],body[data-aos-delay="2900"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2900"].aos-animate,body[data-aos-delay="2900"] [data-aos].aos-animate{transition-delay:2.9s}[data-aos][data-aos][data-aos-duration="2950"],body[data-aos-duration="2950"] [data-aos]{transition-duration:2.95s}[data-aos][data-aos][data-aos-delay="2950"],body[data-aos-delay="2950"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2950"].aos-animate,body[data-aos-delay="2950"] [data-aos].aos-animate{transition-delay:2.95s}[data-aos][data-aos][data-aos-duration="3000"],body[data-aos-duration="3000"] [data-aos]{transition-duration:3s}[data-aos][data-aos][data-aos-delay="3000"],body[data-aos-delay="3000"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="3000"].aos-animate,body[data-aos-delay="3000"] [data-aos].aos-animate{transition-delay:3s}[data-aos][data-aos][data-aos-easing=linear],body[data-aos-easing=linear] [data-aos]{transition-timing-function:cubic-bezier(.25,.25,.75,.75)}[data-aos][data-aos][data-aos-easing=ease],body[data-aos-easing=ease] [data-aos]{transition-timing-function:ease}[data-aos][data-aos][data-aos-easing=ease-in],body[data-aos-easing=ease-in] [data-aos]{transition-timing-function:ease-in}[data-aos][data-aos][data-aos-easing=ease-out],body[data-aos-easing=ease-out] [data-aos]{transition-timing-function:ease-out}[data-aos][data-aos][data-aos-easing=ease-in-out],body[data-aos-easing=ease-in-out] [data-aos]{transition-timing-function:ease-in-out}[data-aos][data-aos][data-aos-easing=ease-in-back],body[data-aos-easing=ease-in-back] [data-aos]{transition-timing-function:cubic-bezier(.6,-.28,.735,.045)}[data-aos][data-aos][data-aos-easing=ease-out-back],body[data-aos-easing=ease-out-back] [data-aos]{transition-timing-function:cubic-bezier(.175,.885,.32,1.275)}[data-aos][data-aos][data-aos-easing=ease-in-out-back],body[data-aos-easing=ease-in-out-back] [data-aos]{transition-timing-function:cubic-bezier(.68,-.55,.265,1.55)}[data-aos][data-aos][data-aos-easing=ease-in-sine],body[data-aos-easing=ease-in-sine] [data-aos]{transition-timing-function:cubic-bezier(.47,0,.745,.715)}[data-aos][data-aos][data-aos-easing=ease-out-sine],body[data-aos-easing=ease-out-sine] [data-aos]{transition-timing-function:cubic-bezier(.39,.575,.565,1)}[data-aos][data-aos][data-aos-easing=ease-in-out-sine],body[data-aos-easing=ease-in-out-sine] [data-aos]{transition-timing-function:cubic-bezier(.445,.05,.55,.95)}[data-aos][data-aos][data-aos-easing=ease-in-quad],body[data-aos-easing=ease-in-quad] [data-aos]{transition-timing-function:cubic-bezier(.55,.085,.68,.53)}[data-aos][data-aos][data-aos-easing=ease-out-quad],body[data-aos-easing=ease-out-quad] [data-aos]{transition-timing-function:cubic-bezier(.25,.46,.45,.94)}[data-aos][data-aos][data-aos-easing=ease-in-out-quad],body[data-aos-easing=ease-in-out-quad] [data-aos]{transition-timing-function:cubic-bezier(.455,.03,.515,.955)}[data-aos][data-aos][data-aos-easing=ease-in-cubic],body[data-aos-easing=ease-in-cubic] [data-aos]{transition-timing-function:cubic-bezier(.55,.085,.68,.53)}[data-aos][data-aos][data-aos-easing=ease-out-cubic],body[data-aos-easing=ease-out-cubic] [data-aos]{transition-timing-function:cubic-bezier(.25,.46,.45,.94)}[data-aos][data-aos][data-aos-easing=ease-in-out-cubic],body[data-aos-easing=ease-in-out-cubic] [data-aos]{transition-timing-function:cubic-bezier(.455,.03,.515,.955)}[data-aos][data-aos][data-aos-easing=ease-in-quart],body[data-aos-easing=ease-in-quart] [data-aos]{transition-timing-function:cubic-bezier(.55,.085,.68,.53)}[data-aos][data-aos][data-aos-easing=ease-out-quart],body[data-aos-easing=ease-out-quart] [data-aos]{transition-timing-function:cubic-bezier(.25,.46,.45,.94)}[data-aos][data-aos][data-aos-easing=ease-in-out-quart],body[data-aos-easing=ease-in-out-quart] [data-aos]{transition-timing-function:cubic-bezier(.455,.03,.515,.955)}[data-aos^=fade][data-aos^=fade]{opacity:0;transition-property:opacity,transform}[data-aos^=fade][data-aos^=fade].aos-animate{opacity:1;transform:translateZ(0)}[data-aos=fade-up]{transform:translate3d(0,100px,0)}[data-aos=fade-down]{transform:translate3d(0,-100px,0)}[data-aos=fade-right]{transform:translate3d(-100px,0,0)}[data-aos=fade-left]{transform:translate3d(100px,0,0)}[data-aos=fade-up-right]{transform:translate3d(-100px,100px,0)}[data-aos=fade-up-left]{transform:translate3d(100px,100px,0)}[data-aos=fade-down-right]{transform:translate3d(-100px,-100px,0)}[data-aos=fade-down-left]{transform:translate3d(100px,-100px,0)}[data-aos^=zoom][data-aos^=zoom]{opacity:0;transition-property:opacity,transform}[data-aos^=zoom][data-aos^=zoom].aos-animate{opacity:1;transform:translateZ(0) scale(1)}[data-aos=zoom-in]{transform:scale(.6)}[data-aos=zoom-in-up]{transform:translate3d(0,100px,0) scale(.6)}[data-aos=zoom-in-down]{transform:translate3d(0,-100px,0) scale(.6)}[data-aos=zoom-in-right]{transform:translate3d(-100px,0,0) scale(.6)}[data-aos=zoom-in-left]{transform:translate3d(100px,0,0) scale(.6)}[data-aos=zoom-out]{transform:scale(1.2)}[data-aos=zoom-out-up]{transform:translate3d(0,100px,0) scale(1.2)}[data-aos=zoom-out-down]{transform:translate3d(0,-100px,0) scale(1.2)}[data-aos=zoom-out-right]{transform:translate3d(-100px,0,0) scale(1.2)}[data-aos=zoom-out-left]{transform:translate3d(100px,0,0) scale(1.2)}[data-aos^=slide][data-aos^=slide]{transition-property:transform}[data-aos^=slide][data-aos^=slide].aos-animate{transform:translateZ(0)}[data-aos=slide-up]{transform:translate3d(0,100%,0)}[data-aos=slide-down]{transform:translate3d(0,-100%,0)}[data-aos=slide-right]{transform:translate3d(-100%,0,0)}[data-aos=slide-left]{transform:translate3d(100%,0,0)}[data-aos^=flip][data-aos^=flip]{backface-visibility:hidden;transition-property:transform}[data-aos=flip-left]{transform:perspective(2500px) rotateY(-100deg)}[data-aos=flip-left].aos-animate{transform:perspective(2500px) rotateY(0)}[data-aos=flip-right]{transform:perspective(2500px) rotateY(100deg)}[data-aos=flip-right].aos-animate{transform:perspective(2500px) rotateY(0)}[data-aos=flip-up]{transform:perspective(2500px) rotateX(-100deg)}[data-aos=flip-up].aos-animate{transform:perspective(2500px) rotateX(0)}[data-aos=flip-down]{transform:perspective(2500px) rotateX(100deg)}[data-aos=flip-down].aos-animate{transform:perspective(2500px) rotateX(0)}
|
fruitful-shortcodes-2.0.0/assets/libs/aos/aos.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
/*ver 2.3.4*/
|
2 |
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AOS=t():e.AOS=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="dist/",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=n(1),a=(o(r),n(6)),u=o(a),c=n(7),s=o(c),f=n(8),d=o(f),l=n(9),p=o(l),m=n(10),b=o(m),v=n(11),y=o(v),g=n(14),h=o(g),w=[],k=!1,x={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,startEvent:"DOMContentLoaded",throttleDelay:99,debounceDelay:50,disableMutationObserver:!1},j=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e&&(k=!0),k)return w=(0,y.default)(w,x),(0,b.default)(w,x.once),w},O=function(){w=(0,h.default)(),j()},M=function(){w.forEach(function(e,t){e.node.removeAttribute("data-aos"),e.node.removeAttribute("data-aos-easing"),e.node.removeAttribute("data-aos-duration"),e.node.removeAttribute("data-aos-delay")})},S=function(e){return e===!0||"mobile"===e&&p.default.mobile()||"phone"===e&&p.default.phone()||"tablet"===e&&p.default.tablet()||"function"==typeof e&&e()===!0},_=function(e){x=i(x,e),w=(0,h.default)();var t=document.all&&!window.atob;return S(x.disable)||t?M():(x.disableMutationObserver||d.default.isSupported()||(console.info('\n aos: MutationObserver is not supported on this browser,\n code mutations observing has been disabled.\n You may have to call "refreshHard()" by yourself.\n '),x.disableMutationObserver=!0),document.querySelector("body").setAttribute("data-aos-easing",x.easing),document.querySelector("body").setAttribute("data-aos-duration",x.duration),document.querySelector("body").setAttribute("data-aos-delay",x.delay),"DOMContentLoaded"===x.startEvent&&["complete","interactive"].indexOf(document.readyState)>-1?j(!0):"load"===x.startEvent?window.addEventListener(x.startEvent,function(){j(!0)}):document.addEventListener(x.startEvent,function(){j(!0)}),window.addEventListener("resize",(0,s.default)(j,x.debounceDelay,!0)),window.addEventListener("orientationchange",(0,s.default)(j,x.debounceDelay,!0)),window.addEventListener("scroll",(0,u.default)(function(){(0,b.default)(w,x.once)},x.throttleDelay)),x.disableMutationObserver||d.default.ready("[data-aos]",O),w)};e.exports={init:_,refresh:j,refreshHard:O}},function(e,t){},,,,,function(e,t){(function(t){"use strict";function n(e,t,n){function o(t){var n=b,o=v;return b=v=void 0,k=t,g=e.apply(o,n)}function r(e){return k=e,h=setTimeout(f,t),M?o(e):g}function a(e){var n=e-w,o=e-k,i=t-n;return S?j(i,y-o):i}function c(e){var n=e-w,o=e-k;return void 0===w||n>=t||n<0||S&&o>=y}function f(){var e=O();return c(e)?d(e):void(h=setTimeout(f,a(e)))}function d(e){return h=void 0,_&&b?o(e):(b=v=void 0,g)}function l(){void 0!==h&&clearTimeout(h),k=0,b=w=v=h=void 0}function p(){return void 0===h?g:d(O())}function m(){var e=O(),n=c(e);if(b=arguments,v=this,w=e,n){if(void 0===h)return r(w);if(S)return h=setTimeout(f,t),o(w)}return void 0===h&&(h=setTimeout(f,t)),g}var b,v,y,g,h,w,k=0,M=!1,S=!1,_=!0;if("function"!=typeof e)throw new TypeError(s);return t=u(t)||0,i(n)&&(M=!!n.leading,S="maxWait"in n,y=S?x(u(n.maxWait)||0,t):y,_="trailing"in n?!!n.trailing:_),m.cancel=l,m.flush=p,m}function o(e,t,o){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError(s);return i(o)&&(r="leading"in o?!!o.leading:r,a="trailing"in o?!!o.trailing:a),n(e,t,{leading:r,maxWait:t,trailing:a})}function i(e){var t="undefined"==typeof e?"undefined":c(e);return!!e&&("object"==t||"function"==t)}function r(e){return!!e&&"object"==("undefined"==typeof e?"undefined":c(e))}function a(e){return"symbol"==("undefined"==typeof e?"undefined":c(e))||r(e)&&k.call(e)==d}function u(e){if("number"==typeof e)return e;if(a(e))return f;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var n=m.test(e);return n||b.test(e)?v(e.slice(2),n?2:8):p.test(e)?f:+e}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s="Expected a function",f=NaN,d="[object Symbol]",l=/^\s+|\s+$/g,p=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,b=/^0o[0-7]+$/i,v=parseInt,y="object"==("undefined"==typeof t?"undefined":c(t))&&t&&t.Object===Object&&t,g="object"==("undefined"==typeof self?"undefined":c(self))&&self&&self.Object===Object&&self,h=y||g||Function("return this")(),w=Object.prototype,k=w.toString,x=Math.max,j=Math.min,O=function(){return h.Date.now()};e.exports=o}).call(t,function(){return this}())},function(e,t){(function(t){"use strict";function n(e,t,n){function i(t){var n=b,o=v;return b=v=void 0,O=t,g=e.apply(o,n)}function r(e){return O=e,h=setTimeout(f,t),M?i(e):g}function u(e){var n=e-w,o=e-O,i=t-n;return S?x(i,y-o):i}function s(e){var n=e-w,o=e-O;return void 0===w||n>=t||n<0||S&&o>=y}function f(){var e=j();return s(e)?d(e):void(h=setTimeout(f,u(e)))}function d(e){return h=void 0,_&&b?i(e):(b=v=void 0,g)}function l(){void 0!==h&&clearTimeout(h),O=0,b=w=v=h=void 0}function p(){return void 0===h?g:d(j())}function m(){var e=j(),n=s(e);if(b=arguments,v=this,w=e,n){if(void 0===h)return r(w);if(S)return h=setTimeout(f,t),i(w)}return void 0===h&&(h=setTimeout(f,t)),g}var b,v,y,g,h,w,O=0,M=!1,S=!1,_=!0;if("function"!=typeof e)throw new TypeError(c);return t=a(t)||0,o(n)&&(M=!!n.leading,S="maxWait"in n,y=S?k(a(n.maxWait)||0,t):y,_="trailing"in n?!!n.trailing:_),m.cancel=l,m.flush=p,m}function o(e){var t="undefined"==typeof e?"undefined":u(e);return!!e&&("object"==t||"function"==t)}function i(e){return!!e&&"object"==("undefined"==typeof e?"undefined":u(e))}function r(e){return"symbol"==("undefined"==typeof e?"undefined":u(e))||i(e)&&w.call(e)==f}function a(e){if("number"==typeof e)return e;if(r(e))return s;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(d,"");var n=p.test(e);return n||m.test(e)?b(e.slice(2),n?2:8):l.test(e)?s:+e}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c="Expected a function",s=NaN,f="[object Symbol]",d=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,m=/^0o[0-7]+$/i,b=parseInt,v="object"==("undefined"==typeof t?"undefined":u(t))&&t&&t.Object===Object&&t,y="object"==("undefined"==typeof self?"undefined":u(self))&&self&&self.Object===Object&&self,g=v||y||Function("return this")(),h=Object.prototype,w=h.toString,k=Math.max,x=Math.min,j=function(){return g.Date.now()};e.exports=n}).call(t,function(){return this}())},function(e,t){"use strict";function n(e){var t=void 0,o=void 0,i=void 0;for(t=0;t<e.length;t+=1){if(o=e[t],o.dataset&&o.dataset.aos)return!0;if(i=o.children&&n(o.children))return!0}return!1}function o(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function i(){return!!o()}function r(e,t){var n=window.document,i=o(),r=new i(a);u=t,r.observe(n.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}function a(e){e&&e.forEach(function(e){var t=Array.prototype.slice.call(e.addedNodes),o=Array.prototype.slice.call(e.removedNodes),i=t.concat(o);if(n(i))return u()})}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){};t.default={isSupported:i,ready:r}},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,a=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,u=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,c=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,s=function(){function e(){n(this,e)}return i(e,[{key:"phone",value:function(){var e=o();return!(!r.test(e)&&!a.test(e.substr(0,4)))}},{key:"mobile",value:function(){var e=o();return!(!u.test(e)&&!c.test(e.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}}]),e}();t.default=new s},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,n){var o=e.node.getAttribute("data-aos-once");t>e.position?e.node.classList.add("aos-animate"):"undefined"!=typeof o&&("false"===o||!n&&"true"!==o)&&e.node.classList.remove("aos-animate")},o=function(e,t){var o=window.pageYOffset,i=window.innerHeight;e.forEach(function(e,r){n(e,i+o,t)})};t.default=o},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),r=o(i),a=function(e,t){return e.forEach(function(e,n){e.node.classList.add("aos-init"),e.position=(0,r.default)(e.node,t.offset)}),e};t.default=a},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),r=o(i),a=function(e,t){var n=0,o=0,i=window.innerHeight,a={offset:e.getAttribute("data-aos-offset"),anchor:e.getAttribute("data-aos-anchor"),anchorPlacement:e.getAttribute("data-aos-anchor-placement")};switch(a.offset&&!isNaN(a.offset)&&(o=parseInt(a.offset)),a.anchor&&document.querySelectorAll(a.anchor)&&(e=document.querySelectorAll(a.anchor)[0]),n=(0,r.default)(e).top,a.anchorPlacement){case"top-bottom":break;case"center-bottom":n+=e.offsetHeight/2;break;case"bottom-bottom":n+=e.offsetHeight;break;case"top-center":n+=i/2;break;case"bottom-center":n+=i/2+e.offsetHeight;break;case"center-center":n+=i/2+e.offsetHeight/2;break;case"top-top":n+=i;break;case"bottom-top":n+=e.offsetHeight+i;break;case"center-top":n+=e.offsetHeight/2+i}return a.anchorPlacement||a.offset||isNaN(t)||(o=t),n+o};t.default=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-("BODY"!=e.tagName?e.scrollLeft:0),n+=e.offsetTop-("BODY"!=e.tagName?e.scrollTop:0),e=e.offsetParent;return{top:n,left:t}};t.default=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e=e||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(e,function(e){return{node:e}})};t.default=n}])});
|
fruitful-shortcodes-2.0.0/assets/libs/bootstrap/bootstrap-grid.css
CHANGED
@@ -8,14 +8,14 @@
|
|
8 |
width: device-width;
|
9 |
}
|
10 |
|
11 |
-
|
12 |
box-sizing: border-box;
|
13 |
-ms-overflow-style: scrollbar;
|
14 |
}
|
15 |
|
16 |
-
*,
|
17 |
-
*::before,
|
18 |
-
*::after {
|
19 |
box-sizing: inherit;
|
20 |
}
|
21 |
|
8 |
width: device-width;
|
9 |
}
|
10 |
|
11 |
+
.ff-root {
|
12 |
box-sizing: border-box;
|
13 |
-ms-overflow-style: scrollbar;
|
14 |
}
|
15 |
|
16 |
+
.ff-root *,
|
17 |
+
.ff-root *::before,
|
18 |
+
.ff-root *::after {
|
19 |
box-sizing: inherit;
|
20 |
}
|
21 |
|
fruitful-shortcodes-2.0.0/assets/libs/bootstrap/bootstrap-grid.min.css
CHANGED
@@ -1 +1,6 @@
|
|
1 |
-
html{box-sizing:border-box;-ms-overflow-style:scrollbar}*,::before,::after{box-sizing:inherit}.ff-container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width: 576px){.ff-container{max-width:540px}}@media (min-width: 768px){.ff-container{max-width:720px}}@media (min-width: 992px){.ff-container{max-width:960px}}@media (min-width: 1200px){.ff-container{max-width:1140px}}.ff-container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.ff-row{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.ff-no-gutters{margin-right:0;margin-left:0}.ff-no-gutters > .ff-col,.ff-no-gutters > [class*="col-"]{padding-right:0;padding-left:0}.ff-col-1,.ff-col-2,.ff-col-3,.ff-col-4,.ff-col-5,.ff-col-6,.ff-col-7,.ff-col-8,.ff-col-9,.ff-col-10,.ff-col-11,.ff-col-12,.ff-col,.ff-col-auto,.ff-col-sm-1,.ff-col-sm-2,.ff-col-sm-3,.ff-col-sm-4,.ff-col-sm-5,.ff-col-sm-6,.ff-col-sm-7,.ff-col-sm-8,.ff-col-sm-9,.ff-col-sm-10,.ff-col-sm-11,.ff-col-sm-12,.ff-col-sm,.ff-col-sm-auto,.ff-col-md-1,.ff-col-md-2,.ff-col-md-3,.ff-col-md-4,.ff-col-md-5,.ff-col-md-6,.ff-col-md-7,.ff-col-md-8,.ff-col-md-9,.ff-col-md-10,.ff-col-md-11,.ff-col-md-12,.ff-col-md,.ff-col-md-auto,.ff-col-lg-1,.ff-col-lg-2,.ff-col-lg-3,.ff-col-lg-4,.ff-col-lg-5,.ff-col-lg-6,.ff-col-lg-7,.ff-col-lg-8,.ff-col-lg-9,.ff-col-lg-10,.ff-col-lg-11,.ff-col-lg-12,.ff-col-lg,.ff-col-lg-auto,.ff-col-xl-1,.ff-col-xl-2,.ff-col-xl-3,.ff-col-xl-4,.ff-col-xl-5,.ff-col-xl-6,.ff-col-xl-7,.ff-col-xl-8,.ff-col-xl-9,.ff-col-xl-10,.ff-col-xl-11,.ff-col-xl-12,.ff-col-xl,.ff-col-xl-auto{position:relative;width:100%;min-height:1px;padding-right:15px;padding-left:15px}.ff-col{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.ff-col-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.ff-col-1{-webkit-box-flex:0;-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.ff-col-2{-webkit-box-flex:0;-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.ff-col-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.ff-col-4{-webkit-box-flex:0;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.ff-col-5{-webkit-box-flex:0;-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.ff-col-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.ff-col-7{-webkit-box-flex:0;-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.ff-col-8{-webkit-box-flex:0;-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.ff-col-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.ff-col-10{-webkit-box-flex:0;-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.ff-col-11{-webkit-box-flex:0;-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.ff-col-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.ff-order-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.ff-order-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.ff-order-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.ff-order-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.ff-order-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.ff-order-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.ff-order-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.ff-order-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.ff-order-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.ff-order-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.ff-order-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.ff-order-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.ff-order-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.ff-order-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.ff-order-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.ff-offset-1{margin-left:8.333333%}.ff-offset-2{margin-left:16.666667%}.ff-offset-3{margin-left:25%}.ff-offset-4{margin-left:33.333333%}.ff-offset-5{margin-left:41.666667%}.ff-offset-6{margin-left:50%}.ff-offset-7{margin-left:58.333333%}.ff-offset-8{margin-left:66.666667%}.ff-offset-9{margin-left:75%}.ff-offset-10{margin-left:83.333333%}.ff-offset-11{margin-left:91.666667%}@media (min-width: 576px){.ff-col-sm{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.ff-col-sm-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.ff-col-sm-1{-webkit-box-flex:0;-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.ff-col-sm-2{-webkit-box-flex:0;-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.ff-col-sm-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.ff-col-sm-4{-webkit-box-flex:0;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.ff-col-sm-5{-webkit-box-flex:0;-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.ff-col-sm-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.ff-col-sm-7{-webkit-box-flex:0;-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.ff-col-sm-8{-webkit-box-flex:0;-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.ff-col-sm-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.ff-col-sm-10{-webkit-box-flex:0;-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.ff-col-sm-11{-webkit-box-flex:0;-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.ff-col-sm-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.ff-order-sm-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.ff-order-sm-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.ff-order-sm-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.ff-order-sm-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.ff-order-sm-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.ff-order-sm-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.ff-order-sm-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.ff-order-sm-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.ff-order-sm-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.ff-order-sm-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.ff-order-sm-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.ff-order-sm-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.ff-order-sm-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.ff-order-sm-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.ff-order-sm-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.ff-offset-sm-0{margin-left:0}.ff-offset-sm-1{margin-left:8.333333%}.ff-offset-sm-2{margin-left:16.666667%}.ff-offset-sm-3{margin-left:25%}.ff-offset-sm-4{margin-left:33.333333%}.ff-offset-sm-5{margin-left:41.666667%}.ff-offset-sm-6{margin-left:50%}.ff-offset-sm-7{margin-left:58.333333%}.ff-offset-sm-8{margin-left:66.666667%}.ff-offset-sm-9{margin-left:75%}.ff-offset-sm-10{margin-left:83.333333%}.ff-offset-sm-11{margin-left:91.666667%}}@media (min-width: 768px){.ff-col-md{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.ff-col-md-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.ff-col-md-1{-webkit-box-flex:0;-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.ff-col-md-2{-webkit-box-flex:0;-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.ff-col-md-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.ff-col-md-4{-webkit-box-flex:0;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.ff-col-md-5{-webkit-box-flex:0;-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.ff-col-md-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.ff-col-md-7{-webkit-box-flex:0;-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.ff-col-md-8{-webkit-box-flex:0;-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.ff-col-md-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.ff-col-md-10{-webkit-box-flex:0;-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.ff-col-md-11{-webkit-box-flex:0;-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.ff-col-md-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.ff-order-md-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.ff-order-md-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.ff-order-md-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.ff-order-md-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.ff-order-md-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.ff-order-md-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.ff-order-md-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.ff-order-md-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.ff-order-md-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.ff-order-md-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.ff-order-md-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.ff-order-md-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.ff-order-md-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.ff-order-md-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.ff-order-md-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.ff-offset-md-0{margin-left:0}.ff-offset-md-1{margin-left:8.333333%}.ff-offset-md-2{margin-left:16.666667%}.ff-offset-md-3{margin-left:25%}.ff-offset-md-4{margin-left:33.333333%}.ff-offset-md-5{margin-left:41.666667%}.ff-offset-md-6{margin-left:50%}.ff-offset-md-7{margin-left:58.333333%}.ff-offset-md-8{margin-left:66.666667%}.ff-offset-md-9{margin-left:75%}.ff-offset-md-10{margin-left:83.333333%}.ff-offset-md-11{margin-left:91.666667%}}@media (min-width: 992px){.ff-col-lg{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.ff-col-lg-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.ff-col-lg-1{-webkit-box-flex:0;-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.ff-col-lg-2{-webkit-box-flex:0;-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.ff-col-lg-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.ff-col-lg-4{-webkit-box-flex:0;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.ff-col-lg-5{-webkit-box-flex:0;-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.ff-col-lg-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.ff-col-lg-7{-webkit-box-flex:0;-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.ff-col-lg-8{-webkit-box-flex:0;-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.ff-col-lg-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.ff-col-lg-10{-webkit-box-flex:0;-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.ff-col-lg-11{-webkit-box-flex:0;-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.ff-col-lg-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.ff-order-lg-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.ff-order-lg-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.ff-order-lg-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.ff-order-lg-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.ff-order-lg-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.ff-order-lg-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.ff-order-lg-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.ff-order-lg-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.ff-order-lg-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.ff-order-lg-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.ff-order-lg-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.ff-order-lg-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.ff-order-lg-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.ff-order-lg-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.ff-order-lg-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.ff-offset-lg-0{margin-left:0}.ff-offset-lg-1{margin-left:8.333333%}.ff-offset-lg-2{margin-left:16.666667%}.ff-offset-lg-3{margin-left:25%}.ff-offset-lg-4{margin-left:33.333333%}.ff-offset-lg-5{margin-left:41.666667%}.ff-offset-lg-6{margin-left:50%}.ff-offset-lg-7{margin-left:58.333333%}.ff-offset-lg-8{margin-left:66.666667%}.ff-offset-lg-9{margin-left:75%}.ff-offset-lg-10{margin-left:83.333333%}.ff-offset-lg-11{margin-left:91.666667%}}@media (min-width: 1200px){.ff-col-xl{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.ff-col-xl-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.ff-col-xl-1{-webkit-box-flex:0;-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.ff-col-xl-2{-webkit-box-flex:0;-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.ff-col-xl-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.ff-col-xl-4{-webkit-box-flex:0;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.ff-col-xl-5{-webkit-box-flex:0;-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.ff-col-xl-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.ff-col-xl-7{-webkit-box-flex:0;-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.ff-col-xl-8{-webkit-box-flex:0;-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.ff-col-xl-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.ff-col-xl-10{-webkit-box-flex:0;-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.ff-col-xl-11{-webkit-box-flex:0;-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.ff-col-xl-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.ff-order-xl-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.ff-order-xl-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.ff-order-xl-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.ff-order-xl-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.ff-order-xl-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.ff-order-xl-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.ff-order-xl-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.ff-order-xl-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.ff-order-xl-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.ff-order-xl-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.ff-order-xl-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.ff-order-xl-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.ff-order-xl-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.ff-order-xl-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.ff-order-xl-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.ff-offset-xl-0{margin-left:0}.ff-offset-xl-1{margin-left:8.333333%}.ff-offset-xl-2{margin-left:16.666667%}.ff-offset-xl-3{margin-left:25%}.ff-offset-xl-4{margin-left:33.333333%}.ff-offset-xl-5{margin-left:41.666667%}.ff-offset-xl-6{margin-left:50%}.ff-offset-xl-7{margin-left:58.333333%}.ff-offset-xl-8{margin-left:66.666667%}.ff-offset-xl-9{margin-left:75%}.ff-offset-xl-10{margin-left:83.333333%}.ff-offset-xl-11{margin-left:91.666667%}}.ff-d-none{display:none!important}.ff-d-inline{display:inline!important}.ff-d-inline-block{display:inline-block!important}.ff-d-block{display:block!important}.ff-d-table{display:table!important}.ff-d-table-row{display:table-row!important}.ff-d-table-cell{display:table-cell!important}.ff-d-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ff-d-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}@media (min-width: 576px){.ff-d-sm-none{display:none!important}.ff-d-sm-inline{display:inline!important}.ff-d-sm-inline-block{display:inline-block!important}.ff-d-sm-block{display:block!important}.ff-d-sm-table{display:table!important}.ff-d-sm-table-row{display:table-row!important}.ff-d-sm-table-cell{display:table-cell!important}.ff-d-sm-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ff-d-sm-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width: 768px){.ff-d-md-none{display:none!important}.ff-d-md-inline{display:inline!important}.ff-d-md-inline-block{display:inline-block!important}.ff-d-md-block{display:block!important}.ff-d-md-table{display:table!important}.ff-d-md-table-row{display:table-row!important}.ff-d-md-table-cell{display:table-cell!important}.ff-d-md-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ff-d-md-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width: 992px){.ff-d-lg-none{display:none!important}.ff-d-lg-inline{display:inline!important}.ff-d-lg-inline-block{display:inline-block!important}.ff-d-lg-block{display:block!important}.ff-d-lg-table{display:table!important}.ff-d-lg-table-row{display:table-row!important}.ff-d-lg-table-cell{display:table-cell!important}.ff-d-lg-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ff-d-lg-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width: 1200px){.ff-d-xl-none{display:none!important}.ff-d-xl-inline{display:inline!important}.ff-d-xl-inline-block{display:inline-block!important}.ff-d-xl-block{display:block!important}.ff-d-xl-table{display:table!important}.ff-d-xl-table-row{display:table-row!important}.ff-d-xl-table-cell{display:table-cell!important}.ff-d-xl-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ff-d-xl-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media print{.ff-d-print-none{display:none!important}.ff-d-print-inline{display:inline!important}.ff-d-print-inline-block{display:inline-block!important}.ff-d-print-block{display:block!important}.ff-d-print-table{display:table!important}.ff-d-print-table-row{display:table-row!important}.ff-d-print-table-cell{display:table-cell!important}.ff-d-print-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ff-d-print-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}.ff-flex-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-ms-flex-direction:row!important;flex-direction:row!important}.ff-flex-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.ff-flex-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.ff-flex-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.ff-flex-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.ff-flex-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.ff-flex-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.ff-justify-content-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.ff-justify-content-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.ff-justify-content-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.ff-justify-content-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.ff-justify-content-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.ff-align-items-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.ff-align-items-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.ff-align-items-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.ff-align-items-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.ff-align-items-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.ff-align-content-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.ff-align-content-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.ff-align-content-center{-ms-flex-line-pack:center!important;align-content:center!important}.ff-align-content-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.ff-align-content-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.ff-align-content-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.ff-align-self-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.ff-align-self-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.ff-align-self-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.ff-align-self-center{-ms-flex-item-align:center!important;align-self:center!important}.ff-align-self-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.ff-align-self-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}@media (min-width: 576px){.ff-flex-sm-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-ms-flex-direction:row!important;flex-direction:row!important}.ff-flex-sm-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.ff-flex-sm-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.ff-flex-sm-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.ff-flex-sm-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.ff-flex-sm-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.ff-flex-sm-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.ff-justify-content-sm-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.ff-justify-content-sm-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.ff-justify-content-sm-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.ff-justify-content-sm-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.ff-justify-content-sm-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.ff-align-items-sm-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.ff-align-items-sm-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.ff-align-items-sm-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.ff-align-items-sm-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.ff-align-items-sm-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.ff-align-content-sm-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.ff-align-content-sm-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.ff-align-content-sm-center{-ms-flex-line-pack:center!important;align-content:center!important}.ff-align-content-sm-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.ff-align-content-sm-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.ff-align-content-sm-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.ff-align-self-sm-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.ff-align-self-sm-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.ff-align-self-sm-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.ff-align-self-sm-center{-ms-flex-item-align:center!important;align-self:center!important}.ff-align-self-sm-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.ff-align-self-sm-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width: 768px){.ff-flex-md-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-ms-flex-direction:row!important;flex-direction:row!important}.ff-flex-md-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.ff-flex-md-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.ff-flex-md-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.ff-flex-md-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.ff-flex-md-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.ff-flex-md-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.ff-justify-content-md-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.ff-justify-content-md-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.ff-justify-content-md-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.ff-justify-content-md-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.ff-justify-content-md-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.ff-align-items-md-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.ff-align-items-md-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.ff-align-items-md-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.ff-align-items-md-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.ff-align-items-md-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.ff-align-content-md-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.ff-align-content-md-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.ff-align-content-md-center{-ms-flex-line-pack:center!important;align-content:center!important}.ff-align-content-md-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.ff-align-content-md-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.ff-align-content-md-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.ff-align-self-md-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.ff-align-self-md-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.ff-align-self-md-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.ff-align-self-md-center{-ms-flex-item-align:center!important;align-self:center!important}.ff-align-self-md-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.ff-align-self-md-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width: 992px){.ff-flex-lg-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-ms-flex-direction:row!important;flex-direction:row!important}.ff-flex-lg-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.ff-flex-lg-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.ff-flex-lg-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.ff-flex-lg-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.ff-flex-lg-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.ff-flex-lg-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.ff-justify-content-lg-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.ff-justify-content-lg-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.ff-justify-content-lg-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.ff-justify-content-lg-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.ff-justify-content-lg-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.ff-align-items-lg-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.ff-align-items-lg-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.ff-align-items-lg-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.ff-align-items-lg-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.ff-align-items-lg-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.ff-align-content-lg-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.ff-align-content-lg-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.ff-align-content-lg-center{-ms-flex-line-pack:center!important;align-content:center!important}.ff-align-content-lg-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.ff-align-content-lg-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.ff-align-content-lg-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.ff-align-self-lg-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.ff-align-self-lg-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.ff-align-self-lg-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.ff-align-self-lg-center{-ms-flex-item-align:center!important;align-self:center!important}.ff-align-self-lg-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.ff-align-self-lg-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width: 1200px){.ff-flex-xl-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-ms-flex-direction:row!important;flex-direction:row!important}.ff-flex-xl-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.ff-flex-xl-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.ff-flex-xl-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.ff-flex-xl-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.ff-flex-xl-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.ff-flex-xl-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.ff-justify-content-xl-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.ff-justify-content-xl-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.ff-justify-content-xl-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.ff-justify-content-xl-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.ff-justify-content-xl-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.ff-align-items-xl-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.ff-align-items-xl-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.ff-align-items-xl-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.ff-align-items-xl-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.ff-align-items-xl-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.ff-align-content-xl-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.ff-align-content-xl-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.ff-align-content-xl-center{-ms-flex-line-pack:center!important;align-content:center!important}.ff-align-content-xl-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.ff-align-content-xl-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.ff-align-content-xl-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.ff-align-self-xl-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.ff-align-self-xl-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.ff-align-self-xl-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.ff-align-self-xl-center{-ms-flex-item-align:center!important;align-self:center!important}.ff-align-self-xl-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.ff-align-self-xl-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Bootstrap Grid v4.0.0 (https://getbootstrap.com)
|
3 |
+
* Copyright 2011-2018 The Bootstrap Authors
|
4 |
+
* Copyright 2011-2018 Twitter, Inc.
|
5 |
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
6 |
+
*/@-ms-viewport{width:device-width}.ff-root{box-sizing:border-box;-ms-overflow-style:scrollbar}.ff-root *,.ff-root ::after,.ff-root ::before{box-sizing:inherit}.ff-container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.ff-container{max-width:540px}}@media (min-width:768px){.ff-container{max-width:720px}}@media (min-width:992px){.ff-container{max-width:960px}}@media (min-width:1200px){.ff-container{max-width:1140px}}.ff-container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.ff-row{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.ff-no-gutters{margin-right:0;margin-left:0}.ff-no-gutters>.ff-col,.ff-no-gutters>[class*=col-]{padding-right:0;padding-left:0}.ff-col,.ff-col-1,.ff-col-10,.ff-col-11,.ff-col-12,.ff-col-2,.ff-col-3,.ff-col-4,.ff-col-5,.ff-col-6,.ff-col-7,.ff-col-8,.ff-col-9,.ff-col-auto,.ff-col-lg,.ff-col-lg-1,.ff-col-lg-10,.ff-col-lg-11,.ff-col-lg-12,.ff-col-lg-2,.ff-col-lg-3,.ff-col-lg-4,.ff-col-lg-5,.ff-col-lg-6,.ff-col-lg-7,.ff-col-lg-8,.ff-col-lg-9,.ff-col-lg-auto,.ff-col-md,.ff-col-md-1,.ff-col-md-10,.ff-col-md-11,.ff-col-md-12,.ff-col-md-2,.ff-col-md-3,.ff-col-md-4,.ff-col-md-5,.ff-col-md-6,.ff-col-md-7,.ff-col-md-8,.ff-col-md-9,.ff-col-md-auto,.ff-col-sm,.ff-col-sm-1,.ff-col-sm-10,.ff-col-sm-11,.ff-col-sm-12,.ff-col-sm-2,.ff-col-sm-3,.ff-col-sm-4,.ff-col-sm-5,.ff-col-sm-6,.ff-col-sm-7,.ff-col-sm-8,.ff-col-sm-9,.ff-col-sm-auto,.ff-col-xl,.ff-col-xl-1,.ff-col-xl-10,.ff-col-xl-11,.ff-col-xl-12,.ff-col-xl-2,.ff-col-xl-3,.ff-col-xl-4,.ff-col-xl-5,.ff-col-xl-6,.ff-col-xl-7,.ff-col-xl-8,.ff-col-xl-9,.ff-col-xl-auto{position:relative;width:100%;min-height:1px;padding-right:15px;padding-left:15px}.ff-col{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.ff-col-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.ff-col-1{-webkit-box-flex:0;-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.ff-col-2{-webkit-box-flex:0;-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.ff-col-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.ff-col-4{-webkit-box-flex:0;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.ff-col-5{-webkit-box-flex:0;-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.ff-col-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.ff-col-7{-webkit-box-flex:0;-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.ff-col-8{-webkit-box-flex:0;-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.ff-col-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.ff-col-10{-webkit-box-flex:0;-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.ff-col-11{-webkit-box-flex:0;-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.ff-col-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.ff-order-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.ff-order-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.ff-order-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.ff-order-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.ff-order-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.ff-order-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.ff-order-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.ff-order-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.ff-order-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.ff-order-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.ff-order-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.ff-order-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.ff-order-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.ff-order-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.ff-order-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.ff-offset-1{margin-left:8.333333%}.ff-offset-2{margin-left:16.666667%}.ff-offset-3{margin-left:25%}.ff-offset-4{margin-left:33.333333%}.ff-offset-5{margin-left:41.666667%}.ff-offset-6{margin-left:50%}.ff-offset-7{margin-left:58.333333%}.ff-offset-8{margin-left:66.666667%}.ff-offset-9{margin-left:75%}.ff-offset-10{margin-left:83.333333%}.ff-offset-11{margin-left:91.666667%}@media (min-width:576px){.ff-col-sm{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.ff-col-sm-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.ff-col-sm-1{-webkit-box-flex:0;-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.ff-col-sm-2{-webkit-box-flex:0;-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.ff-col-sm-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.ff-col-sm-4{-webkit-box-flex:0;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.ff-col-sm-5{-webkit-box-flex:0;-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.ff-col-sm-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.ff-col-sm-7{-webkit-box-flex:0;-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.ff-col-sm-8{-webkit-box-flex:0;-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.ff-col-sm-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.ff-col-sm-10{-webkit-box-flex:0;-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.ff-col-sm-11{-webkit-box-flex:0;-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.ff-col-sm-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.ff-order-sm-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.ff-order-sm-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.ff-order-sm-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.ff-order-sm-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.ff-order-sm-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.ff-order-sm-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.ff-order-sm-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.ff-order-sm-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.ff-order-sm-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.ff-order-sm-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.ff-order-sm-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.ff-order-sm-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.ff-order-sm-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.ff-order-sm-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.ff-order-sm-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.ff-offset-sm-0{margin-left:0}.ff-offset-sm-1{margin-left:8.333333%}.ff-offset-sm-2{margin-left:16.666667%}.ff-offset-sm-3{margin-left:25%}.ff-offset-sm-4{margin-left:33.333333%}.ff-offset-sm-5{margin-left:41.666667%}.ff-offset-sm-6{margin-left:50%}.ff-offset-sm-7{margin-left:58.333333%}.ff-offset-sm-8{margin-left:66.666667%}.ff-offset-sm-9{margin-left:75%}.ff-offset-sm-10{margin-left:83.333333%}.ff-offset-sm-11{margin-left:91.666667%}}@media (min-width:768px){.ff-col-md{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.ff-col-md-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.ff-col-md-1{-webkit-box-flex:0;-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.ff-col-md-2{-webkit-box-flex:0;-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.ff-col-md-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.ff-col-md-4{-webkit-box-flex:0;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.ff-col-md-5{-webkit-box-flex:0;-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.ff-col-md-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.ff-col-md-7{-webkit-box-flex:0;-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.ff-col-md-8{-webkit-box-flex:0;-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.ff-col-md-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.ff-col-md-10{-webkit-box-flex:0;-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.ff-col-md-11{-webkit-box-flex:0;-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.ff-col-md-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.ff-order-md-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.ff-order-md-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.ff-order-md-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.ff-order-md-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.ff-order-md-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.ff-order-md-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.ff-order-md-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.ff-order-md-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.ff-order-md-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.ff-order-md-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.ff-order-md-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.ff-order-md-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.ff-order-md-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.ff-order-md-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.ff-order-md-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.ff-offset-md-0{margin-left:0}.ff-offset-md-1{margin-left:8.333333%}.ff-offset-md-2{margin-left:16.666667%}.ff-offset-md-3{margin-left:25%}.ff-offset-md-4{margin-left:33.333333%}.ff-offset-md-5{margin-left:41.666667%}.ff-offset-md-6{margin-left:50%}.ff-offset-md-7{margin-left:58.333333%}.ff-offset-md-8{margin-left:66.666667%}.ff-offset-md-9{margin-left:75%}.ff-offset-md-10{margin-left:83.333333%}.ff-offset-md-11{margin-left:91.666667%}}@media (min-width:992px){.ff-col-lg{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.ff-col-lg-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.ff-col-lg-1{-webkit-box-flex:0;-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.ff-col-lg-2{-webkit-box-flex:0;-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.ff-col-lg-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.ff-col-lg-4{-webkit-box-flex:0;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.ff-col-lg-5{-webkit-box-flex:0;-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.ff-col-lg-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.ff-col-lg-7{-webkit-box-flex:0;-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.ff-col-lg-8{-webkit-box-flex:0;-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.ff-col-lg-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.ff-col-lg-10{-webkit-box-flex:0;-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.ff-col-lg-11{-webkit-box-flex:0;-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.ff-col-lg-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.ff-order-lg-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.ff-order-lg-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.ff-order-lg-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.ff-order-lg-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.ff-order-lg-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.ff-order-lg-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.ff-order-lg-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.ff-order-lg-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.ff-order-lg-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.ff-order-lg-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.ff-order-lg-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.ff-order-lg-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.ff-order-lg-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.ff-order-lg-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.ff-order-lg-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.ff-offset-lg-0{margin-left:0}.ff-offset-lg-1{margin-left:8.333333%}.ff-offset-lg-2{margin-left:16.666667%}.ff-offset-lg-3{margin-left:25%}.ff-offset-lg-4{margin-left:33.333333%}.ff-offset-lg-5{margin-left:41.666667%}.ff-offset-lg-6{margin-left:50%}.ff-offset-lg-7{margin-left:58.333333%}.ff-offset-lg-8{margin-left:66.666667%}.ff-offset-lg-9{margin-left:75%}.ff-offset-lg-10{margin-left:83.333333%}.ff-offset-lg-11{margin-left:91.666667%}}@media (min-width:1200px){.ff-col-xl{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.ff-col-xl-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.ff-col-xl-1{-webkit-box-flex:0;-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.ff-col-xl-2{-webkit-box-flex:0;-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.ff-col-xl-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.ff-col-xl-4{-webkit-box-flex:0;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.ff-col-xl-5{-webkit-box-flex:0;-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.ff-col-xl-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.ff-col-xl-7{-webkit-box-flex:0;-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.ff-col-xl-8{-webkit-box-flex:0;-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.ff-col-xl-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.ff-col-xl-10{-webkit-box-flex:0;-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.ff-col-xl-11{-webkit-box-flex:0;-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.ff-col-xl-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.ff-order-xl-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.ff-order-xl-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.ff-order-xl-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.ff-order-xl-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.ff-order-xl-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.ff-order-xl-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.ff-order-xl-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.ff-order-xl-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.ff-order-xl-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.ff-order-xl-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.ff-order-xl-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.ff-order-xl-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.ff-order-xl-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.ff-order-xl-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.ff-order-xl-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.ff-offset-xl-0{margin-left:0}.ff-offset-xl-1{margin-left:8.333333%}.ff-offset-xl-2{margin-left:16.666667%}.ff-offset-xl-3{margin-left:25%}.ff-offset-xl-4{margin-left:33.333333%}.ff-offset-xl-5{margin-left:41.666667%}.ff-offset-xl-6{margin-left:50%}.ff-offset-xl-7{margin-left:58.333333%}.ff-offset-xl-8{margin-left:66.666667%}.ff-offset-xl-9{margin-left:75%}.ff-offset-xl-10{margin-left:83.333333%}.ff-offset-xl-11{margin-left:91.666667%}}.ff-d-none{display:none!important}.ff-d-inline{display:inline!important}.ff-d-inline-block{display:inline-block!important}.ff-d-block{display:block!important}.ff-d-table{display:table!important}.ff-d-table-row{display:table-row!important}.ff-d-table-cell{display:table-cell!important}.ff-d-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ff-d-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}@media (min-width:576px){.ff-d-sm-none{display:none!important}.ff-d-sm-inline{display:inline!important}.ff-d-sm-inline-block{display:inline-block!important}.ff-d-sm-block{display:block!important}.ff-d-sm-table{display:table!important}.ff-d-sm-table-row{display:table-row!important}.ff-d-sm-table-cell{display:table-cell!important}.ff-d-sm-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ff-d-sm-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:768px){.ff-d-md-none{display:none!important}.ff-d-md-inline{display:inline!important}.ff-d-md-inline-block{display:inline-block!important}.ff-d-md-block{display:block!important}.ff-d-md-table{display:table!important}.ff-d-md-table-row{display:table-row!important}.ff-d-md-table-cell{display:table-cell!important}.ff-d-md-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ff-d-md-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:992px){.ff-d-lg-none{display:none!important}.ff-d-lg-inline{display:inline!important}.ff-d-lg-inline-block{display:inline-block!important}.ff-d-lg-block{display:block!important}.ff-d-lg-table{display:table!important}.ff-d-lg-table-row{display:table-row!important}.ff-d-lg-table-cell{display:table-cell!important}.ff-d-lg-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ff-d-lg-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:1200px){.ff-d-xl-none{display:none!important}.ff-d-xl-inline{display:inline!important}.ff-d-xl-inline-block{display:inline-block!important}.ff-d-xl-block{display:block!important}.ff-d-xl-table{display:table!important}.ff-d-xl-table-row{display:table-row!important}.ff-d-xl-table-cell{display:table-cell!important}.ff-d-xl-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ff-d-xl-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media print{.ff-d-print-none{display:none!important}.ff-d-print-inline{display:inline!important}.ff-d-print-inline-block{display:inline-block!important}.ff-d-print-block{display:block!important}.ff-d-print-table{display:table!important}.ff-d-print-table-row{display:table-row!important}.ff-d-print-table-cell{display:table-cell!important}.ff-d-print-flex{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ff-d-print-inline-flex{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}.ff-flex-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-ms-flex-direction:row!important;flex-direction:row!important}.ff-flex-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.ff-flex-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.ff-flex-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.ff-flex-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.ff-flex-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.ff-flex-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.ff-justify-content-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.ff-justify-content-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.ff-justify-content-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.ff-justify-content-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.ff-justify-content-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.ff-align-items-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.ff-align-items-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.ff-align-items-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.ff-align-items-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.ff-align-items-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.ff-align-content-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.ff-align-content-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.ff-align-content-center{-ms-flex-line-pack:center!important;align-content:center!important}.ff-align-content-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.ff-align-content-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.ff-align-content-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.ff-align-self-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.ff-align-self-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.ff-align-self-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.ff-align-self-center{-ms-flex-item-align:center!important;align-self:center!important}.ff-align-self-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.ff-align-self-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}@media (min-width:576px){.ff-flex-sm-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-ms-flex-direction:row!important;flex-direction:row!important}.ff-flex-sm-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.ff-flex-sm-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.ff-flex-sm-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.ff-flex-sm-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.ff-flex-sm-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.ff-flex-sm-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.ff-justify-content-sm-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.ff-justify-content-sm-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.ff-justify-content-sm-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.ff-justify-content-sm-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.ff-justify-content-sm-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.ff-align-items-sm-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.ff-align-items-sm-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.ff-align-items-sm-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.ff-align-items-sm-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.ff-align-items-sm-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.ff-align-content-sm-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.ff-align-content-sm-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.ff-align-content-sm-center{-ms-flex-line-pack:center!important;align-content:center!important}.ff-align-content-sm-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.ff-align-content-sm-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.ff-align-content-sm-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.ff-align-self-sm-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.ff-align-self-sm-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.ff-align-self-sm-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.ff-align-self-sm-center{-ms-flex-item-align:center!important;align-self:center!important}.ff-align-self-sm-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.ff-align-self-sm-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:768px){.ff-flex-md-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-ms-flex-direction:row!important;flex-direction:row!important}.ff-flex-md-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.ff-flex-md-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.ff-flex-md-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.ff-flex-md-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.ff-flex-md-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.ff-flex-md-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.ff-justify-content-md-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.ff-justify-content-md-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.ff-justify-content-md-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.ff-justify-content-md-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.ff-justify-content-md-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.ff-align-items-md-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.ff-align-items-md-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.ff-align-items-md-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.ff-align-items-md-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.ff-align-items-md-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.ff-align-content-md-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.ff-align-content-md-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.ff-align-content-md-center{-ms-flex-line-pack:center!important;align-content:center!important}.ff-align-content-md-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.ff-align-content-md-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.ff-align-content-md-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.ff-align-self-md-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.ff-align-self-md-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.ff-align-self-md-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.ff-align-self-md-center{-ms-flex-item-align:center!important;align-self:center!important}.ff-align-self-md-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.ff-align-self-md-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:992px){.ff-flex-lg-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-ms-flex-direction:row!important;flex-direction:row!important}.ff-flex-lg-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.ff-flex-lg-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.ff-flex-lg-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.ff-flex-lg-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.ff-flex-lg-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.ff-flex-lg-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.ff-justify-content-lg-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.ff-justify-content-lg-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.ff-justify-content-lg-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.ff-justify-content-lg-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.ff-justify-content-lg-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.ff-align-items-lg-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.ff-align-items-lg-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.ff-align-items-lg-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.ff-align-items-lg-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.ff-align-items-lg-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.ff-align-content-lg-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.ff-align-content-lg-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.ff-align-content-lg-center{-ms-flex-line-pack:center!important;align-content:center!important}.ff-align-content-lg-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.ff-align-content-lg-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.ff-align-content-lg-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.ff-align-self-lg-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.ff-align-self-lg-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.ff-align-self-lg-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.ff-align-self-lg-center{-ms-flex-item-align:center!important;align-self:center!important}.ff-align-self-lg-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.ff-align-self-lg-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:1200px){.ff-flex-xl-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-ms-flex-direction:row!important;flex-direction:row!important}.ff-flex-xl-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important}.ff-flex-xl-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.ff-flex-xl-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.ff-flex-xl-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.ff-flex-xl-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.ff-flex-xl-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.ff-justify-content-xl-start{-webkit-box-pack:start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.ff-justify-content-xl-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.ff-justify-content-xl-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.ff-justify-content-xl-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.ff-justify-content-xl-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.ff-align-items-xl-start{-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:flex-start!important}.ff-align-items-xl-end{-webkit-box-align:end!important;-ms-flex-align:end!important;align-items:flex-end!important}.ff-align-items-xl-center{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.ff-align-items-xl-baseline{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.ff-align-items-xl-stretch{-webkit-box-align:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.ff-align-content-xl-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.ff-align-content-xl-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.ff-align-content-xl-center{-ms-flex-line-pack:center!important;align-content:center!important}.ff-align-content-xl-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.ff-align-content-xl-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.ff-align-content-xl-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.ff-align-self-xl-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.ff-align-self-xl-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.ff-align-self-xl-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.ff-align-self-xl-center{-ms-flex-item-align:center!important;align-self:center!important}.ff-align-self-xl-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.ff-align-self-xl-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}
|
fruitful-shortcodes-2.0.0/assets/shared/fruitful_recent_posts/css/styles.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.ff.ff-recent-posts{margin-bottom:32px;font-family:'Raleway';font-size:14px;line-height:24px;color:#4a4a4a}.ff.ff-recent-posts .ff-w-100{width:100% !important}.ff.ff-recent-posts a:before,.ff.ff-recent-posts a:after{display:none}.ff.ff-recent-posts a,.ff.ff-recent-posts a:hover,.ff.ff-recent-posts a:focus{text-decoration:none;border:0;margin:0;padding:0;box-shadow:none;outline:none;line-height:1.1em}.ff.ff-recent-posts .ff-col-item{margin-bottom:32px}.ff.ff-recent-posts .ff-col-item.ff-col-md-6 .ff-meta .ff-tax,.ff.ff-recent-posts .ff-col-item.ff-col-md-4 .ff-meta .ff-tax,.ff.ff-recent-posts .ff-col-item.ff-col-md-3 .ff-meta .ff-tax{display:block;margin-left:0;padding-left:0}.ff.ff-recent-posts .ff-col-item.ff-col-md-6 .ff-meta .ff-tax::after,.ff.ff-recent-posts .ff-col-item.ff-col-md-4 .ff-meta .ff-tax::after,.ff.ff-recent-posts .ff-col-item.ff-col-md-3 .ff-meta .ff-tax::after{content:none}.ff.ff-recent-posts .ff-thumb a,.ff.ff-recent-posts .ff-thumb img{display:block}.ff.ff-recent-posts .ff-thumb img{width:
|
1 |
+
.ff.ff-recent-posts{margin-bottom:32px;font-family:'Raleway';font-size:14px;line-height:24px;color:#4a4a4a}.ff.ff-recent-posts .ff-w-100{width:100% !important}.ff.ff-recent-posts a:before,.ff.ff-recent-posts a:after{display:none}.ff.ff-recent-posts a,.ff.ff-recent-posts a:hover,.ff.ff-recent-posts a:focus{text-decoration:none;border:0;margin:0;padding:0;box-shadow:none;outline:none;line-height:1.1em}.ff.ff-recent-posts .ff-col-item{margin-bottom:32px}.ff.ff-recent-posts .ff-col-item.ff-col-md-6 .ff-meta .ff-tax,.ff.ff-recent-posts .ff-col-item.ff-col-md-4 .ff-meta .ff-tax,.ff.ff-recent-posts .ff-col-item.ff-col-md-3 .ff-meta .ff-tax{display:block;margin-left:0;padding-left:0}.ff.ff-recent-posts .ff-col-item.ff-col-md-6 .ff-meta .ff-tax::after,.ff.ff-recent-posts .ff-col-item.ff-col-md-4 .ff-meta .ff-tax::after,.ff.ff-recent-posts .ff-col-item.ff-col-md-3 .ff-meta .ff-tax::after{content:none}.ff.ff-recent-posts .ff-thumb a,.ff.ff-recent-posts .ff-thumb img{display:block}.ff.ff-recent-posts .ff-thumb img{width:100%;height:auto;margin-bottom:24px}.ff.ff-recent-posts .ff-date{margin-bottom:5px;font-size:12px;font-weight:500;color:#9b9b9b}.ff.ff-recent-posts .ff-title h2{margin-top:0;margin-bottom:18px;font-family:'Raleway';font-size:20px;line-height:1.5em;font-weight:500;color:#000}.ff.ff-recent-posts .ff-title h2 a{background-image:linear-gradient(to right, #d8d8d8 0, #d8d8d8 100%);background-repeat:repeat-x;background-position:0 95%;background-size:100% 1px}.ff.ff-recent-posts .ff-excerpt{margin-bottom:20px}.ff.ff-recent-posts .ff-meta{font-style:italic;font-size:12px;font-weight:500;color:#4a4a4a}.ff.ff-recent-posts .ff-meta .ff-tax{margin-left:5px;padding-left:5px;position:relative;margin-right:10px}.ff.ff-recent-posts .ff-meta .ff-tax:after{content:'\00B7';font-style:normal;position:absolute;left:-2px;top:50%;transform:translateY(-50%)}.ff.ff-recent-posts .ff-meta .ff-comments{display:inline-block;color:#9b9b9b}.ff.ff-recent-posts .ff-meta .ff-comments i{display:inline-block;vertical-align:middle;width:13px;height:13px;background:url(../img/comments.svg) center center no-repeat}.ff-recent-posts.ff-style-bordered .ff-item{border:1px solid #e0e0e0;border-radius:2px;padding:24px;height:100%;display:flex;flex-direction:column;align-items:flex-start}.ff-recent-posts.ff-style-bordered .ff-item>div{width:100%}.ff-recent-posts.ff-style-bordered .ff-item .ff-thumb a{margin-top:-25px;margin-right:-25px;margin-left:-25px}.ff-recent-posts.ff-style-bordered .ff-item .ff-thumb img{box-shadow:none;margin-bottom:15px}.ff-recent-posts.ff-style-bordered .ff-item .ff-date{color:#b4966e}.ff-recent-posts.ff-style-bordered .ff-item .ff-title h2{font-size:16px;font-weight:600;line-height:1.25;margin-bottom:15px}.ff-recent-posts.ff-style-bordered .ff-item .ff-title a{background:none}.ff-recent-posts.ff-style-bordered .ff-item .ff-excerpt{font-size:12px;font-weight:500;line-height:1.33}.ff-recent-posts.ff-style-bordered .ff-item .ff-meta{margin-top:auto}.ff-recent-posts.ff-style-bordered .ff-item .ff-meta-content{border-top:1px solid #e0e0e0;padding:7px 24px;margin-left:-24px;margin-right:-24px;margin-bottom:-24px}
|
fruitful-shortcodes-2.0.0/assets/shared/fruitful_recent_posts/css/styles.less
CHANGED
@@ -47,7 +47,7 @@
|
|
47 |
display: block;
|
48 |
}
|
49 |
img {
|
50 |
-
width:
|
51 |
height: auto;
|
52 |
margin-bottom: 24px;
|
53 |
}
|
@@ -98,6 +98,7 @@
|
|
98 |
transform: translateY( -50% );
|
99 |
}
|
100 |
.ff-comments {
|
|
|
101 |
color: #9b9b9b;
|
102 |
i {
|
103 |
display: inline-block;
|
47 |
display: block;
|
48 |
}
|
49 |
img {
|
50 |
+
width: 100%;
|
51 |
height: auto;
|
52 |
margin-bottom: 24px;
|
53 |
}
|
98 |
transform: translateY( -50% );
|
99 |
}
|
100 |
.ff-comments {
|
101 |
+
display: inline-block;
|
102 |
color: #9b9b9b;
|
103 |
i {
|
104 |
display: inline-block;
|
fruitful-shortcodes-2.0.0/assets/shared/fruitful_recent_posts_slider/css/styles.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.fruitful_recent_posts_slider{border-bottom:1px solid #d8d8d8;padding-bottom:40px;margin-bottom:32px;position:relative}.fruitful_recent_posts_slider .ff-carousel{margin-left:-15px;margin-right:-15px}.fruitful_recent_posts_slider .ff-carousel-item{padding:0 15px}.fruitful_recent_posts_slider h2.ff-carousel-title{font-size:32px;line-height:1.2em;font-weight:600;background:none;margin-bottom:32px;text-align:center}.fruitful_recent_posts_slider .slick-next,.fruitful_recent_posts_slider .slick-prev{width:32px;height:32px;border-radius:50%;background:#fff;background-position:center center;background-repeat:no-repeat;border:1px solid #d8d8d8;top:auto;bottom:-56px;box-shadow:0 0 0 10px #fff;text-indent:-5555em;outline:none;padding:0 !important
|
1 |
+
.fruitful_recent_posts_slider{border-bottom:1px solid #d8d8d8;padding-bottom:40px;margin-bottom:32px;position:relative}.fruitful_recent_posts_slider .ff-carousel{margin-left:-15px;margin-right:-15px}.fruitful_recent_posts_slider .ff-carousel-item{padding:0 15px 2px}.fruitful_recent_posts_slider h2.ff-carousel-title{font-size:32px;line-height:1.2em;font-weight:600;background:none;margin-bottom:32px;text-align:center}.fruitful_recent_posts_slider .slick-next,.fruitful_recent_posts_slider .slick-prev{width:32px;height:32px;border-radius:50%;background:#fff;background-position:center center;background-repeat:no-repeat;border:1px solid #d8d8d8;top:auto;bottom:-56px;box-shadow:0 0 0 10px #fff;text-indent:-5555em;outline:none;padding:0 !important}.fruitful_recent_posts_slider .slick-next:before,.fruitful_recent_posts_slider .slick-prev:before{display:none}.fruitful_recent_posts_slider .slick-next{right:50%;transform:translateX(38px);background-image:url(../img/right.svg)}.fruitful_recent_posts_slider .slick-prev{left:50%;transform:translateX(-38px);background-image:url(../img/left.svg)}
|
fruitful-shortcodes-2.0.0/assets/shared/fruitful_recent_posts_slider/css/styles.less
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
margin-right: -15px;
|
13 |
}
|
14 |
.ff-carousel-item {
|
15 |
-
padding: 0 15px;
|
16 |
}
|
17 |
|
18 |
h2.ff-carousel-title {
|
12 |
margin-right: -15px;
|
13 |
}
|
14 |
.ff-carousel-item {
|
15 |
+
padding: 0 15px 2px;
|
16 |
}
|
17 |
|
18 |
h2.ff-carousel-title {
|
fruitful-shortcodes-2.0.0/assets/shared/fruitful_recent_posts_slider/js/scripts.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
"use strict";
|
4 |
|
5 |
window.ff_fruitful_recent_posts_slider_init = function() {
|
6 |
-
|
7 |
$('.fruitful_recent_posts_slider').each( function() {
|
8 |
|
9 |
var $shortcode = $(this),
|
@@ -11,11 +11,16 @@
|
|
11 |
slidesCount = $shortcode.data('slides'),
|
12 |
slidesCountSmall = $shortcode.data('slides-small'),
|
13 |
slidesCountExtraSmall = $shortcode.data('slides-extra-small');
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
-
if( $
|
16 |
$carousel.slick('unslick');
|
17 |
}
|
18 |
-
|
19 |
$carousel.slick({
|
20 |
infinite: true,
|
21 |
adaptiveHeight: true,
|
@@ -40,7 +45,7 @@
|
|
40 |
|
41 |
});
|
42 |
|
43 |
-
}
|
44 |
|
45 |
window.ff_fruitful_recent_posts_slider_init();
|
46 |
|
3 |
"use strict";
|
4 |
|
5 |
window.ff_fruitful_recent_posts_slider_init = function() {
|
6 |
+
|
7 |
$('.fruitful_recent_posts_slider').each( function() {
|
8 |
|
9 |
var $shortcode = $(this),
|
11 |
slidesCount = $shortcode.data('slides'),
|
12 |
slidesCountSmall = $shortcode.data('slides-small'),
|
13 |
slidesCountExtraSmall = $shortcode.data('slides-extra-small');
|
14 |
+
|
15 |
+
if ( ! $carousel.length ) {
|
16 |
+
return null;
|
17 |
+
}
|
18 |
+
|
19 |
|
20 |
+
if( $carousel.hasClass('slick-initialized') ) {
|
21 |
$carousel.slick('unslick');
|
22 |
}
|
23 |
+
|
24 |
$carousel.slick({
|
25 |
infinite: true,
|
26 |
adaptiveHeight: true,
|
45 |
|
46 |
});
|
47 |
|
48 |
+
};
|
49 |
|
50 |
window.ff_fruitful_recent_posts_slider_init();
|
51 |
|
fruitful-shortcodes-2.0.0/assets/shared/fruitful_recent_posts_slider/js/scripts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(
|
1 |
+
!function(l){"use strict";window.ff_fruitful_recent_posts_slider_init=function(){l(".fruitful_recent_posts_slider").each(function(){var i=l(this),s=i.find(".ff-carousel"),e=i.data("slides"),t=i.data("slides-small"),n=i.data("slides-extra-small");if(!s.length)return null;s.hasClass("slick-initialized")&&s.slick("unslick"),s.slick({infinite:!0,adaptiveHeight:!0,cssEase:"linear",slidesToShow:e,lazyLoad:"ondemand",responsive:[{breakpoint:992,settings:{slidesToShow:t}},{breakpoint:480,settings:{slidesToShow:n}}]})})},window.ff_fruitful_recent_posts_slider_init()}(window.jQuery);
|
fruitful-shortcodes-2.0.0/core/config/animation.php
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
return [
|
3 |
+
'animations_list' => [
|
4 |
+
'fade' => 'fade',
|
5 |
+
'fade-up' => 'fade-up',
|
6 |
+
'fade-down' => 'fade-down',
|
7 |
+
'fade-left' => 'fade-left',
|
8 |
+
'fade-right' => 'fade-right',
|
9 |
+
'fade-up-right' => 'fade-up-right',
|
10 |
+
'fade-up-left' => 'fade-up-left',
|
11 |
+
'fade-down-right' => 'fade-down-right',
|
12 |
+
'fade-down-left' => 'fade-down-left',
|
13 |
+
|
14 |
+
'flip-up' => 'flip-up',
|
15 |
+
'flip-down' => 'flip-down',
|
16 |
+
'flip-left' => 'flip-left',
|
17 |
+
'flip-right' => 'flip-right',
|
18 |
+
|
19 |
+
'slide-up' => 'slide-up',
|
20 |
+
'slide-down' => 'slide-down',
|
21 |
+
'slide-left' => 'slide-left',
|
22 |
+
'slide-right' => 'slide-right',
|
23 |
+
|
24 |
+
'zoom-in' => 'zoom-in',
|
25 |
+
'zoom-in-up' => 'zoom-in-up',
|
26 |
+
'zoom-in-down' => 'zoom-in-down',
|
27 |
+
'zoom-in-left' => 'zoom-in-left',
|
28 |
+
'zoom-in-right' => 'zoom-in-right',
|
29 |
+
'zoom-out' => 'zoom-out',
|
30 |
+
'zoom-out-up' => 'zoom-out-up',
|
31 |
+
'zoom-out-down' => 'zoom-out-down',
|
32 |
+
'zoom-out-left' => 'zoom-out-left',
|
33 |
+
'zoom-out-right' => 'zoom-out-right',
|
34 |
+
],
|
35 |
+
'exclude_animation_shortcodes' => [
|
36 |
+
'fruitful_btn',
|
37 |
+
'fruitful_odometer',
|
38 |
+
'fruitful_parallax',
|
39 |
+
],
|
40 |
+
'duration' => [
|
41 |
+
'50' => '50',
|
42 |
+
'100' => '100',
|
43 |
+
'150' => '150',
|
44 |
+
'200' => '200',
|
45 |
+
'250' => '250',
|
46 |
+
'300' => '300',
|
47 |
+
'350' => '350',
|
48 |
+
'400' => '400',
|
49 |
+
'450' => '450',
|
50 |
+
'500' => '500',
|
51 |
+
'600' => '600',
|
52 |
+
'700' => '700',
|
53 |
+
'800' => '800',
|
54 |
+
'900' => '900',
|
55 |
+
'1000' => '1000',
|
56 |
+
'1200' => '1200',
|
57 |
+
'1400' => '1400',
|
58 |
+
'1600' => '1600',
|
59 |
+
'1800' => '1800',
|
60 |
+
'2000' => '2000',
|
61 |
+
'2250' => '2250',
|
62 |
+
'2500' => '2500',
|
63 |
+
'2750' => '2750',
|
64 |
+
'3000' => '3000',
|
65 |
+
],
|
66 |
+
'delay' => [
|
67 |
+
'0' => '0',
|
68 |
+
'50' => '50',
|
69 |
+
'100' => '100',
|
70 |
+
'150' => '150',
|
71 |
+
'200' => '200',
|
72 |
+
'250' => '250',
|
73 |
+
'300' => '300',
|
74 |
+
'350' => '350',
|
75 |
+
'400' => '400',
|
76 |
+
'450' => '450',
|
77 |
+
'500' => '500',
|
78 |
+
'600' => '600',
|
79 |
+
'700' => '700',
|
80 |
+
'800' => '800',
|
81 |
+
'900' => '900',
|
82 |
+
'1000' => '1000',
|
83 |
+
'1200' => '1200',
|
84 |
+
'1400' => '1400',
|
85 |
+
'1600' => '1600',
|
86 |
+
'1800' => '1800',
|
87 |
+
'2000' => '2000',
|
88 |
+
'2250' => '2250',
|
89 |
+
'2500' => '2500',
|
90 |
+
'2750' => '2750',
|
91 |
+
'3000' => '3000',
|
92 |
+
],
|
93 |
+
'easing' => [
|
94 |
+
'linear' => 'linear',
|
95 |
+
'ease' => 'ease',
|
96 |
+
'ease-in' => 'ease-in',
|
97 |
+
'ease-out' => 'ease-out',
|
98 |
+
'ease-in-out' => 'ease-in-out',
|
99 |
+
'ease-in-back' => 'ease-in-back',
|
100 |
+
'ease-out-back' => 'ease-out-back',
|
101 |
+
'ease-in-out-back' => 'ease-in-out-back',
|
102 |
+
'ease-in-sine' => 'ease-in-sine',
|
103 |
+
'ease-out-sine' => 'ease-out-sine',
|
104 |
+
'ease-in-out-sine' => 'ease-in-out-sine',
|
105 |
+
'ease-in-quad' => 'ease-in-quad',
|
106 |
+
'ease-out-quad' => 'ease-out-quad',
|
107 |
+
'ease-in-out-quad' => 'ease-in-out-quad',
|
108 |
+
'ease-in-cubic' => 'ease-in-cubic',
|
109 |
+
'ease-out-cubic' => 'ease-out-cubic',
|
110 |
+
'ease-in-out-cubic' => 'ease-in-out-cubic',
|
111 |
+
'ease-in-quart' => 'ease-in-quart',
|
112 |
+
'ease-out-quart' => 'ease-out-quart',
|
113 |
+
'ease-in-out-quart' => 'ease-in-out-quart',
|
114 |
+
],
|
115 |
+
];
|
fruitful-shortcodes-2.0.0/core/config/config.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
return [
|
3 |
+
'pro_shortcodes' => include 'pro_shortcodes.php',
|
4 |
+
'animation' => include 'animation.php',
|
5 |
+
];
|
fruitful-shortcodes-2.0.0/core/config/pro_shortcodes.php
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
return [
|
3 |
+
'fruitful_benefits' => [
|
4 |
+
'title' => __( 'Benefits', 'ff_shortcodes' ),
|
5 |
+
'desc' => __( 'Add benefits grid', 'ff_shortcodes' ),
|
6 |
+
],
|
7 |
+
'fruitful_box' => [
|
8 |
+
'title' => __( 'Box', 'ff_shortcodes' ),
|
9 |
+
'desc' => __( 'Add a box', 'ff_shortcodes' ),
|
10 |
+
],
|
11 |
+
'fruitful_chart' => [
|
12 |
+
'title' => __( 'Chart', 'ff_shortcodes' ),
|
13 |
+
'desc' => __( 'Add a pie chart', 'ff_shortcodes' ),
|
14 |
+
],
|
15 |
+
'fruitful_countdown' => [
|
16 |
+
'title' => __( 'Countdown', 'ff_shortcodes' ),
|
17 |
+
'desc' => __( 'Add a countdown', 'ff_shortcodes' ),
|
18 |
+
],
|
19 |
+
'fruitful_counters' => [
|
20 |
+
'title' => __( 'Counters', 'ff_shortcodes' ),
|
21 |
+
'desc' => __( 'Add counters', 'ff_shortcodes' ),
|
22 |
+
],
|
23 |
+
'fruitful_glitch' => [
|
24 |
+
'title' => __( 'Glitch', 'ff_shortcodes' ),
|
25 |
+
'desc' => __( 'Add a glitch', 'ff_shortcodes' ),
|
26 |
+
],
|
27 |
+
'fruitful_logos_carousel' => [
|
28 |
+
'title' => __( 'Logos carousel', 'ff_shortcodes' ),
|
29 |
+
'desc' => __( 'Add logos carousel', 'ff_shortcodes' ),
|
30 |
+
],
|
31 |
+
'fruitful_odometer' => [
|
32 |
+
'title' => __( 'Odometer', 'ff_shortcodes' ),
|
33 |
+
'desc' => __( 'Add an odometer', 'ff_shortcodes' ),
|
34 |
+
],
|
35 |
+
'fruitful_parallax' => [
|
36 |
+
'title' => __( 'Parallax', 'ff_shortcodes' ),
|
37 |
+
'desc' => __( 'Add a parallax', 'ff_shortcodes' ),
|
38 |
+
],
|
39 |
+
'fruitful_pricing_tables' => [
|
40 |
+
'title' => __( 'Pricing Tables', 'ff_shortcodes' ),
|
41 |
+
'desc' => __( 'Add a pricing table', 'ff_shortcodes' ),
|
42 |
+
],
|
43 |
+
'fruitful_quote' => [
|
44 |
+
'title' => __( 'Quote', 'ff_shortcodes' ),
|
45 |
+
'desc' => __( 'Add a quote', 'ff_shortcodes' ),
|
46 |
+
],
|
47 |
+
'fruitful_separator' => [
|
48 |
+
'title' => __( 'Separator 2', 'ff_shortcodes' ),
|
49 |
+
'desc' => __( 'Add separator', 'ff_shortcodes' ),
|
50 |
+
],
|
51 |
+
'fruitful_slider' => [
|
52 |
+
'title' => __( 'Slider', 'ff_shortcodes' ),
|
53 |
+
'desc' => __( 'Add slider', 'ff_shortcodes' ),
|
54 |
+
],
|
55 |
+
'fruitful_social_icons' => [
|
56 |
+
'title' => __( 'Social Icons', 'ff_shortcodes' ),
|
57 |
+
'desc' => __( 'Add social icons', 'ff_shortcodes' ),
|
58 |
+
],
|
59 |
+
'fruitful_team_members' => [
|
60 |
+
'title' => __( 'Team Members', 'ff_shortcodes' ),
|
61 |
+
'desc' => __( 'Add team grid', 'ff_shortcodes' ),
|
62 |
+
],
|
63 |
+
'fruitful_testimonials' => [
|
64 |
+
'title' => __( 'Testimonials', 'ff_shortcodes' ),
|
65 |
+
'desc' => __( 'Add testimonials grid', 'ff_shortcodes' ),
|
66 |
+
],
|
67 |
+
'fruitful_timeline' => [
|
68 |
+
'title' => __( 'Timeline', 'ff_shortcodes' ),
|
69 |
+
'desc' => __( 'Add timeline', 'ff_shortcodes' ),
|
70 |
+
],
|
71 |
+
'fruitful_ttt' => [
|
72 |
+
'title' => __( 'Tabs / Toggle', 'ff_shortcodes' ),
|
73 |
+
'desc' => __( 'Add tabs / tour or toggles', 'ff_shortcodes' ),
|
74 |
+
],
|
75 |
+
|
76 |
+
];
|
fruitful-shortcodes-2.0.0/core/controller/backend.php
CHANGED
@@ -1,161 +1,203 @@
|
|
1 |
<?php
|
2 |
|
3 |
namespace ffshortcodes\controller;
|
|
|
4 |
use ffshortcodes\helper\utils;
|
5 |
|
6 |
/**
|
7 |
* Back-end part of plugin
|
8 |
**/
|
9 |
-
|
10 |
class backend {
|
11 |
-
|
12 |
function __construct() {
|
13 |
-
|
14 |
// load assets for admin side
|
15 |
add_action( 'admin_enqueue_scripts', [ $this, 'load_assets' ] );
|
16 |
-
|
17 |
-
// add "Fruitful Shortcodes" button
|
18 |
-
|
|
|
|
|
|
|
19 |
|
20 |
// load primary modal window through AJAX
|
21 |
add_action( 'wp_ajax_ff_shortcodes_load_modal', [ $this, 'ajax_load_modal' ] );
|
22 |
-
|
23 |
// load shortocode into modal window
|
24 |
add_action( 'wp_ajax_ff_shortcodes_load_shortcode', [ $this, 'ajax_load_shortcode' ] );
|
25 |
-
|
26 |
// promo screen to buy pro version
|
27 |
add_action( 'wp_ajax_ff_shortcodes_load_modal_promo', [ $this, 'ajax_load_promo_screen' ] );
|
28 |
-
|
29 |
// Allow additional mime types (SVG)
|
30 |
add_filter( 'upload_mimes', [ $this, 'add_upload_types' ] );
|
31 |
-
|
32 |
// fix SVG thumbs in admin
|
33 |
add_action( 'admin_init', [ $this, 'fix_svg_thumbs' ] );
|
34 |
add_filter( 'wp_prepare_attachment_for_js', [ $this, 'fix_svgs_response_for_svg' ], 10, 3 );
|
35 |
-
|
36 |
// add links to Plugins screen
|
37 |
-
add_filter( 'plugin_action_links_' . plugin_basename(FF_SC_PLUGIN_FILE_), [ $this, 'plugin_action_links' ] );
|
38 |
-
add_filter( 'plugin_row_meta', [ $this, 'add_plugins_screen_links' ], 10, 2);
|
39 |
-
|
40 |
// register plugin settings
|
41 |
add_action( 'admin_init', [ $this, 'register_plugin_settings' ] );
|
42 |
-
|
43 |
// Add action save plugin settings to update ffc stat option
|
44 |
add_action( 'fruitful_shortcodes_plugin_setting_save', [ $this, 'save_plugin_settings' ] );
|
45 |
-
|
46 |
// add settings menu
|
47 |
add_action( 'admin_menu', [ $this, 'add_menu' ] );
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
}
|
50 |
-
|
51 |
-
|
52 |
/**
|
53 |
* Add scripts and styles
|
54 |
**/
|
55 |
function load_assets() {
|
56 |
-
|
57 |
wp_register_script( 'wow', FF_SHORTCODES()->plugin_url . 'assets/libs/wow/wow.min.js', [ 'jquery' ], FF_SHORTCODES()->cache_time, true );
|
58 |
wp_register_script( 'slick', FF_SHORTCODES()->plugin_url . 'assets/libs/slick/slick.min.js', [ 'jquery' ], FF_SHORTCODES()->cache_time, true );
|
59 |
wp_register_style( 'slick', FF_SHORTCODES()->plugin_url . 'assets/libs/slick/slick.css', false, FF_SHORTCODES()->cache_time );
|
60 |
-
|
61 |
wp_register_style( 'ff-shortcodes-grid', FF_SHORTCODES()->plugin_url . 'assets/libs/bootstrap/bootstrap-grid.min.css', false, FF_SHORTCODES()->cache_time );
|
62 |
wp_enqueue_style( 'font-awesome', FF_SHORTCODES()->plugin_url . 'assets/libs/fontawesome/css/font-awesome.min.css' );
|
63 |
-
|
64 |
wp_enqueue_style( 'wp-color-picker' );
|
65 |
wp_enqueue_style( 'ff-shortcodes-backend', FF_SHORTCODES()->plugin_url . '/assets/css/admin.css' );
|
66 |
-
|
67 |
wp_enqueue_script( 'serialize-json', FF_SHORTCODES()->plugin_url . 'assets/libs/jquery.serializejson.min.js' );
|
68 |
wp_register_script( 'ff-shortcodes-fonts', '//ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js', false, FF_SHORTCODES()->cache_time, true );
|
69 |
wp_register_script( 'nicescroll', FF_SHORTCODES()->plugin_url . '/assets/libs/nicescroll/jquery.nicescroll.min.js', [ 'jquery' ], FF_SHORTCODES()->cache_time, true );
|
70 |
-
|
71 |
wp_enqueue_script( 'shake-fn', FF_SHORTCODES()->plugin_url . '/assets/js/shake.js', [ 'jquery' ], FF_SHORTCODES()->cache_time, true );
|
72 |
wp_enqueue_script( 'liveupdate', FF_SHORTCODES()->plugin_url . '/assets/js/liveupdate.js', [ 'jquery' ], FF_SHORTCODES()->cache_time, true );
|
73 |
-
|
74 |
-
wp_register_script( 'ff-shortcodes-window', FF_SHORTCODES()->plugin_url . '/assets/js/modal.js', [
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
utils::register_shortcodes_assets();
|
79 |
-
|
80 |
}
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
/**
|
83 |
-
* Add
|
84 |
**/
|
85 |
-
function
|
86 |
-
if ( current_user_can( 'edit_posts' ) && current_user_can( 'edit_pages' ) )
|
87 |
-
|
88 |
}
|
|
|
|
|
89 |
}
|
90 |
|
91 |
/**
|
92 |
* Load modal content
|
93 |
**/
|
94 |
function ajax_load_modal() {
|
95 |
-
|
96 |
-
FF_SHORTCODES()->view->load('/core/view/backend/modal/window', [
|
97 |
'shortcodes' => FF_SHORTCODES()->shortcodes,
|
98 |
-
'is_pro'
|
99 |
], true );
|
100 |
-
|
101 |
}
|
102 |
-
|
103 |
/**
|
104 |
* Load shortcode into modal window
|
105 |
**/
|
106 |
function ajax_load_shortcode() {
|
107 |
-
|
108 |
$shortcode = sanitize_title( $_POST['data'] );
|
109 |
-
|
110 |
-
if( isset( FF_SHORTCODES()->shortcodes[ $shortcode ] ) ) {
|
111 |
-
|
112 |
-
if( filter_var( FF_SHORTCODES()->shortcodes[ $shortcode ]['is_pro'] ) && function_exists('FF_SHORTCODES_PRO') ) {
|
113 |
-
|
114 |
FF_SHORTCODES_PRO()->view->load( FF_SHORTCODES_PRO()->shortcodes_dir . '/' . $shortcode . '/modal', [], true );
|
115 |
-
|
116 |
} else {
|
117 |
-
|
118 |
FF_SHORTCODES()->view->load( FF_SHORTCODES()->shortcodes_dir . '/' . $shortcode . '/modal', [], true );
|
119 |
-
|
120 |
}
|
121 |
-
|
122 |
}
|
123 |
-
|
124 |
}
|
125 |
-
|
126 |
/**
|
127 |
* Load promo screen
|
128 |
**/
|
129 |
function ajax_load_promo_screen() {
|
130 |
FF_SHORTCODES()->view->load( '/core/view/backend/modal/promo', [], true );
|
131 |
}
|
132 |
-
|
133 |
/**
|
134 |
* Allow additional mime types to upload
|
135 |
**/
|
136 |
function add_upload_types( $existing_mimes ) {
|
137 |
-
$existing_mimes['svg']
|
138 |
$existing_mimes['svgz'] = 'image/svg+xml';
|
|
|
139 |
return $existing_mimes;
|
140 |
}
|
141 |
-
|
142 |
function fix_svg_thumbs() {
|
143 |
-
|
144 |
$screen = get_current_screen();
|
145 |
-
|
146 |
-
if ( is_object($screen) && $screen->id == 'upload' ) {
|
147 |
-
|
148 |
function ffshortcodes_svgs_fix_thumbs_filter( $content ) {
|
149 |
-
|
150 |
return apply_filters( 'final_output', $content );
|
151 |
-
|
152 |
}
|
153 |
-
|
154 |
ob_start( 'ffshortcodes_svgs_fix_thumbs_filter' );
|
155 |
-
|
156 |
add_filter( 'final_output', 'ffshortcodes_svgs_fix_final_output' );
|
157 |
function ffshortcodes_svgs_fix_final_output( $content ) {
|
158 |
-
|
159 |
$content = str_replace(
|
160 |
'<# } else if ( \'image\' === data.type && data.sizes && data.sizes.full ) { #>',
|
161 |
'<# } else if ( \'svg+xml\' === data.subtype ) { #>
|
@@ -163,7 +205,7 @@ class backend {
|
|
163 |
<# } else if ( \'image\' === data.type && data.sizes && data.sizes.full ) { #>',
|
164 |
$content
|
165 |
);
|
166 |
-
|
167 |
$content = str_replace(
|
168 |
'<# } else if ( \'image\' === data.type && data.sizes ) { #>',
|
169 |
'<# } else if ( \'svg+xml\' === data.subtype ) { #>
|
@@ -173,188 +215,306 @@ class backend {
|
|
173 |
<# } else if ( \'image\' === data.type && data.sizes ) { #>',
|
174 |
$content
|
175 |
);
|
176 |
-
|
177 |
return $content;
|
178 |
-
|
179 |
}
|
180 |
-
|
181 |
}
|
182 |
-
|
183 |
}
|
184 |
-
|
185 |
function fix_svgs_response_for_svg( $response, $attachment, $meta ) {
|
186 |
if ( $response['mime'] == 'image/svg+xml' && empty( $response['sizes'] ) ) {
|
187 |
-
|
188 |
$svg_path = get_attached_file( $attachment->ID );
|
189 |
-
|
190 |
if ( ! file_exists( $svg_path ) ) {
|
191 |
// If SVG is external, use the URL instead of the path
|
192 |
-
$svg_path = $response[
|
193 |
}
|
194 |
-
|
195 |
$dimensions = $this->svgs_get_dimensions( $svg_path );
|
196 |
-
|
197 |
-
$response[
|
198 |
'full' => [
|
199 |
-
'url'
|
200 |
-
'width'
|
201 |
-
'height'
|
202 |
'orientation' => $dimensions->width > $dimensions->height ? 'landscape' : 'portrait'
|
203 |
]
|
204 |
];
|
205 |
-
|
206 |
}
|
207 |
-
|
208 |
return $response;
|
209 |
}
|
210 |
-
|
211 |
function svgs_get_dimensions( $svg ) {
|
212 |
$svg = simplexml_load_file( $svg );
|
213 |
-
|
214 |
-
if ( $svg ===
|
215 |
-
|
216 |
-
$width
|
217 |
$height = '0';
|
218 |
-
|
219 |
} else {
|
220 |
-
|
221 |
$attributes = $svg->attributes();
|
222 |
-
$width
|
223 |
-
$height
|
224 |
}
|
225 |
-
|
226 |
return (object) [ 'width' => $width, 'height' => $height ];
|
227 |
}
|
228 |
-
|
229 |
/**
|
230 |
* Add links to WP admin > Plugins screen
|
231 |
**/
|
232 |
-
|
233 |
function plugin_action_links( $links ) {
|
234 |
-
|
235 |
-
if( ! FF_SHORTCODES()->is_pro_version_active ) {
|
236 |
-
$links['ff_shortcodes_get_pro'] = sprintf( '<a href="%1$s" target="_blank" class="ff-get-pro">%2$s</a>', FF_SHORTCODES()->links['pro_plugin'], __('Get Pro Version', 'ff_shortcodes') );
|
237 |
}
|
|
|
238 |
return $links;
|
239 |
}
|
240 |
-
|
241 |
function add_plugins_screen_links( $links, $file ) {
|
242 |
-
|
243 |
if ( $file == plugin_basename( FF_SHORTCODES()->plugin_base ) ) {
|
244 |
-
$links[] = '<a href="' . FF_SHORTCODES()->links['docs'] . '" target="_blank">' . __('Documentation & FAQ', 'ff_shortcodes') . '</a>';
|
245 |
-
$links[] = '<a href="' . FF_SHORTCODES()->links['support'] . '" target="_blank">' . __('Support', 'ff_shortcodes') . '</a>';
|
246 |
}
|
247 |
-
|
248 |
return $links;
|
249 |
-
|
250 |
}
|
251 |
-
|
252 |
/**
|
253 |
* Register plugin settings
|
254 |
**/
|
255 |
function register_plugin_settings() {
|
256 |
//Settings rigister example
|
257 |
//register_setting( 'ff_shortcodes_settings', [ $this, 'save_plugin_settings' ] );
|
258 |
-
|
259 |
-
do_action('fruitful_shortcodes_plugin_setting_save');
|
260 |
}
|
261 |
-
|
262 |
/**
|
263 |
* Add settings menu
|
264 |
**/
|
265 |
function add_menu() {
|
266 |
-
add_submenu_page( 'options-general.php', esc_html__( 'Fruitful Shortcodes Plugin Settings', 'ff_shortcodes' ), esc_html__( 'Fruitful Shortcodes Plugin Settings', 'ff_shortcodes' ), 'administrator', __FILE__, [
|
|
|
|
|
|
|
267 |
}
|
268 |
-
|
269 |
/**
|
270 |
* Display plugin's settings page
|
271 |
**/
|
272 |
function display_settings_page() {
|
273 |
-
|
274 |
/** Default values statistics options */
|
275 |
$data['ffc_statistic'] = 1;
|
276 |
$data['ffc_subscribe'] = 0;
|
277 |
-
$data['ffc_email']
|
278 |
-
$data['ffc_name']
|
279 |
-
|
280 |
/** General statistics option for all fruitfulcode products */
|
281 |
-
$ffc_statistics_option = get_option('ffc_statistics_option');
|
282 |
-
|
283 |
-
if( $ffc_statistics_option ) {
|
284 |
-
|
285 |
-
if( isset($ffc_statistics_option['ffc_statistic']) ) {
|
286 |
$data['ffc_statistic'] = (int) $ffc_statistics_option['ffc_statistic'];
|
287 |
}
|
288 |
-
if( isset($ffc_statistics_option['ffc_subscribe']) ) {
|
289 |
$data['ffc_subscribe'] = (int) $ffc_statistics_option['ffc_subscribe'];
|
290 |
}
|
291 |
-
if( isset($ffc_statistics_option['ffc_subscribe_email']) ) {
|
292 |
$data['ffc_email'] = $ffc_statistics_option['ffc_subscribe_email'];
|
293 |
}
|
294 |
-
if( isset($ffc_statistics_option['ffc_subscribe_name']) ) {
|
295 |
$data['ffc_name'] = $ffc_statistics_option['ffc_subscribe_name'];
|
296 |
}
|
297 |
}
|
298 |
-
|
299 |
-
if (function_exists('ff_shortcode_version')) {
|
300 |
$data['fruitful_version'] = ff_shortcode_version();
|
301 |
}
|
302 |
-
|
303 |
FF_SHORTCODES()->view->load( '/core/view/settings', $data );
|
304 |
-
|
305 |
}
|
306 |
-
|
307 |
/**
|
308 |
* Save plugin settings action
|
309 |
*/
|
310 |
public function save_plugin_settings() {
|
311 |
-
|
312 |
$post = $_POST;
|
313 |
-
|
314 |
-
if( !empty($post) ){
|
315 |
-
if( !empty($post['option_page']) )
|
316 |
-
|
317 |
-
if( $post['option_page'] === 'ff_shortcodes_settings' ) {
|
318 |
$ffc_statistics_option = get_option( 'ffc_statistics_option' );
|
319 |
-
|
320 |
if ( isset( $post['ffc_statistic'] ) ) {
|
321 |
$ffc_statistics_option['ffc_statistic'] = (int) $post['ffc_statistic'];
|
322 |
} else {
|
323 |
$ffc_statistics_option['ffc_statistic'] = 0;
|
324 |
}
|
325 |
-
|
326 |
if ( isset( $post['ffc_subscribe'] ) ) {
|
327 |
$ffc_statistics_option['ffc_subscribe'] = (int) $post['ffc_subscribe'];
|
328 |
} else {
|
329 |
$ffc_statistics_option['ffc_subscribe'] = 0;
|
330 |
}
|
331 |
-
|
332 |
if ( isset( $post['ffc_subscribe_email'] ) ) {
|
333 |
$ffc_statistics_option['ffc_subscribe_email'] = $post['ffc_subscribe_email'];
|
334 |
} else {
|
335 |
$ffc_statistics_option['ffc_subscribe_email'] = '';
|
336 |
}
|
337 |
-
|
338 |
if ( isset( $post['ffc_subscribe_name'] ) ) {
|
339 |
$ffc_statistics_option['ffc_subscribe_name'] = $post['ffc_subscribe_name'];
|
340 |
} else {
|
341 |
$ffc_statistics_option['ffc_subscribe_name'] = '';
|
342 |
}
|
343 |
-
|
344 |
update_option( 'ffc_statistics_option', $ffc_statistics_option );
|
345 |
-
|
346 |
// Plugin version - old | new
|
347 |
-
if ( isset( $post['fruitful_version'] ) && in_array($post['fruitful_version'], array('new','old')) ) {
|
348 |
-
$opt
|
349 |
$opt['fruitful_version'] = $post['fruitful_version'];
|
350 |
-
|
351 |
ff_shortcode_update_plugins( $opt['fruitful_version'] );
|
352 |
-
|
353 |
-
update_option('fruitful_options_plugin', $opt);
|
354 |
}
|
355 |
}
|
356 |
}
|
357 |
}
|
358 |
}
|
359 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
360 |
}
|
1 |
<?php
|
2 |
|
3 |
namespace ffshortcodes\controller;
|
4 |
+
|
5 |
use ffshortcodes\helper\utils;
|
6 |
|
7 |
/**
|
8 |
* Back-end part of plugin
|
9 |
**/
|
|
|
10 |
class backend {
|
11 |
+
|
12 |
function __construct() {
|
13 |
+
|
14 |
// load assets for admin side
|
15 |
add_action( 'admin_enqueue_scripts', [ $this, 'load_assets' ] );
|
16 |
+
|
17 |
+
// add "Fruitful Shortcodes" button to TinyMCE - external plugin
|
18 |
+
add_filter( 'mce_external_plugins', [ $this, 'add_mce_editor_plugin' ] );
|
19 |
+
|
20 |
+
// add "Fruitful Shortcodes" button to TinyMCE - external plugins buttons area
|
21 |
+
add_action( 'mce_buttons', [ $this, 'add_mce_editor_button'] );
|
22 |
|
23 |
// load primary modal window through AJAX
|
24 |
add_action( 'wp_ajax_ff_shortcodes_load_modal', [ $this, 'ajax_load_modal' ] );
|
25 |
+
|
26 |
// load shortocode into modal window
|
27 |
add_action( 'wp_ajax_ff_shortcodes_load_shortcode', [ $this, 'ajax_load_shortcode' ] );
|
28 |
+
|
29 |
// promo screen to buy pro version
|
30 |
add_action( 'wp_ajax_ff_shortcodes_load_modal_promo', [ $this, 'ajax_load_promo_screen' ] );
|
31 |
+
|
32 |
// Allow additional mime types (SVG)
|
33 |
add_filter( 'upload_mimes', [ $this, 'add_upload_types' ] );
|
34 |
+
|
35 |
// fix SVG thumbs in admin
|
36 |
add_action( 'admin_init', [ $this, 'fix_svg_thumbs' ] );
|
37 |
add_filter( 'wp_prepare_attachment_for_js', [ $this, 'fix_svgs_response_for_svg' ], 10, 3 );
|
38 |
+
|
39 |
// add links to Plugins screen
|
40 |
+
add_filter( 'plugin_action_links_' . plugin_basename( FF_SC_PLUGIN_FILE_ ), [ $this, 'plugin_action_links' ] );
|
41 |
+
add_filter( 'plugin_row_meta', [ $this, 'add_plugins_screen_links' ], 10, 2 );
|
42 |
+
|
43 |
// register plugin settings
|
44 |
add_action( 'admin_init', [ $this, 'register_plugin_settings' ] );
|
45 |
+
|
46 |
// Add action save plugin settings to update ffc stat option
|
47 |
add_action( 'fruitful_shortcodes_plugin_setting_save', [ $this, 'save_plugin_settings' ] );
|
48 |
+
|
49 |
// add settings menu
|
50 |
add_action( 'admin_menu', [ $this, 'add_menu' ] );
|
51 |
+
|
52 |
+
// Add default attributes related to common tabs
|
53 |
+
add_filter( 'ff_shortcodes_get_common_tabs', [ $this, 'add_common_tabs' ], 10, 2 );
|
54 |
+
|
55 |
+
// add block category
|
56 |
+
add_filter( 'block_categories', [ $this, 'add_block_category' ] );
|
57 |
+
|
58 |
+
// add block editor assets
|
59 |
+
add_action( 'enqueue_block_editor_assets', [ $this, 'block_editor_assets' ] );
|
60 |
+
|
61 |
}
|
62 |
+
|
63 |
+
|
64 |
/**
|
65 |
* Add scripts and styles
|
66 |
**/
|
67 |
function load_assets() {
|
68 |
+
|
69 |
wp_register_script( 'wow', FF_SHORTCODES()->plugin_url . 'assets/libs/wow/wow.min.js', [ 'jquery' ], FF_SHORTCODES()->cache_time, true );
|
70 |
wp_register_script( 'slick', FF_SHORTCODES()->plugin_url . 'assets/libs/slick/slick.min.js', [ 'jquery' ], FF_SHORTCODES()->cache_time, true );
|
71 |
wp_register_style( 'slick', FF_SHORTCODES()->plugin_url . 'assets/libs/slick/slick.css', false, FF_SHORTCODES()->cache_time );
|
72 |
+
|
73 |
wp_register_style( 'ff-shortcodes-grid', FF_SHORTCODES()->plugin_url . 'assets/libs/bootstrap/bootstrap-grid.min.css', false, FF_SHORTCODES()->cache_time );
|
74 |
wp_enqueue_style( 'font-awesome', FF_SHORTCODES()->plugin_url . 'assets/libs/fontawesome/css/font-awesome.min.css' );
|
75 |
+
|
76 |
wp_enqueue_style( 'wp-color-picker' );
|
77 |
wp_enqueue_style( 'ff-shortcodes-backend', FF_SHORTCODES()->plugin_url . '/assets/css/admin.css' );
|
78 |
+
|
79 |
wp_enqueue_script( 'serialize-json', FF_SHORTCODES()->plugin_url . 'assets/libs/jquery.serializejson.min.js' );
|
80 |
wp_register_script( 'ff-shortcodes-fonts', '//ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js', false, FF_SHORTCODES()->cache_time, true );
|
81 |
wp_register_script( 'nicescroll', FF_SHORTCODES()->plugin_url . '/assets/libs/nicescroll/jquery.nicescroll.min.js', [ 'jquery' ], FF_SHORTCODES()->cache_time, true );
|
82 |
+
|
83 |
wp_enqueue_script( 'shake-fn', FF_SHORTCODES()->plugin_url . '/assets/js/shake.js', [ 'jquery' ], FF_SHORTCODES()->cache_time, true );
|
84 |
wp_enqueue_script( 'liveupdate', FF_SHORTCODES()->plugin_url . '/assets/js/liveupdate.js', [ 'jquery' ], FF_SHORTCODES()->cache_time, true );
|
85 |
+
|
86 |
+
wp_register_script( 'ff-shortcodes-window', FF_SHORTCODES()->plugin_url . '/assets/js/modal.js', [
|
87 |
+
'jquery',
|
88 |
+
'liveupdate',
|
89 |
+
'nicescroll',
|
90 |
+
'ff-shortcodes-fonts'
|
91 |
+
], FF_SHORTCODES()->cache_time, true );
|
92 |
+
wp_register_script( 'ff-shortcodes-ui', FF_SHORTCODES()->plugin_url . '/assets/js/modal_ui.js', [
|
93 |
+
'jquery',
|
94 |
+
'wp-color-picker',
|
95 |
+
'shake-fn',
|
96 |
+
'jquery-ui-sortable',
|
97 |
+
'serialize-json'
|
98 |
+
], FF_SHORTCODES()->cache_time, true );
|
99 |
+
wp_enqueue_script( 'ff-shortcodes', FF_SHORTCODES()->plugin_url . '/assets/js/admin.js', [
|
100 |
+
'ff-shortcodes-window',
|
101 |
+
'ff-shortcodes-ui'
|
102 |
+
], FF_SHORTCODES()->cache_time, true );
|
103 |
+
|
104 |
utils::register_shortcodes_assets();
|
105 |
+
|
106 |
}
|
107 |
+
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Add "Fruitful Shortcodes" button to TinyMCE- external plugins buttons area
|
111 |
+
**/
|
112 |
+
function add_mce_editor_plugin( $plugins ) {
|
113 |
+
if ( current_user_can( 'edit_posts' ) && current_user_can( 'edit_pages' ) ) {
|
114 |
+
$plugins['ff_shortcodes_button'] = FF_SHORTCODES()->plugin_url . 'assets/js/mce_button.js';
|
115 |
+
}
|
116 |
+
|
117 |
+
return $plugins;
|
118 |
+
}
|
119 |
+
|
120 |
+
|
121 |
/**
|
122 |
+
* Add "Fruitful Shortcodes" button to TinyMCE - external plugins buttons area
|
123 |
**/
|
124 |
+
function add_mce_editor_button( $buttons ) {
|
125 |
+
if ( current_user_can( 'edit_posts' ) && current_user_can( 'edit_pages' ) ) {
|
126 |
+
$buttons[] = 'ff_shortcodes_button';
|
127 |
}
|
128 |
+
|
129 |
+
return $buttons;
|
130 |
}
|
131 |
|
132 |
/**
|
133 |
* Load modal content
|
134 |
**/
|
135 |
function ajax_load_modal() {
|
136 |
+
|
137 |
+
FF_SHORTCODES()->view->load( '/core/view/backend/modal/window', [
|
138 |
'shortcodes' => FF_SHORTCODES()->shortcodes,
|
139 |
+
'is_pro' => utils::is_pro()
|
140 |
], true );
|
141 |
+
|
142 |
}
|
143 |
+
|
144 |
/**
|
145 |
* Load shortcode into modal window
|
146 |
**/
|
147 |
function ajax_load_shortcode() {
|
148 |
+
|
149 |
$shortcode = sanitize_title( $_POST['data'] );
|
150 |
+
|
151 |
+
if ( isset( FF_SHORTCODES()->shortcodes[ $shortcode ] ) ) {
|
152 |
+
|
153 |
+
if ( filter_var( FF_SHORTCODES()->shortcodes[ $shortcode ]['is_pro'] ) && function_exists( 'FF_SHORTCODES_PRO' ) ) {
|
154 |
+
|
155 |
FF_SHORTCODES_PRO()->view->load( FF_SHORTCODES_PRO()->shortcodes_dir . '/' . $shortcode . '/modal', [], true );
|
156 |
+
|
157 |
} else {
|
158 |
+
|
159 |
FF_SHORTCODES()->view->load( FF_SHORTCODES()->shortcodes_dir . '/' . $shortcode . '/modal', [], true );
|
160 |
+
|
161 |
}
|
162 |
+
|
163 |
}
|
164 |
+
|
165 |
}
|
166 |
+
|
167 |
/**
|
168 |
* Load promo screen
|
169 |
**/
|
170 |
function ajax_load_promo_screen() {
|
171 |
FF_SHORTCODES()->view->load( '/core/view/backend/modal/promo', [], true );
|
172 |
}
|
173 |
+
|
174 |
/**
|
175 |
* Allow additional mime types to upload
|
176 |
**/
|
177 |
function add_upload_types( $existing_mimes ) {
|
178 |
+
$existing_mimes['svg'] = 'image/svg+xml';
|
179 |
$existing_mimes['svgz'] = 'image/svg+xml';
|
180 |
+
|
181 |
return $existing_mimes;
|
182 |
}
|
183 |
+
|
184 |
function fix_svg_thumbs() {
|
185 |
+
|
186 |
$screen = get_current_screen();
|
187 |
+
|
188 |
+
if ( is_object( $screen ) && $screen->id == 'upload' ) {
|
189 |
+
|
190 |
function ffshortcodes_svgs_fix_thumbs_filter( $content ) {
|
191 |
+
|
192 |
return apply_filters( 'final_output', $content );
|
193 |
+
|
194 |
}
|
195 |
+
|
196 |
ob_start( 'ffshortcodes_svgs_fix_thumbs_filter' );
|
197 |
+
|
198 |
add_filter( 'final_output', 'ffshortcodes_svgs_fix_final_output' );
|
199 |
function ffshortcodes_svgs_fix_final_output( $content ) {
|
200 |
+
|
201 |
$content = str_replace(
|
202 |
'<# } else if ( \'image\' === data.type && data.sizes && data.sizes.full ) { #>',
|
203 |
'<# } else if ( \'svg+xml\' === data.subtype ) { #>
|
205 |
<# } else if ( \'image\' === data.type && data.sizes && data.sizes.full ) { #>',
|
206 |
$content
|
207 |
);
|
208 |
+
|
209 |
$content = str_replace(
|
210 |
'<# } else if ( \'image\' === data.type && data.sizes ) { #>',
|
211 |
'<# } else if ( \'svg+xml\' === data.subtype ) { #>
|
215 |
<# } else if ( \'image\' === data.type && data.sizes ) { #>',
|
216 |
$content
|
217 |
);
|
218 |
+
|
219 |
return $content;
|
220 |
+
|
221 |
}
|
222 |
+
|
223 |
}
|
224 |
+
|
225 |
}
|
226 |
+
|
227 |
function fix_svgs_response_for_svg( $response, $attachment, $meta ) {
|
228 |
if ( $response['mime'] == 'image/svg+xml' && empty( $response['sizes'] ) ) {
|
229 |
+
|
230 |
$svg_path = get_attached_file( $attachment->ID );
|
231 |
+
|
232 |
if ( ! file_exists( $svg_path ) ) {
|
233 |
// If SVG is external, use the URL instead of the path
|
234 |
+
$svg_path = $response['url'];
|
235 |
}
|
236 |
+
|
237 |
$dimensions = $this->svgs_get_dimensions( $svg_path );
|
238 |
+
|
239 |
+
$response['sizes'] = [
|
240 |
'full' => [
|
241 |
+
'url' => $response['url'],
|
242 |
+
'width' => $dimensions->width,
|
243 |
+
'height' => $dimensions->height,
|
244 |
'orientation' => $dimensions->width > $dimensions->height ? 'landscape' : 'portrait'
|
245 |
]
|
246 |
];
|
247 |
+
|
248 |
}
|
249 |
+
|
250 |
return $response;
|
251 |
}
|
252 |
+
|
253 |
function svgs_get_dimensions( $svg ) {
|
254 |
$svg = simplexml_load_file( $svg );
|
255 |
+
|
256 |
+
if ( $svg === false ) {
|
257 |
+
|
258 |
+
$width = '0';
|
259 |
$height = '0';
|
260 |
+
|
261 |
} else {
|
262 |
+
|
263 |
$attributes = $svg->attributes();
|
264 |
+
$width = (string) $attributes->width;
|
265 |
+
$height = (string) $attributes->height;
|
266 |
}
|
267 |
+
|
268 |
return (object) [ 'width' => $width, 'height' => $height ];
|
269 |
}
|
270 |
+
|
271 |
/**
|
272 |
* Add links to WP admin > Plugins screen
|
273 |
**/
|
274 |
+
|
275 |
function plugin_action_links( $links ) {
|
276 |
+
|
277 |
+
if ( ! FF_SHORTCODES()->is_pro_version_active ) {
|
278 |
+
$links['ff_shortcodes_get_pro'] = sprintf( '<a href="%1$s" target="_blank" class="ff-get-pro">%2$s</a>', FF_SHORTCODES()->links['pro_plugin'], __( 'Get Pro Version', 'ff_shortcodes' ) );
|
279 |
}
|
280 |
+
|
281 |
return $links;
|
282 |
}
|
283 |
+
|
284 |
function add_plugins_screen_links( $links, $file ) {
|
285 |
+
|
286 |
if ( $file == plugin_basename( FF_SHORTCODES()->plugin_base ) ) {
|
287 |
+
$links[] = '<a href="' . FF_SHORTCODES()->links['docs'] . '" target="_blank">' . __( 'Documentation & FAQ', 'ff_shortcodes' ) . '</a>';
|
288 |
+
$links[] = '<a href="' . FF_SHORTCODES()->links['support'] . '" target="_blank">' . __( 'Support', 'ff_shortcodes' ) . '</a>';
|
289 |
}
|
290 |
+
|
291 |
return $links;
|
292 |
+
|
293 |
}
|
294 |
+
|
295 |
/**
|
296 |
* Register plugin settings
|
297 |
**/
|
298 |
function register_plugin_settings() {
|
299 |
//Settings rigister example
|
300 |
//register_setting( 'ff_shortcodes_settings', [ $this, 'save_plugin_settings' ] );
|
301 |
+
|
302 |
+
do_action( 'fruitful_shortcodes_plugin_setting_save' );
|
303 |
}
|
304 |
+
|
305 |
/**
|
306 |
* Add settings menu
|
307 |
**/
|
308 |
function add_menu() {
|
309 |
+
add_submenu_page( 'options-general.php', esc_html__( 'Fruitful Shortcodes Plugin Settings', 'ff_shortcodes' ), esc_html__( 'Fruitful Shortcodes Plugin Settings', 'ff_shortcodes' ), 'administrator', __FILE__, [
|
310 |
+
$this,
|
311 |
+
'display_settings_page'
|
312 |
+
] );
|
313 |
}
|
314 |
+
|
315 |
/**
|
316 |
* Display plugin's settings page
|
317 |
**/
|
318 |
function display_settings_page() {
|
319 |
+
|
320 |
/** Default values statistics options */
|
321 |
$data['ffc_statistic'] = 1;
|
322 |
$data['ffc_subscribe'] = 0;
|
323 |
+
$data['ffc_email'] = '';
|
324 |
+
$data['ffc_name'] = '';
|
325 |
+
|
326 |
/** General statistics option for all fruitfulcode products */
|
327 |
+
$ffc_statistics_option = get_option( 'ffc_statistics_option' );
|
328 |
+
|
329 |
+
if ( $ffc_statistics_option ) {
|
330 |
+
|
331 |
+
if ( isset( $ffc_statistics_option['ffc_statistic'] ) ) {
|
332 |
$data['ffc_statistic'] = (int) $ffc_statistics_option['ffc_statistic'];
|
333 |
}
|
334 |
+
if ( isset( $ffc_statistics_option['ffc_subscribe'] ) ) {
|
335 |
$data['ffc_subscribe'] = (int) $ffc_statistics_option['ffc_subscribe'];
|
336 |
}
|
337 |
+
if ( isset( $ffc_statistics_option['ffc_subscribe_email'] ) ) {
|
338 |
$data['ffc_email'] = $ffc_statistics_option['ffc_subscribe_email'];
|
339 |
}
|
340 |
+
if ( isset( $ffc_statistics_option['ffc_subscribe_name'] ) ) {
|
341 |
$data['ffc_name'] = $ffc_statistics_option['ffc_subscribe_name'];
|
342 |
}
|
343 |
}
|
344 |
+
|
345 |
+
if ( function_exists( 'ff_shortcode_version' ) ) {
|
346 |
$data['fruitful_version'] = ff_shortcode_version();
|
347 |
}
|
348 |
+
|
349 |
FF_SHORTCODES()->view->load( '/core/view/settings', $data );
|
350 |
+
|
351 |
}
|
352 |
+
|
353 |
/**
|
354 |
* Save plugin settings action
|
355 |
*/
|
356 |
public function save_plugin_settings() {
|
357 |
+
|
358 |
$post = $_POST;
|
359 |
+
|
360 |
+
if ( ! empty( $post ) ) {
|
361 |
+
if ( ! empty( $post['option_page'] ) ) {
|
362 |
+
if ( $post['option_page'] === 'ff_shortcodes_settings' ) {
|
|
|
363 |
$ffc_statistics_option = get_option( 'ffc_statistics_option' );
|
364 |
+
|
365 |
if ( isset( $post['ffc_statistic'] ) ) {
|
366 |
$ffc_statistics_option['ffc_statistic'] = (int) $post['ffc_statistic'];
|
367 |
} else {
|
368 |
$ffc_statistics_option['ffc_statistic'] = 0;
|
369 |
}
|
370 |
+
|
371 |
if ( isset( $post['ffc_subscribe'] ) ) {
|
372 |
$ffc_statistics_option['ffc_subscribe'] = (int) $post['ffc_subscribe'];
|
373 |
} else {
|
374 |
$ffc_statistics_option['ffc_subscribe'] = 0;
|
375 |
}
|
376 |
+
|
377 |
if ( isset( $post['ffc_subscribe_email'] ) ) {
|
378 |
$ffc_statistics_option['ffc_subscribe_email'] = $post['ffc_subscribe_email'];
|
379 |
} else {
|
380 |
$ffc_statistics_option['ffc_subscribe_email'] = '';
|
381 |
}
|
382 |
+
|
383 |
if ( isset( $post['ffc_subscribe_name'] ) ) {
|
384 |
$ffc_statistics_option['ffc_subscribe_name'] = $post['ffc_subscribe_name'];
|
385 |
} else {
|
386 |
$ffc_statistics_option['ffc_subscribe_name'] = '';
|
387 |
}
|
388 |
+
|
389 |
update_option( 'ffc_statistics_option', $ffc_statistics_option );
|
390 |
+
|
391 |
// Plugin version - old | new
|
392 |
+
if ( isset( $post['fruitful_version'] ) && in_array( $post['fruitful_version'], array( 'new', 'old' ) ) ) {
|
393 |
+
$opt = get_option( 'fruitful_options_plugin' );
|
394 |
$opt['fruitful_version'] = $post['fruitful_version'];
|
395 |
+
|
396 |
ff_shortcode_update_plugins( $opt['fruitful_version'] );
|
397 |
+
|
398 |
+
update_option( 'fruitful_options_plugin', $opt );
|
399 |
}
|
400 |
}
|
401 |
}
|
402 |
}
|
403 |
}
|
404 |
+
|
405 |
+
|
406 |
+
/**
|
407 |
+
* Get common tabs for all shortcodes
|
408 |
+
*/
|
409 |
+
public function add_common_tabs( $common_tabs, $config ) {
|
410 |
+
|
411 |
+
$common_tabs_add = [];
|
412 |
+
|
413 |
+
|
414 |
+
// Animation
|
415 |
+
$exclude_animation_shortcodes = ! empty( FF_SHORTCODES()->config['animation']['exclude_animation_shortcodes'] )
|
416 |
+
? FF_SHORTCODES()->config['animation']['exclude_animation_shortcodes']
|
417 |
+
: [];
|
418 |
+
|
419 |
+
if ( ! empty( $config['shortcode'] ) && ! in_array( $config['shortcode'], $exclude_animation_shortcodes, true ) ) {
|
420 |
+
|
421 |
+
$common_tabs_add['animation'] = [
|
422 |
+
'tab_title' => esc_html__( 'Animation', 'ff_shortcodes' ),
|
423 |
+
'fields' => [
|
424 |
+
[
|
425 |
+
'type' => 'dropdown',
|
426 |
+
'name' => 'animation',
|
427 |
+
'label' => esc_html__( 'Animation', 'ff_shortcodes' ),
|
428 |
+
'value' => ! empty( FF_SHORTCODES()->config['animation']['animations_list'] )
|
429 |
+
? FF_SHORTCODES()->config['animation']['animations_list']
|
430 |
+
: [],
|
431 |
+
'first_null_option' => true
|
432 |
+
],
|
433 |
+
[
|
434 |
+
'type' => 'text_unit',
|
435 |
+
'name' => 'animation_offset',
|
436 |
+
'label' => esc_html__( 'Change offset to trigger animations sooner or later (px)', 'ff_shortcodes_pro' ),
|
437 |
+
'unit' => 'px',
|
438 |
+
'value' => '',
|
439 |
+
],
|
440 |
+
[
|
441 |
+
'type' => 'dropdown',
|
442 |
+
'name' => 'animation_delay',
|
443 |
+
'label' => esc_html__( 'Delay animation (ms)', 'ff_shortcodes' ),
|
444 |
+
'value' => ! empty( FF_SHORTCODES()->config['animation']['delay'] )
|
445 |
+
? FF_SHORTCODES()->config['animation']['delay']
|
446 |
+
: [],
|
447 |
+
'first_null_option' => true
|
448 |
+
],
|
449 |
+
[
|
450 |
+
'type' => 'dropdown',
|
451 |
+
'name' => 'animation_duration',
|
452 |
+
'label' => esc_html__( 'Duration of animation (ms)', 'ff_shortcodes' ),
|
453 |
+
'value' => ! empty( FF_SHORTCODES()->config['animation']['duration'] )
|
454 |
+
? FF_SHORTCODES()->config['animation']['duration']
|
455 |
+
: [],
|
456 |
+
'first_null_option' => true
|
457 |
+
],
|
458 |
+
[
|
459 |
+
'type' => 'dropdown',
|
460 |
+
'name' => 'animation_easing',
|
461 |
+
'label' => esc_html__( 'Choose timing function to ease elements in different ways', 'ff_shortcodes' ),
|
462 |
+
'value' => ! empty( FF_SHORTCODES()->config['animation']['easing'] )
|
463 |
+
? FF_SHORTCODES()->config['animation']['easing']
|
464 |
+
: [],
|
465 |
+
'first_null_option' => true
|
466 |
+
],
|
467 |
+
[
|
468 |
+
'type' => 'radio',
|
469 |
+
'name' => 'animation_once',
|
470 |
+
'label' => esc_html__( 'Choose whether animation should fire once, or every time you scroll up/down to element', 'ff_shortcodes' ),
|
471 |
+
'value' => [
|
472 |
+
'' => esc_html__( 'Every time', 'ff_shortcodes' ),
|
473 |
+
'true' => esc_html__( 'Once', 'ff_shortcodes' ),
|
474 |
+
],
|
475 |
+
'desc' => '',
|
476 |
+
],
|
477 |
+
]
|
478 |
+
];
|
479 |
+
}
|
480 |
+
|
481 |
+
|
482 |
+
return array_merge( $common_tabs, $common_tabs_add );
|
483 |
+
}
|
484 |
+
|
485 |
+
|
486 |
+
|
487 |
+
/**
|
488 |
+
* Add block category (Gutenberg)
|
489 |
+
*/
|
490 |
+
public function add_block_category( $categories ) {
|
491 |
+
|
492 |
+
$categories[] = [
|
493 |
+
'slug' => 'fruitful-blocks',
|
494 |
+
'title' => __( 'Fruitful Blocks', 'ff_shortcodes' ),
|
495 |
+
'icon' => null,
|
496 |
+
];
|
497 |
+
|
498 |
+
return $categories;
|
499 |
+
}
|
500 |
+
|
501 |
+
|
502 |
+
/**
|
503 |
+
* Add block editor assets
|
504 |
+
*/
|
505 |
+
public function block_editor_assets() {
|
506 |
+
|
507 |
+
$this->load_assets();
|
508 |
+
|
509 |
+
$assets_url = FF_SHORTCODES()->plugin_url . 'assets/';
|
510 |
+
|
511 |
+
// Special styles for the Gutenberg Editor
|
512 |
+
wp_enqueue_style(
|
513 |
+
'fruitful-blocks-editor',
|
514 |
+
$assets_url . 'css/blocks_editor.css',
|
515 |
+
array( 'wp-edit-blocks' ),
|
516 |
+
FF_SHORTCODES()->cache_time
|
517 |
+
);
|
518 |
+
|
519 |
+
}
|
520 |
}
|
fruitful-shortcodes-2.0.0/core/controller/front.php
CHANGED
@@ -9,26 +9,39 @@
|
|
9 |
|
10 |
class front {
|
11 |
|
12 |
-
function __construct() {
|
13 |
|
14 |
// load scripts and styles
|
15 |
add_action( 'wp_enqueue_scripts', [ $this, 'load_assets' ] );
|
16 |
|
17 |
// load custom styles
|
18 |
add_action( 'wp_footer', [ $this, 'load_custom_styles' ] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
}
|
21 |
|
22 |
/**
|
23 |
* Load JavaScript and CSS files in a front-end
|
24 |
**/
|
25 |
-
function load_assets() {
|
26 |
|
27 |
// CSS styles
|
28 |
wp_register_style( 'font-awesome', FF_SHORTCODES()->plugin_url . 'assets/libs/fontawesome/css/font-awesome.min.css', false, FF_SHORTCODES()->cache_time );
|
29 |
wp_register_style( 'slick', FF_SHORTCODES()->plugin_url . 'assets/libs/slick/slick.css', false, FF_SHORTCODES()->cache_time );
|
30 |
wp_register_style( 'ff-shortcodes-grid', FF_SHORTCODES()->plugin_url . 'assets/libs/bootstrap/bootstrap-grid.min.css', false, FF_SHORTCODES()->cache_time );
|
31 |
-
|
|
|
32 |
wp_enqueue_style( 'ff-google-fonts', '//fonts.googleapis.com/css?family=Raleway:400,500,700', false, FF_SHORTCODES()->cache_time );
|
33 |
wp_enqueue_style( 'ff-shortcodes', FF_SHORTCODES()->plugin_url . 'assets/css/front.css', false, FF_SHORTCODES()->cache_time );
|
34 |
|
@@ -39,6 +52,8 @@
|
|
39 |
// JS scripts
|
40 |
wp_register_script( 'wow', FF_SHORTCODES()->plugin_url . 'assets/libs/wow/wow.min.js', [ 'jquery' ], FF_SHORTCODES()->cache_time, true );
|
41 |
wp_register_script( 'slick', FF_SHORTCODES()->plugin_url . 'assets/libs/slick/slick.min.js', [ 'jquery' ], FF_SHORTCODES()->cache_time, true );
|
|
|
|
|
42 |
wp_enqueue_script( 'ff-shortcodes', FF_SHORTCODES()->plugin_url . 'assets/js/front' . $postfix . '.js', [ 'jquery' ], FF_SHORTCODES()->cache_time, true );
|
43 |
|
44 |
}
|
@@ -46,7 +61,7 @@
|
|
46 |
/**
|
47 |
* Load custom styles generated based on user settings
|
48 |
**/
|
49 |
-
function load_custom_styles() {
|
50 |
?>
|
51 |
<!-- Fruitful Shortcodes Custom Styles -->
|
52 |
<style>
|
@@ -54,5 +69,92 @@
|
|
54 |
</style>
|
55 |
<?php
|
56 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
}
|
9 |
|
10 |
class front {
|
11 |
|
12 |
+
public function __construct() {
|
13 |
|
14 |
// load scripts and styles
|
15 |
add_action( 'wp_enqueue_scripts', [ $this, 'load_assets' ] );
|
16 |
|
17 |
// load custom styles
|
18 |
add_action( 'wp_footer', [ $this, 'load_custom_styles' ] );
|
19 |
+
|
20 |
+
// Add default attributes related to common tabs - front, init
|
21 |
+
add_filter( 'ff_shortcodes_shortcode_default_atts', [ $this, 'add_common_tabs_default_atts' ] );
|
22 |
+
|
23 |
+
// Enqueue styles and scripts related to common tabs - front, init
|
24 |
+
add_action( 'ff_shortcodes_shortcode_before_view_load', [ $this, 'enqueue_common_tabs_front_assets' ], 10, 2 );
|
25 |
+
|
26 |
+
// Add shortcode wrap attrs - front, view
|
27 |
+
add_filter( 'ff_shortcodes_shortcode_wrap_attrs', [ $this, 'add_shortcode_wrap_attrs' ], 10, 2 );
|
28 |
+
|
29 |
+
// Blocks scripts and styles
|
30 |
+
add_action( 'enqueue_block_assets', [ $this, 'blocks_assets' ] );
|
31 |
|
32 |
}
|
33 |
|
34 |
/**
|
35 |
* Load JavaScript and CSS files in a front-end
|
36 |
**/
|
37 |
+
public function load_assets() {
|
38 |
|
39 |
// CSS styles
|
40 |
wp_register_style( 'font-awesome', FF_SHORTCODES()->plugin_url . 'assets/libs/fontawesome/css/font-awesome.min.css', false, FF_SHORTCODES()->cache_time );
|
41 |
wp_register_style( 'slick', FF_SHORTCODES()->plugin_url . 'assets/libs/slick/slick.css', false, FF_SHORTCODES()->cache_time );
|
42 |
wp_register_style( 'ff-shortcodes-grid', FF_SHORTCODES()->plugin_url . 'assets/libs/bootstrap/bootstrap-grid.min.css', false, FF_SHORTCODES()->cache_time );
|
43 |
+
wp_register_style( 'aos', FF_SHORTCODES()->plugin_url . 'assets/libs/aos/aos.min.css', [], FF_SHORTCODES()->cache_time );
|
44 |
+
|
45 |
wp_enqueue_style( 'ff-google-fonts', '//fonts.googleapis.com/css?family=Raleway:400,500,700', false, FF_SHORTCODES()->cache_time );
|
46 |
wp_enqueue_style( 'ff-shortcodes', FF_SHORTCODES()->plugin_url . 'assets/css/front.css', false, FF_SHORTCODES()->cache_time );
|
47 |
|
52 |
// JS scripts
|
53 |
wp_register_script( 'wow', FF_SHORTCODES()->plugin_url . 'assets/libs/wow/wow.min.js', [ 'jquery' ], FF_SHORTCODES()->cache_time, true );
|
54 |
wp_register_script( 'slick', FF_SHORTCODES()->plugin_url . 'assets/libs/slick/slick.min.js', [ 'jquery' ], FF_SHORTCODES()->cache_time, true );
|
55 |
+
wp_register_script( 'aos', FF_SHORTCODES()->plugin_url . 'assets/libs/aos/aos.min.js', [], FF_SHORTCODES()->cache_time, true );
|
56 |
+
wp_register_script( 'ff-shortcodes-animation', FF_SHORTCODES()->plugin_url . 'assets/js/animation.js', ['aos'], FF_SHORTCODES()->cache_time, true );
|
57 |
wp_enqueue_script( 'ff-shortcodes', FF_SHORTCODES()->plugin_url . 'assets/js/front' . $postfix . '.js', [ 'jquery' ], FF_SHORTCODES()->cache_time, true );
|
58 |
|
59 |
}
|
61 |
/**
|
62 |
* Load custom styles generated based on user settings
|
63 |
**/
|
64 |
+
public function load_custom_styles() {
|
65 |
?>
|
66 |
<!-- Fruitful Shortcodes Custom Styles -->
|
67 |
<style>
|
69 |
</style>
|
70 |
<?php
|
71 |
}
|
72 |
+
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Add default attributes related to common tabs
|
76 |
+
*/
|
77 |
+
public function add_common_tabs_default_atts( $atts ) {
|
78 |
+
|
79 |
+
$default_atts = [
|
80 |
+
// Animation
|
81 |
+
'animation' => '',
|
82 |
+
'animation_offset' => '',
|
83 |
+
'animation_delay' => '',
|
84 |
+
'animation_duration' => '',
|
85 |
+
'animation_easing' => '',
|
86 |
+
'animation_once' => '',
|
87 |
+
];
|
88 |
+
|
89 |
+
return array_merge( $default_atts, $atts );
|
90 |
+
}
|
91 |
+
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Enqueue styles and scripts related to common tabs
|
95 |
+
*/
|
96 |
+
public function enqueue_common_tabs_front_assets( $atts, $content ) {
|
97 |
+
|
98 |
+
// Animation
|
99 |
+
if ( ! empty( $atts['animation'] ) ) {
|
100 |
+
wp_enqueue_style( 'aos' );
|
101 |
+
wp_enqueue_script( 'aos' );
|
102 |
+
wp_enqueue_script( 'ff-shortcodes-animation' );
|
103 |
+
}
|
104 |
+
|
105 |
+
}
|
106 |
+
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Add shortcode wrap attrs
|
110 |
+
*/
|
111 |
+
public function add_shortcode_wrap_attrs( $attributes, $data ) {
|
112 |
+
|
113 |
+
// Animation
|
114 |
+
|
115 |
+
$animation = ! empty( $data['atts']['animation'] ) ? trim( $data['atts']['animation'] ) : '';
|
116 |
+
$animation_offset = ! empty( $data['atts']['animation_offset'] ) ? trim( $data['atts']['animation_offset'] ) : '';
|
117 |
+
$animation_delay = isset( $data['atts']['animation_delay'] ) ? trim( $data['atts']['animation_delay'] ) : '';
|
118 |
+
$animation_duration = ! empty( $data['atts']['animation_duration'] ) ? trim( $data['atts']['animation_duration'] ) : '';
|
119 |
+
$animation_easing = ! empty( $data['atts']['animation_easing'] ) ? trim( $data['atts']['animation_easing'] ) : '';
|
120 |
+
$animation_once = ! empty( $data['atts']['animation_once'] ) ? trim( $data['atts']['animation_once'] ) : '';
|
121 |
+
|
122 |
+
|
123 |
+
if ( $animation ) {
|
124 |
+
|
125 |
+
$attributes[] = 'data-aos="' . esc_attr( $animation ) . '"';
|
126 |
+
|
127 |
+
if ( $animation_offset ) {
|
128 |
+
$attributes[] = 'data-aos-offset="' . absint( $animation_offset ) . '"';
|
129 |
+
}
|
130 |
+
|
131 |
+
if ( $animation_delay ) {
|
132 |
+
$attributes[] = 'data-aos-delay="' . absint( $animation_delay ) . '"';
|
133 |
+
}
|
134 |
+
|
135 |
+
if ( $animation_duration ) {
|
136 |
+
$attributes[] = 'data-aos-duration="' . absint( $animation_duration ) . '"';
|
137 |
+
}
|
138 |
+
|
139 |
+
if ( $animation_easing ) {
|
140 |
+
$attributes[] = 'data-aos-easing="' . esc_attr( $animation_easing ) . '"';
|
141 |
+
}
|
142 |
+
|
143 |
+
if ( $animation_once && $animation_once === 'true' ) {
|
144 |
+
$attributes[] = 'data-aos-once="true"';
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
return $attributes;
|
149 |
+
}
|
150 |
+
|
151 |
+
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Blocks assets
|
155 |
+
**/
|
156 |
+
function blocks_assets() {
|
157 |
+
$this->load_assets();
|
158 |
+
}
|
159 |
|
160 |
}
|
fruitful-shortcodes-2.0.0/core/core.php
CHANGED
@@ -14,10 +14,10 @@ class core {
|
|
14 |
public $model;
|
15 |
public $view;
|
16 |
public $controller;
|
17 |
-
|
18 |
-
public $shortcodes
|
19 |
-
public $links
|
20 |
-
public $pro_shortcodes
|
21 |
|
22 |
public $is_pro_version_active;
|
23 |
public $plugin_base;
|
@@ -28,6 +28,8 @@ class core {
|
|
28 |
public $assets_dir;
|
29 |
public $cache_time;
|
30 |
public $dev_mode;
|
|
|
|
|
31 |
|
32 |
/**
|
33 |
* @return core , Singleton
|
@@ -50,96 +52,35 @@ class core {
|
|
50 |
* Run the plugin
|
51 |
**/
|
52 |
public function run() {
|
53 |
-
|
54 |
$this->links = array(
|
55 |
-
'docs'
|
56 |
-
'support'
|
57 |
-
'pro_plugin'
|
|
|
58 |
);
|
59 |
-
|
60 |
-
$this->is_pro_version_active
|
61 |
-
$this->plugin_base
|
62 |
-
$this->plugin_path
|
63 |
-
$this->plugin_url
|
64 |
-
$this->shortcodes_dir
|
65 |
-
$this->gutenberg_blocks_dir
|
66 |
-
$this->assets_dir
|
67 |
-
$this->cache_time
|
68 |
-
$this->dev_mode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
// internationalization
|
71 |
load_plugin_textdomain( 'ff_shortcodes', false, $this->plugin_path . '/languages' );
|
72 |
|
73 |
-
$this->pro_shortcodes = array(
|
74 |
-
'fruitful_benefits' => array(
|
75 |
-
'title' => __( 'Benefits', 'ff_shortcodes'),
|
76 |
-
'desc' => __( 'Add benefits grid', 'ff_shortcodes'),
|
77 |
-
),
|
78 |
-
'fruitful_box' => array(
|
79 |
-
'title' => __( 'Box', 'ff_shortcodes'),
|
80 |
-
'desc' => __( 'Add a box', 'ff_shortcodes'),
|
81 |
-
),
|
82 |
-
'fruitful_chart' => array(
|
83 |
-
'title' => __( 'Chart', 'ff_shortcodes'),
|
84 |
-
'desc' => __( 'Add a pie chart', 'ff_shortcodes'),
|
85 |
-
),
|
86 |
-
'fruitful_countdown' => array(
|
87 |
-
'title' => __( 'Countdown', 'ff_shortcodes'),
|
88 |
-
'desc' => __( 'Add a countdown', 'ff_shortcodes'),
|
89 |
-
),
|
90 |
-
'fruitful_counters' => array(
|
91 |
-
'title' => __( 'Counters', 'ff_shortcodes'),
|
92 |
-
'desc' => __( 'Add counters', 'ff_shortcodes'),
|
93 |
-
),
|
94 |
-
'fruitful_logos_carousel' => array(
|
95 |
-
'title' => __( 'Logos carousel', 'ff_shortcodes'),
|
96 |
-
'desc' => __( 'Add logos carousel', 'ff_shortcodes'),
|
97 |
-
),
|
98 |
-
'fruitful_odometer' => array(
|
99 |
-
'title' => __( 'Odometer', 'ff_shortcodes'),
|
100 |
-
'desc' => __( 'Add an odometer', 'ff_shortcodes'),
|
101 |
-
),
|
102 |
-
'fruitful_parallax' => array(
|
103 |
-
'title' => __( 'Parallax', 'ff_shortcodes'),
|
104 |
-
'desc' => __( 'Add a parallax', 'ff_shortcodes'),
|
105 |
-
),
|
106 |
-
'fruitful_pricing_tables' => array(
|
107 |
-
'title' => __( 'Pricing Tables', 'ff_shortcodes'),
|
108 |
-
'desc' => __( 'Add a pricing table', 'ff_shortcodes'),
|
109 |
-
),
|
110 |
-
'fruitful_quote' => array(
|
111 |
-
'title' => __( 'Quote', 'ff_shortcodes'),
|
112 |
-
'desc' => __( 'Add a quote', 'ff_shortcodes'),
|
113 |
-
),
|
114 |
-
'fruitful_separator' => array(
|
115 |
-
'title' => __( 'Separator 2', 'ff_shortcodes'),
|
116 |
-
'desc' => __( 'Add separator', 'ff_shortcodes'),
|
117 |
-
),
|
118 |
-
'fruitful_slider' => array(
|
119 |
-
'title' => __( 'Slider', 'ff_shortcodes'),
|
120 |
-
'desc' => __( 'Add slider', 'ff_shortcodes'),
|
121 |
-
),
|
122 |
-
'fruitful_social_icons' => array(
|
123 |
-
'title' => __( 'Social Icons', 'ff_shortcodes'),
|
124 |
-
'desc' => __( 'Add social icons', 'ff_shortcodes'),
|
125 |
-
),
|
126 |
-
'fruitful_team_members' => array(
|
127 |
-
'title' => __( 'Team Members', 'ff_shortcodes'),
|
128 |
-
'desc' => __( 'Add team grid', 'ff_shortcodes'),
|
129 |
-
),
|
130 |
-
'fruitful_testimonials' => array(
|
131 |
-
'title' => __( 'Testimonials', 'ff_shortcodes'),
|
132 |
-
'desc' => __( 'Add testimonials grid', 'ff_shortcodes'),
|
133 |
-
),
|
134 |
-
'fruitful_timeline' => array(
|
135 |
-
'title' => __( 'Timeline', 'ff_shortcodes'),
|
136 |
-
'desc' => __( 'Add timeline', 'ff_shortcodes'),
|
137 |
-
),
|
138 |
-
'fruitful_ttt' => array(
|
139 |
-
'title' => __( 'Tabs / Toggle', 'ff_shortcodes'),
|
140 |
-
'desc' => __( 'Add tabs / tour or toggles', 'ff_shortcodes'),
|
141 |
-
),
|
142 |
-
);
|
143 |
|
144 |
// load core classes
|
145 |
$this->_dispatch();
|
@@ -199,6 +140,23 @@ class core {
|
|
199 |
}
|
200 |
|
201 |
$this->shortcodes = apply_filters( 'ff_shortcodes_list', $this->shortcodes );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
|
203 |
}
|
204 |
|
@@ -224,7 +182,7 @@ class core {
|
|
224 |
// Autoload shortcodes
|
225 |
utils::autoload_dir( $this->plugin_path . $this->shortcodes_dir, 1, 'init.php' );
|
226 |
|
227 |
-
if( utils::is_gutenberg() && file_exists( $this->plugin_path . $this->
|
228 |
// Autoload gutenberg blocks
|
229 |
utils::autoload_dir( $this->plugin_path . $this->gutenberg_blocks_dir, 1, 'init.php' );
|
230 |
}
|
14 |
public $model;
|
15 |
public $view;
|
16 |
public $controller;
|
17 |
+
|
18 |
+
public $shortcodes = array();
|
19 |
+
public $links = array();
|
20 |
+
public $pro_shortcodes = array();
|
21 |
|
22 |
public $is_pro_version_active;
|
23 |
public $plugin_base;
|
28 |
public $assets_dir;
|
29 |
public $cache_time;
|
30 |
public $dev_mode;
|
31 |
+
public $plugin_config_dir;
|
32 |
+
public $config;
|
33 |
|
34 |
/**
|
35 |
* @return core , Singleton
|
52 |
* Run the plugin
|
53 |
**/
|
54 |
public function run() {
|
55 |
+
|
56 |
$this->links = array(
|
57 |
+
'docs' => 'https://shortcodes.fruitfulcode.com/shortcodes/',
|
58 |
+
'support' => 'https://support.fruitfulcode.com/hc/en-us',
|
59 |
+
'pro_plugin' => 'https://shortcodes.fruitfulcode.com/get-pro/',
|
60 |
+
'suggest_your_shortcode' => 'https://shortcodes.fruitfulcode.com/suggest-your-shortcode/',
|
61 |
);
|
62 |
+
|
63 |
+
$this->is_pro_version_active = in_array( 'fruitful-shortcodes-pro/ff-shortcodes-pro.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) );
|
64 |
+
$this->plugin_base = plugin_basename( _FF_SHORTCODES_PLUGIN_FILE_ );
|
65 |
+
$this->plugin_path = plugin_dir_path( _FF_SHORTCODES_PLUGIN_FILE_ );
|
66 |
+
$this->plugin_url = plugin_dir_url( _FF_SHORTCODES_PLUGIN_FILE_ );
|
67 |
+
$this->shortcodes_dir = '/core/shortcodes/';
|
68 |
+
$this->gutenberg_blocks_dir = '/core/gutenberg_blocks/';
|
69 |
+
$this->assets_dir = '/assets/shared/';
|
70 |
+
$this->cache_time = '071120180241';
|
71 |
+
$this->dev_mode = defined( 'FF_SHORTCODES_DEBUG' ) && FF_SHORTCODES_DEBUG;
|
72 |
+
|
73 |
+
$this->plugin_config_dir = 'core/config';
|
74 |
+
$config_path = "{$this->plugin_path}{$this->plugin_config_dir}/config.php";
|
75 |
+
$this->config = is_file( $config_path ) ? include $config_path : null;
|
76 |
+
$this->config = apply_filters( 'ff_shortcodes_config', $this->config );
|
77 |
+
|
78 |
+
$this->pro_shortcodes = $this->config['pro_shortcodes'];
|
79 |
+
|
80 |
|
81 |
// internationalization
|
82 |
load_plugin_textdomain( 'ff_shortcodes', false, $this->plugin_path . '/languages' );
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
// load core classes
|
86 |
$this->_dispatch();
|
140 |
}
|
141 |
|
142 |
$this->shortcodes = apply_filters( 'ff_shortcodes_list', $this->shortcodes );
|
143 |
+
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Add 'Suggest your shortcode'
|
147 |
+
**/
|
148 |
+
$this->shortcodes['suggest_your_shortcode'] = array(
|
149 |
+
'path' => '',
|
150 |
+
'url' => '',
|
151 |
+
'icon' => "{$this->plugin_url}/assets/img/suggest_your_shortcode/admin-icon.svg",
|
152 |
+
'title' => esc_html__( 'Custom shortcode', 'ff_shortcodes' ),
|
153 |
+
'desc' => esc_html__( 'Give us suggestion', 'ff_shortcodes' ),
|
154 |
+
'is_pro' => false,
|
155 |
+
'direct_link' => $this->links['suggest_your_shortcode']
|
156 |
+
);
|
157 |
+
|
158 |
+
|
159 |
+
$this->shortcodes = apply_filters( 'ff_shortcodes_list_final', $this->shortcodes );
|
160 |
|
161 |
}
|
162 |
|
182 |
// Autoload shortcodes
|
183 |
utils::autoload_dir( $this->plugin_path . $this->shortcodes_dir, 1, 'init.php' );
|
184 |
|
185 |
+
if( utils::is_gutenberg() && file_exists( $this->plugin_path . $this->gutenberg_blocks_dir ) ) {
|
186 |
// Autoload gutenberg blocks
|
187 |
utils::autoload_dir( $this->plugin_path . $this->gutenberg_blocks_dir, 1, 'init.php' );
|
188 |
}
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_alert/block/block.build.js
ADDED
@@ -0,0 +1,291 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/******/ (function(modules) { // webpackBootstrap
|
2 |
+
/******/ // The module cache
|
3 |
+
/******/ var installedModules = {};
|
4 |
+
/******/
|
5 |
+
/******/ // The require function
|
6 |
+
/******/ function __webpack_require__(moduleId) {
|
7 |
+
/******/
|
8 |
+
/******/ // Check if module is in cache
|
9 |
+
/******/ if(installedModules[moduleId]) {
|
10 |
+
/******/ return installedModules[moduleId].exports;
|
11 |
+
/******/ }
|
12 |
+
/******/ // Create a new module (and put it into the cache)
|
13 |
+
/******/ var module = installedModules[moduleId] = {
|
14 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
17 |
+
/******/ };
|
18 |
+
/******/
|
19 |
+
/******/ // Execute the module function
|
20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
+
/******/
|
22 |
+
/******/ // Flag the module as loaded
|
23 |
+
/******/ module.l = true;
|
24 |
+
/******/
|
25 |
+
/******/ // Return the exports of the module
|
26 |
+
/******/ return module.exports;
|
27 |
+
/******/ }
|
28 |
+
/******/
|
29 |
+
/******/
|
30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
31 |
+
/******/ __webpack_require__.m = modules;
|
32 |
+
/******/
|
33 |
+
/******/ // expose the module cache
|
34 |
+
/******/ __webpack_require__.c = installedModules;
|
35 |
+
/******/
|
36 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
40 |
+
/******/ }
|
41 |
+
/******/ };
|
42 |
+
/******/
|
43 |
+
/******/ // define __esModule on exports
|
44 |
+
/******/ __webpack_require__.r = function(exports) {
|
45 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
46 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
47 |
+
/******/ }
|
48 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
49 |
+
/******/ };
|
50 |
+
/******/
|
51 |
+
/******/ // create a fake namespace object
|
52 |
+
/******/ // mode & 1: value is a module id, require it
|
53 |
+
/******/ // mode & 2: merge all properties of value into the ns
|
54 |
+
/******/ // mode & 4: return value when already ns object
|
55 |
+
/******/ // mode & 8|1: behave like require
|
56 |
+
/******/ __webpack_require__.t = function(value, mode) {
|
57 |
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
58 |
+
/******/ if(mode & 8) return value;
|
59 |
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
60 |
+
/******/ var ns = Object.create(null);
|
61 |
+
/******/ __webpack_require__.r(ns);
|
62 |
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
63 |
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
64 |
+
/******/ return ns;
|
65 |
+
/******/ };
|
66 |
+
/******/
|
67 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
68 |
+
/******/ __webpack_require__.n = function(module) {
|
69 |
+
/******/ var getter = module && module.__esModule ?
|
70 |
+
/******/ function getDefault() { return module['default']; } :
|
71 |
+
/******/ function getModuleExports() { return module; };
|
72 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
73 |
+
/******/ return getter;
|
74 |
+
/******/ };
|
75 |
+
/******/
|
76 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
77 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
78 |
+
/******/
|
79 |
+
/******/ // __webpack_public_path__
|
80 |
+
/******/ __webpack_require__.p = "";
|
81 |
+
/******/
|
82 |
+
/******/
|
83 |
+
/******/ // Load entry module and return exports
|
84 |
+
/******/ return __webpack_require__(__webpack_require__.s = 0);
|
85 |
+
/******/ })
|
86 |
+
/************************************************************************/
|
87 |
+
/******/ ({
|
88 |
+
|
89 |
+
/***/ "./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_alert/block/block.js":
|
90 |
+
/*!***************************************************************************************!*\
|
91 |
+
!*** ./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_alert/block/block.js ***!
|
92 |
+
\***************************************************************************************/
|
93 |
+
/*! no static exports found */
|
94 |
+
/***/ (function(module, exports) {
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Internationalization function, can be used like we do that in WordPress, e.g.:
|
98 |
+
* __( 'My text', 'textdomain')
|
99 |
+
*/
|
100 |
+
var _wp$i18n = wp.i18n,
|
101 |
+
__ = _wp$i18n.__,
|
102 |
+
_x = _wp$i18n._x,
|
103 |
+
_n = _wp$i18n._n,
|
104 |
+
_nx = _wp$i18n._nx;
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Import Gutenberg Components to use
|
108 |
+
*/
|
109 |
+
|
110 |
+
var _wp$editor = wp.editor,
|
111 |
+
RichText = _wp$editor.RichText,
|
112 |
+
InspectorControls = _wp$editor.InspectorControls,
|
113 |
+
BlockControls = _wp$editor.BlockControls,
|
114 |
+
BlockAlignmentToolbar = _wp$editor.BlockAlignmentToolbar,
|
115 |
+
ColorPalette = _wp$editor.ColorPalette;
|
116 |
+
var _wp$components = wp.components,
|
117 |
+
PanelBody = _wp$components.PanelBody,
|
118 |
+
SelectControl = _wp$components.SelectControl,
|
119 |
+
TextControl = _wp$components.TextControl,
|
120 |
+
Toolbar = _wp$components.Toolbar;
|
121 |
+
var registerBlockType = wp.blocks.registerBlockType;
|
122 |
+
|
123 |
+
|
124 |
+
registerBlockType('fruitful-blocks/fruitful-alert', {
|
125 |
+
title: __('Fruitful Alert', 'ff-shortcodes'),
|
126 |
+
description: __('Customizable Alert', 'ff-shortcodes'),
|
127 |
+
icon: wp.element.createElement(
|
128 |
+
'svg',
|
129 |
+
{ viewBox: '0 0 32 32', version: '1.1' },
|
130 |
+
wp.element.createElement(
|
131 |
+
'g',
|
132 |
+
{ stroke: 'none', 'stroke-width': '1', fill: 'none', 'fill-rule': 'evenodd' },
|
133 |
+
wp.element.createElement('rect', { x: '0.5', stroke: '#4A4A4A', y: '8.5', width: '31', height: '15', rx: '3' }),
|
134 |
+
wp.element.createElement('circle', { cx: '8', stroke: '#4A4A4A', cy: '16', r: '1.5' }),
|
135 |
+
wp.element.createElement('circle', { cx: '16', stroke: '#4A4A4A', cy: '16', r: '1.5' }),
|
136 |
+
wp.element.createElement('circle', { cx: '24', stroke: '#4A4A4A', cy: '16', r: '1.5' })
|
137 |
+
)
|
138 |
+
),
|
139 |
+
category: 'fruitful-blocks',
|
140 |
+
|
141 |
+
supports: {
|
142 |
+
// add a possibility to change block ID
|
143 |
+
anchor: false,
|
144 |
+
// Add the support for block's alignment (left, center, right, wide, full).
|
145 |
+
align: false,
|
146 |
+
// add a possibility to change block class name
|
147 |
+
customClassName: true,
|
148 |
+
// By default, Gutenberg will allow a block’s markup to be edited individually.
|
149 |
+
html: false,
|
150 |
+
// set to false to use this block just one per post / page
|
151 |
+
multiple: true
|
152 |
+
},
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Declare changeable block attributes
|
156 |
+
*/
|
157 |
+
attributes: {
|
158 |
+
content: {
|
159 |
+
type: 'string',
|
160 |
+
default: 'Alert'
|
161 |
+
},
|
162 |
+
id: {
|
163 |
+
type: 'string',
|
164 |
+
// generate an unique element ID
|
165 |
+
default: ''
|
166 |
+
},
|
167 |
+
type: {
|
168 |
+
type: 'string',
|
169 |
+
default: 'success'
|
170 |
+
},
|
171 |
+
align: {
|
172 |
+
type: 'string',
|
173 |
+
default: 'left'
|
174 |
+
}
|
175 |
+
},
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Following function called when you edit your block
|
179 |
+
* through Gutenberg Editor
|
180 |
+
*/
|
181 |
+
edit: function edit(props) {
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Properties & attributes
|
185 |
+
*/
|
186 |
+
var _props$attributes = props.attributes,
|
187 |
+
content = _props$attributes.content,
|
188 |
+
align = _props$attributes.align,
|
189 |
+
id = _props$attributes.id,
|
190 |
+
type = _props$attributes.type,
|
191 |
+
setAttributes = props.setAttributes,
|
192 |
+
className = props.className,
|
193 |
+
clientId = props.clientId;
|
194 |
+
|
195 |
+
|
196 |
+
var updateContent = function updateContent(content) {
|
197 |
+
props.setAttributes({ content: content });
|
198 |
+
};
|
199 |
+
|
200 |
+
setAttributes({ id: 'block-' + clientId });
|
201 |
+
|
202 |
+
return [
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Block controls appears on element focus in editor
|
206 |
+
*/
|
207 |
+
wp.element.createElement(
|
208 |
+
BlockControls,
|
209 |
+
null,
|
210 |
+
wp.element.createElement(BlockAlignmentToolbar, { value: align, onChange: function onChange(align) {
|
211 |
+
return setAttributes({ align: align });
|
212 |
+
} })
|
213 |
+
),
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Inspector controls items will be rendered in sidebar when you click on component
|
217 |
+
*/
|
218 |
+
wp.element.createElement(
|
219 |
+
InspectorControls,
|
220 |
+
null,
|
221 |
+
wp.element.createElement(
|
222 |
+
PanelBody,
|
223 |
+
{ title: __('Attributes', 'ff-shortcodes'), initialOpen: true },
|
224 |
+
wp.element.createElement(SelectControl, {
|
225 |
+
label: __('Type', 'ff-shortcodes'),
|
226 |
+
value: type,
|
227 |
+
options: [{ label: __('Success', 'ff-shortcodes'), value: 'success' }, { label: __('Info', 'ff-shortcodes'), value: 'info' }, { label: __('Warning', 'ff-shortcodes'), value: 'warning' }, { label: __('Danger', 'ff-shortcodes'), value: 'danger' }],
|
228 |
+
onChange: function onChange(value) {
|
229 |
+
return setAttributes({ type: value });
|
230 |
+
}
|
231 |
+
})
|
232 |
+
)
|
233 |
+
),
|
234 |
+
|
235 |
+
/**
|
236 |
+
* This element will be rendered directly in content editor
|
237 |
+
*/
|
238 |
+
wp.element.createElement(
|
239 |
+
'div',
|
240 |
+
{ style: { textAlign: align },
|
241 |
+
className: className + ' ff fruitful_alert ff-alert-' + type + ' ff-id-' + id },
|
242 |
+
wp.element.createElement('i', { className: 'ff-icon' }),
|
243 |
+
wp.element.createElement(RichText, {
|
244 |
+
value: content,
|
245 |
+
onChange: updateContent
|
246 |
+
}),
|
247 |
+
wp.element.createElement('a', { href: '#', className: 'ff-alert-dismiss' })
|
248 |
+
)];
|
249 |
+
},
|
250 |
+
|
251 |
+
/**
|
252 |
+
* Following function saves block data into post content
|
253 |
+
*/
|
254 |
+
save: function save(props) {
|
255 |
+
var _props$attributes2 = props.attributes,
|
256 |
+
content = _props$attributes2.content,
|
257 |
+
align = _props$attributes2.align,
|
258 |
+
id = _props$attributes2.id,
|
259 |
+
type = _props$attributes2.type;
|
260 |
+
|
261 |
+
|
262 |
+
return wp.element.createElement(
|
263 |
+
'div',
|
264 |
+
{ style: { textAlign: align },
|
265 |
+
className: 'ff fruitful_alert ff-alert-' + type + ' ff-id-' + id },
|
266 |
+
wp.element.createElement('i', { className: 'ff-icon' }),
|
267 |
+
wp.element.createElement(RichText.Content, {
|
268 |
+
tagName: 'div',
|
269 |
+
value: content
|
270 |
+
}),
|
271 |
+
wp.element.createElement('a', { href: '#', className: 'ff-alert-dismiss' })
|
272 |
+
);
|
273 |
+
}
|
274 |
+
});
|
275 |
+
|
276 |
+
/***/ }),
|
277 |
+
|
278 |
+
/***/ 0:
|
279 |
+
/*!*********************************************************************************************!*\
|
280 |
+
!*** multi ./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_alert/block/block.js ***!
|
281 |
+
\*********************************************************************************************/
|
282 |
+
/*! no static exports found */
|
283 |
+
/***/ (function(module, exports, __webpack_require__) {
|
284 |
+
|
285 |
+
module.exports = __webpack_require__(/*! F:/OSPanel/domains/_ff_/local/wp499.loc/wp-content/plugins/fruitful-shortcodes/fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_alert/block/block.js */"./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_alert/block/block.js");
|
286 |
+
|
287 |
+
|
288 |
+
/***/ })
|
289 |
+
|
290 |
+
/******/ });
|
291 |
+
//# sourceMappingURL=block.build.js.map
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_alert/block/block.build.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_alert/block/block.js"],"names":["wp","i18n","__","_x","_n","_nx","editor","RichText","InspectorControls","BlockControls","BlockAlignmentToolbar","ColorPalette","components","PanelBody","SelectControl","TextControl","Toolbar","registerBlockType","blocks","title","description","icon","category","supports","anchor","align","customClassName","html","multiple","attributes","content","type","default","id","edit","props","setAttributes","className","clientId","updateContent","label","value","textAlign","save"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAA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AAAA,MAMfF,IANe,sBAMfA,IANe;;;AAShB,SACC;AAAA;AAAA,KAAK,OAAO,EAACW,WAAWjB,KAAZ,EAAZ;AACE,eAAY,gCAAgCM,IAAhC,GAAuC,SAAvC,GAAmDE,EADjE;AAEC,mCAAG,WAAU,SAAb,GAFD;AAGC,4BAAC,QAAD,CAAU,OAAV;AACC,aAAQ,KADT;AAEC,WAAOH;AAFR,KAHD;AAOC,mCAAG,MAAK,GAAR,EAAY,WAAU,kBAAtB;AAPD,GADD;AAWA;AA9IkD,CAApD,E","file":"fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_alert/block/block.build.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/**\n * Internationalization function, can be used like we do that in WordPress, e.g.:\n * __( 'My text', 'textdomain')\n */\nconst { __, _x, _n, _nx } = wp.i18n;\n\n/**\n * Import Gutenberg Components to use\n */\nconst {\n\tRichText,\n\tInspectorControls,\n\tBlockControls,\n\tBlockAlignmentToolbar,\n\tColorPalette\n} = wp.editor;\n\nconst {\n\tPanelBody,\n\tSelectControl,\n\tTextControl,\n\tToolbar\n} = wp.components;\n\n\nconst {\n\tregisterBlockType\n} = wp.blocks;\n\nregisterBlockType('fruitful-blocks/fruitful-alert', {\n\ttitle: __('Fruitful Alert', 'ff-shortcodes'),\n\tdescription: __('Customizable Alert', 'ff-shortcodes'),\n\ticon: <svg viewBox=\"0 0 32 32\" version=\"1.1\">\n\t\t<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n\t\t\t<rect x=\"0.5\" stroke=\"#4A4A4A\" y=\"8.5\" width=\"31\" height=\"15\" rx=\"3\"></rect>\n\t\t\t<circle cx=\"8\" stroke=\"#4A4A4A\" cy=\"16\" r=\"1.5\"></circle>\n\t\t\t<circle cx=\"16\" stroke=\"#4A4A4A\" cy=\"16\" r=\"1.5\"></circle>\n\t\t\t<circle cx=\"24\" stroke=\"#4A4A4A\" cy=\"16\" r=\"1.5\"></circle>\n\t\t</g>\n\t</svg>,\n\tcategory: 'fruitful-blocks',\n\n\tsupports: {\n\t\t// add a possibility to change block ID\n\t\tanchor: false,\n\t\t// Add the support for block's alignment (left, center, right, wide, full).\n\t\talign: false,\n\t\t// add a possibility to change block class name\n\t\tcustomClassName: true,\n\t\t// By default, Gutenberg will allow a block’s markup to be edited individually.\n\t\thtml: false,\n\t\t// set to false to use this block just one per post / page\n\t\tmultiple: true,\n\t},\n\n\t/**\n\t * Declare changeable block attributes\n\t */\n\tattributes: {\n\t\tcontent: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'Alert',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'string',\n\t\t\t// generate an unique element ID\n\t\t\tdefault: ''\n\t\t},\n\t\ttype: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'success'\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'left'\n\t\t},\n\t},\n\n\t/**\n\t * Following function called when you edit your block\n\t * through Gutenberg Editor\n\t */\n\tedit: (props) => {\n\n\t\t/**\n\t\t * Properties & attributes\n\t\t */\n\t\tconst {\n\t\t\tattributes: {\n\t\t\t\tcontent,\n\t\t\t\talign,\n\t\t\t\tid,\n\t\t\t\ttype\n\t\t\t},\n\t\t\tsetAttributes,\n\t\t\tclassName,\n\t\t\tclientId\n\t\t} = props;\n\n\t\tconst updateContent = (content) => {\n\t\t\tprops.setAttributes({content: content});\n\t\t};\n\n\t\tsetAttributes( {id: 'block-' + clientId});\n\n\t\treturn ([\n\n\t\t\t/**\n\t\t\t * Block controls appears on element focus in editor\n\t\t\t */\n\t\t\t<BlockControls>\n\t\t\t\t<BlockAlignmentToolbar value={align} onChange={(align) => setAttributes({align: align})}/>\n\t\t\t</BlockControls>,\n\n\t\t\t/**\n\t\t\t * Inspector controls items will be rendered in sidebar when you click on component\n\t\t\t */\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={__('Attributes', 'ff-shortcodes')} initialOpen={true}>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={__('Type', 'ff-shortcodes')}\n\t\t\t\t\t\tvalue={type}\n\t\t\t\t\t\toptions={[\n\t\t\t\t\t\t\t{label: __('Success', 'ff-shortcodes'), value: 'success'},\n\t\t\t\t\t\t\t{label: __('Info', 'ff-shortcodes'), value: 'info'},\n\t\t\t\t\t\t\t{label: __('Warning', 'ff-shortcodes'), value: 'warning'},\n\t\t\t\t\t\t\t{label: __('Danger', 'ff-shortcodes'), value: 'danger'},\n\t\t\t\t\t\t]}\n\t\t\t\t\t\tonChange={(value) => setAttributes({type: value})}\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>,\n\n\t\t\t/**\n\t\t\t * This element will be rendered directly in content editor\n\t\t\t */\n\t\t\t<div style={{textAlign: align}}\n\t\t\t\t className={className + ' ff fruitful_alert ff-alert-' + type + ' ff-id-' + id}>\n\t\t\t\t<i className=\"ff-icon\"/>\n\t\t\t\t<RichText\n\t\t\t\t\tvalue={content}\n\t\t\t\t\tonChange={updateContent}\n\t\t\t\t/>\n\t\t\t\t<a href=\"#\" className=\"ff-alert-dismiss\"></a>\n\t\t\t</div>\n\t\t]);\n\t},\n\n\t/**\n\t * Following function saves block data into post content\n\t */\n\tsave: (props) => {\n\n\t\tconst {\n\t\t\tcontent,\n\t\t\talign,\n\t\t\tid,\n\t\t\ttype\n\t\t} = props.attributes;\n\n\t\treturn (\n\t\t\t<div style={{textAlign: align}}\n\t\t\t\t className={ 'ff fruitful_alert ff-alert-' + type + ' ff-id-' + id}>\n\t\t\t\t<i className=\"ff-icon\"/>\n\t\t\t\t<RichText.Content \n\t\t\t\t\ttagName='div'\n\t\t\t\t\tvalue={content}\n\t\t\t\t/>\n\t\t\t\t<a href=\"#\" className=\"ff-alert-dismiss\"></a>\n\t\t\t</div>\n\t\t);\n\t},\n});\n"],"sourceRoot":""}
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_alert/block/block.js
ADDED
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Internationalization function, can be used like we do that in WordPress, e.g.:
|
3 |
+
* __( 'My text', 'textdomain')
|
4 |
+
*/
|
5 |
+
const { __, _x, _n, _nx } = wp.i18n;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Import Gutenberg Components to use
|
9 |
+
*/
|
10 |
+
const {
|
11 |
+
RichText,
|
12 |
+
InspectorControls,
|
13 |
+
BlockControls,
|
14 |
+
BlockAlignmentToolbar,
|
15 |
+
ColorPalette
|
16 |
+
} = wp.editor;
|
17 |
+
|
18 |
+
const {
|
19 |
+
PanelBody,
|
20 |
+
SelectControl,
|
21 |
+
TextControl,
|
22 |
+
Toolbar
|
23 |
+
} = wp.components;
|
24 |
+
|
25 |
+
|
26 |
+
const {
|
27 |
+
registerBlockType
|
28 |
+
} = wp.blocks;
|
29 |
+
|
30 |
+
registerBlockType('fruitful-blocks/fruitful-alert', {
|
31 |
+
title: __('Fruitful Alert', 'ff-shortcodes'),
|
32 |
+
description: __('Customizable Alert', 'ff-shortcodes'),
|
33 |
+
icon: <svg viewBox="0 0 32 32" version="1.1">
|
34 |
+
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
35 |
+
<rect x="0.5" stroke="#4A4A4A" y="8.5" width="31" height="15" rx="3"></rect>
|
36 |
+
<circle cx="8" stroke="#4A4A4A" cy="16" r="1.5"></circle>
|
37 |
+
<circle cx="16" stroke="#4A4A4A" cy="16" r="1.5"></circle>
|
38 |
+
<circle cx="24" stroke="#4A4A4A" cy="16" r="1.5"></circle>
|
39 |
+
</g>
|
40 |
+
</svg>,
|
41 |
+
category: 'fruitful-blocks',
|
42 |
+
|
43 |
+
supports: {
|
44 |
+
// add a possibility to change block ID
|
45 |
+
anchor: false,
|
46 |
+
// Add the support for block's alignment (left, center, right, wide, full).
|
47 |
+
align: false,
|
48 |
+
// add a possibility to change block class name
|
49 |
+
customClassName: true,
|
50 |
+
// By default, Gutenberg will allow a block’s markup to be edited individually.
|
51 |
+
html: false,
|
52 |
+
// set to false to use this block just one per post / page
|
53 |
+
multiple: true,
|
54 |
+
},
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Declare changeable block attributes
|
58 |
+
*/
|
59 |
+
attributes: {
|
60 |
+
content: {
|
61 |
+
type: 'string',
|
62 |
+
default: 'Alert',
|
63 |
+
},
|
64 |
+
id: {
|
65 |
+
type: 'string',
|
66 |
+
// generate an unique element ID
|
67 |
+
default: ''
|
68 |
+
},
|
69 |
+
type: {
|
70 |
+
type: 'string',
|
71 |
+
default: 'success'
|
72 |
+
},
|
73 |
+
align: {
|
74 |
+
type: 'string',
|
75 |
+
default: 'left'
|
76 |
+
},
|
77 |
+
},
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Following function called when you edit your block
|
81 |
+
* through Gutenberg Editor
|
82 |
+
*/
|
83 |
+
edit: (props) => {
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Properties & attributes
|
87 |
+
*/
|
88 |
+
const {
|
89 |
+
attributes: {
|
90 |
+
content,
|
91 |
+
align,
|
92 |
+
id,
|
93 |
+
type
|
94 |
+
},
|
95 |
+
setAttributes,
|
96 |
+
className,
|
97 |
+
clientId
|
98 |
+
} = props;
|
99 |
+
|
100 |
+
const updateContent = (content) => {
|
101 |
+
props.setAttributes({content: content});
|
102 |
+
};
|
103 |
+
|
104 |
+
setAttributes( {id: 'block-' + clientId});
|
105 |
+
|
106 |
+
return ([
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Block controls appears on element focus in editor
|
110 |
+
*/
|
111 |
+
<BlockControls>
|
112 |
+
<BlockAlignmentToolbar value={align} onChange={(align) => setAttributes({align: align})}/>
|
113 |
+
</BlockControls>,
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Inspector controls items will be rendered in sidebar when you click on component
|
117 |
+
*/
|
118 |
+
<InspectorControls>
|
119 |
+
<PanelBody title={__('Attributes', 'ff-shortcodes')} initialOpen={true}>
|
120 |
+
<SelectControl
|
121 |
+
label={__('Type', 'ff-shortcodes')}
|
122 |
+
value={type}
|
123 |
+
options={[
|
124 |
+
{label: __('Success', 'ff-shortcodes'), value: 'success'},
|
125 |
+
{label: __('Info', 'ff-shortcodes'), value: 'info'},
|
126 |
+
{label: __('Warning', 'ff-shortcodes'), value: 'warning'},
|
127 |
+
{label: __('Danger', 'ff-shortcodes'), value: 'danger'},
|
128 |
+
]}
|
129 |
+
onChange={(value) => setAttributes({type: value})}
|
130 |
+
/>
|
131 |
+
</PanelBody>
|
132 |
+
</InspectorControls>,
|
133 |
+
|
134 |
+
/**
|
135 |
+
* This element will be rendered directly in content editor
|
136 |
+
*/
|
137 |
+
<div style={{textAlign: align}}
|
138 |
+
className={className + ' ff fruitful_alert ff-alert-' + type + ' ff-id-' + id}>
|
139 |
+
<i className="ff-icon"/>
|
140 |
+
<RichText
|
141 |
+
value={content}
|
142 |
+
onChange={updateContent}
|
143 |
+
/>
|
144 |
+
<a href="#" className="ff-alert-dismiss"></a>
|
145 |
+
</div>
|
146 |
+
]);
|
147 |
+
},
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Following function saves block data into post content
|
151 |
+
*/
|
152 |
+
save: (props) => {
|
153 |
+
|
154 |
+
const {
|
155 |
+
content,
|
156 |
+
align,
|
157 |
+
id,
|
158 |
+
type
|
159 |
+
} = props.attributes;
|
160 |
+
|
161 |
+
return (
|
162 |
+
<div style={{textAlign: align}}
|
163 |
+
className={ 'ff fruitful_alert ff-alert-' + type + ' ff-id-' + id}>
|
164 |
+
<i className="ff-icon"/>
|
165 |
+
<RichText.Content
|
166 |
+
tagName='div'
|
167 |
+
value={content}
|
168 |
+
/>
|
169 |
+
<a href="#" className="ff-alert-dismiss"></a>
|
170 |
+
</div>
|
171 |
+
);
|
172 |
+
},
|
173 |
+
});
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_alert/init.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// enqueue admin scripts and styles
|
4 |
+
add_action( 'enqueue_block_editor_assets', function () {
|
5 |
+
|
6 |
+
$block_name = 'fruitful_alert';
|
7 |
+
$block_url = FF_SHORTCODES()->plugin_url . FF_SHORTCODES()->gutenberg_blocks_dir . '/' . $block_name . '/';
|
8 |
+
$assets_url = FF_SHORTCODES()->plugin_url . FF_SHORTCODES()->assets_dir . '/' . $block_name . '/';
|
9 |
+
|
10 |
+
// Block Scripts
|
11 |
+
wp_enqueue_script(
|
12 |
+
'fruitful-blocks-alert', // Handle
|
13 |
+
$block_url . 'block/block.build.js',
|
14 |
+
[ 'wp-editor', 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components' ],
|
15 |
+
FF_SHORTCODES()->cache_time,
|
16 |
+
true
|
17 |
+
);
|
18 |
+
|
19 |
+
// Block Styles
|
20 |
+
wp_enqueue_style(
|
21 |
+
'fruitful-blocks-alert', // Handle
|
22 |
+
$assets_url . '/css/styles.css',
|
23 |
+
[ 'wp-edit-blocks' ],
|
24 |
+
'b' . FF_SHORTCODES()->cache_time
|
25 |
+
);
|
26 |
+
|
27 |
+
// Set translations ( since WP 5.0 )
|
28 |
+
if ( function_exists( 'wp_set_script_translations' ) ) {
|
29 |
+
wp_set_script_translations( 'fruitful-blocks-alert', 'ff-shortcodes' );
|
30 |
+
}
|
31 |
+
|
32 |
+
// pre WP 5.0 with gutenberg plugin
|
33 |
+
if ( function_exists( 'gutenberg_get_jed_locale_data' ) ) {
|
34 |
+
wp_add_inline_script(
|
35 |
+
'fruitful-blocks-alert',
|
36 |
+
sprintf(
|
37 |
+
'var fruitful_blocks_alert = { localeData: %s };',
|
38 |
+
json_encode( gutenberg_get_jed_locale_data( 'ff-shortcodes' ) )
|
39 |
+
),
|
40 |
+
'before'
|
41 |
+
);
|
42 |
+
}
|
43 |
+
|
44 |
+
} );
|
45 |
+
|
46 |
+
|
47 |
+
// load both front-end + back-end assets
|
48 |
+
add_action( 'enqueue_block_assets', function () {
|
49 |
+
|
50 |
+
if ( ! is_admin() ) {
|
51 |
+
wp_enqueue_style( 'ff-fruitful_alert' );
|
52 |
+
wp_enqueue_script( 'ff-fruitful_alert' );
|
53 |
+
}
|
54 |
+
|
55 |
+
} );
|
56 |
+
|
57 |
+
|
58 |
+
// register the block
|
59 |
+
add_action( 'admin_init', function () {
|
60 |
+
register_block_type( 'fruitful-blocks/fruitful-alert', [
|
61 |
+
'script' => 'fruitful-blocks-alert',
|
62 |
+
] );
|
63 |
+
} );
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_btn/block/block.build.js
ADDED
@@ -0,0 +1,588 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/******/ (function(modules) { // webpackBootstrap
|
2 |
+
/******/ // The module cache
|
3 |
+
/******/ var installedModules = {};
|
4 |
+
/******/
|
5 |
+
/******/ // The require function
|
6 |
+
/******/ function __webpack_require__(moduleId) {
|
7 |
+
/******/
|
8 |
+
/******/ // Check if module is in cache
|
9 |
+
/******/ if(installedModules[moduleId]) {
|
10 |
+
/******/ return installedModules[moduleId].exports;
|
11 |
+
/******/ }
|
12 |
+
/******/ // Create a new module (and put it into the cache)
|
13 |
+
/******/ var module = installedModules[moduleId] = {
|
14 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
17 |
+
/******/ };
|
18 |
+
/******/
|
19 |
+
/******/ // Execute the module function
|
20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
+
/******/
|
22 |
+
/******/ // Flag the module as loaded
|
23 |
+
/******/ module.l = true;
|
24 |
+
/******/
|
25 |
+
/******/ // Return the exports of the module
|
26 |
+
/******/ return module.exports;
|
27 |
+
/******/ }
|
28 |
+
/******/
|
29 |
+
/******/
|
30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
31 |
+
/******/ __webpack_require__.m = modules;
|
32 |
+
/******/
|
33 |
+
/******/ // expose the module cache
|
34 |
+
/******/ __webpack_require__.c = installedModules;
|
35 |
+
/******/
|
36 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
40 |
+
/******/ }
|
41 |
+
/******/ };
|
42 |
+
/******/
|
43 |
+
/******/ // define __esModule on exports
|
44 |
+
/******/ __webpack_require__.r = function(exports) {
|
45 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
46 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
47 |
+
/******/ }
|
48 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
49 |
+
/******/ };
|
50 |
+
/******/
|
51 |
+
/******/ // create a fake namespace object
|
52 |
+
/******/ // mode & 1: value is a module id, require it
|
53 |
+
/******/ // mode & 2: merge all properties of value into the ns
|
54 |
+
/******/ // mode & 4: return value when already ns object
|
55 |
+
/******/ // mode & 8|1: behave like require
|
56 |
+
/******/ __webpack_require__.t = function(value, mode) {
|
57 |
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
58 |
+
/******/ if(mode & 8) return value;
|
59 |
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
60 |
+
/******/ var ns = Object.create(null);
|
61 |
+
/******/ __webpack_require__.r(ns);
|
62 |
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
63 |
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
64 |
+
/******/ return ns;
|
65 |
+
/******/ };
|
66 |
+
/******/
|
67 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
68 |
+
/******/ __webpack_require__.n = function(module) {
|
69 |
+
/******/ var getter = module && module.__esModule ?
|
70 |
+
/******/ function getDefault() { return module['default']; } :
|
71 |
+
/******/ function getModuleExports() { return module; };
|
72 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
73 |
+
/******/ return getter;
|
74 |
+
/******/ };
|
75 |
+
/******/
|
76 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
77 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
78 |
+
/******/
|
79 |
+
/******/ // __webpack_public_path__
|
80 |
+
/******/ __webpack_require__.p = "";
|
81 |
+
/******/
|
82 |
+
/******/
|
83 |
+
/******/ // Load entry module and return exports
|
84 |
+
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
85 |
+
/******/ })
|
86 |
+
/************************************************************************/
|
87 |
+
/******/ ({
|
88 |
+
|
89 |
+
/***/ "./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_btn/block/block.js":
|
90 |
+
/*!*************************************************************************************!*\
|
91 |
+
!*** ./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_btn/block/block.js ***!
|
92 |
+
\*************************************************************************************/
|
93 |
+
/*! no static exports found */
|
94 |
+
/***/ (function(module, exports) {
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Internationalization function, can be used like we do that in WordPress, e.g.:
|
98 |
+
* __( 'My text', 'textdomain')
|
99 |
+
*/
|
100 |
+
var _wp$i18n = wp.i18n,
|
101 |
+
__ = _wp$i18n.__,
|
102 |
+
_x = _wp$i18n._x,
|
103 |
+
_n = _wp$i18n._n,
|
104 |
+
_nx = _wp$i18n._nx;
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Import Gutenberg Components to use
|
108 |
+
*/
|
109 |
+
|
110 |
+
var _wp$editor = wp.editor,
|
111 |
+
RichText = _wp$editor.RichText,
|
112 |
+
InspectorControls = _wp$editor.InspectorControls,
|
113 |
+
BlockControls = _wp$editor.BlockControls,
|
114 |
+
BlockAlignmentToolbar = _wp$editor.BlockAlignmentToolbar,
|
115 |
+
PanelColorSettings = _wp$editor.PanelColorSettings,
|
116 |
+
ColorPalette = _wp$editor.ColorPalette;
|
117 |
+
var _wp$components = wp.components,
|
118 |
+
RangeControl = _wp$components.RangeControl,
|
119 |
+
PanelBody = _wp$components.PanelBody,
|
120 |
+
SelectControl = _wp$components.SelectControl,
|
121 |
+
TextControl = _wp$components.TextControl,
|
122 |
+
Toolbar = _wp$components.Toolbar;
|
123 |
+
var _wp$blocks = wp.blocks,
|
124 |
+
registerBlockType = _wp$blocks.registerBlockType,
|
125 |
+
registerBlockStyle = _wp$blocks.registerBlockStyle;
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Register block style
|
129 |
+
* function adds additonal CSS class name to the block:
|
130 |
+
* is-style-default
|
131 |
+
* is-style-another-style
|
132 |
+
*/
|
133 |
+
|
134 |
+
/*
|
135 |
+
registerBlockStyle( 'fruitful-blocks/fruitful-btn', {
|
136 |
+
name: 'default',
|
137 |
+
label: __( 'Default style', 'ff-shortcodes')
|
138 |
+
});
|
139 |
+
*/
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Register block
|
143 |
+
*/
|
144 |
+
|
145 |
+
registerBlockType('fruitful-blocks/fruitful-btn', {
|
146 |
+
title: __('Fruitful Button', 'ff-shortcodes'),
|
147 |
+
description: __('Customizable button', 'ff-shortcodes'),
|
148 |
+
icon: wp.element.createElement(
|
149 |
+
'svg',
|
150 |
+
{ viewBox: '0 0 32 32', version: '1.1' },
|
151 |
+
wp.element.createElement(
|
152 |
+
'g',
|
153 |
+
{ stroke: 'none', 'stroke-width': '1', fill: 'none', 'fill-rule': 'evenodd' },
|
154 |
+
wp.element.createElement('rect', { x: '0.5', stroke: '#4A4A4A', y: '8.5', width: '31', height: '15', rx: '3' }),
|
155 |
+
wp.element.createElement('circle', { cx: '8', stroke: '#4A4A4A', cy: '16', r: '1.5' }),
|
156 |
+
wp.element.createElement('circle', { cx: '16', stroke: '#4A4A4A', cy: '16', r: '1.5' }),
|
157 |
+
wp.element.createElement('circle', { cx: '24', stroke: '#4A4A4A', cy: '16', r: '1.5' })
|
158 |
+
)
|
159 |
+
),
|
160 |
+
category: 'fruitful-blocks',
|
161 |
+
|
162 |
+
supports: {
|
163 |
+
// add a possibility to change block ID
|
164 |
+
anchor: false,
|
165 |
+
// Add the support for block's alignment (left, center, right, wide, full).
|
166 |
+
align: ['left', 'right', 'center'],
|
167 |
+
// add a possibility to change block class name
|
168 |
+
customClassName: true,
|
169 |
+
// By default, Gutenberg will allow a block’s markup to be edited individually.
|
170 |
+
html: false,
|
171 |
+
// set to false to use this block just one per post / page
|
172 |
+
multiple: true
|
173 |
+
},
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Declare changeable block attributes
|
177 |
+
*/
|
178 |
+
attributes: {
|
179 |
+
content: {
|
180 |
+
type: 'array',
|
181 |
+
source: 'children',
|
182 |
+
selector: 'a',
|
183 |
+
default: __('Click me!', 'ff-shortcodes')
|
184 |
+
},
|
185 |
+
align: {
|
186 |
+
type: 'string',
|
187 |
+
default: 'left'
|
188 |
+
},
|
189 |
+
link: {
|
190 |
+
type: 'string',
|
191 |
+
default: 'https://google.com'
|
192 |
+
},
|
193 |
+
target: {
|
194 |
+
type: 'string',
|
195 |
+
default: '_self'
|
196 |
+
},
|
197 |
+
id: {
|
198 |
+
type: 'string',
|
199 |
+
// generate an unique element ID
|
200 |
+
default: ''
|
201 |
+
},
|
202 |
+
size: {
|
203 |
+
type: 'string',
|
204 |
+
default: 'mini'
|
205 |
+
},
|
206 |
+
color: {
|
207 |
+
type: 'string',
|
208 |
+
default: 'default'
|
209 |
+
},
|
210 |
+
style: {
|
211 |
+
type: 'string',
|
212 |
+
default: 'default'
|
213 |
+
},
|
214 |
+
radius: {
|
215 |
+
type: 'string',
|
216 |
+
default: '0'
|
217 |
+
},
|
218 |
+
customFontSize: {
|
219 |
+
type: 'string',
|
220 |
+
default: ''
|
221 |
+
},
|
222 |
+
customTextColor: {
|
223 |
+
type: 'string',
|
224 |
+
default: ''
|
225 |
+
},
|
226 |
+
customLineHeight: {
|
227 |
+
type: 'string',
|
228 |
+
default: ''
|
229 |
+
},
|
230 |
+
customBtnColor: {
|
231 |
+
type: 'string',
|
232 |
+
default: ''
|
233 |
+
},
|
234 |
+
customBtnBorderColor: {
|
235 |
+
type: 'string',
|
236 |
+
default: ''
|
237 |
+
},
|
238 |
+
customHoverTextColor: {
|
239 |
+
type: 'string',
|
240 |
+
default: ''
|
241 |
+
},
|
242 |
+
customHoverBtnColor: {
|
243 |
+
type: 'string',
|
244 |
+
default: ''
|
245 |
+
},
|
246 |
+
customHoverBtnBorderColor: {
|
247 |
+
type: 'string',
|
248 |
+
default: ''
|
249 |
+
}
|
250 |
+
},
|
251 |
+
|
252 |
+
/**
|
253 |
+
* Following function called when you edit your block
|
254 |
+
* through Gutenberg Editor
|
255 |
+
*/
|
256 |
+
edit: function edit(props) {
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Properties & attributes
|
260 |
+
*/
|
261 |
+
var _props$attributes = props.attributes,
|
262 |
+
content = _props$attributes.content,
|
263 |
+
align = _props$attributes.align,
|
264 |
+
link = _props$attributes.link,
|
265 |
+
target = _props$attributes.target,
|
266 |
+
id = _props$attributes.id,
|
267 |
+
size = _props$attributes.size,
|
268 |
+
color = _props$attributes.color,
|
269 |
+
style = _props$attributes.style,
|
270 |
+
radius = _props$attributes.radius,
|
271 |
+
customFontSize = _props$attributes.customFontSize,
|
272 |
+
customLineHeight = _props$attributes.customLineHeight,
|
273 |
+
customTextColor = _props$attributes.customTextColor,
|
274 |
+
customBtnColor = _props$attributes.customBtnColor,
|
275 |
+
customBtnBorderColor = _props$attributes.customBtnBorderColor,
|
276 |
+
customHoverTextColor = _props$attributes.customHoverTextColor,
|
277 |
+
customHoverBtnColor = _props$attributes.customHoverBtnColor,
|
278 |
+
customBtnHoverBorderColor = _props$attributes.customBtnHoverBorderColor,
|
279 |
+
setAttributes = props.setAttributes,
|
280 |
+
focus = props.focus,
|
281 |
+
setFocus = props.setFocus,
|
282 |
+
className = props.className,
|
283 |
+
clientId = props.clientId;
|
284 |
+
|
285 |
+
|
286 |
+
setAttributes({ id: 'block-' + clientId });
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Render component
|
290 |
+
*/
|
291 |
+
return [
|
292 |
+
|
293 |
+
/**
|
294 |
+
* Block controls appears on element focus in editor
|
295 |
+
*/
|
296 |
+
wp.element.createElement(
|
297 |
+
BlockControls,
|
298 |
+
null,
|
299 |
+
wp.element.createElement(BlockAlignmentToolbar, { value: align, onChange: function onChange(align) {
|
300 |
+
return setAttributes({ align: align });
|
301 |
+
} })
|
302 |
+
),
|
303 |
+
|
304 |
+
/**
|
305 |
+
* Inspector controls items will be rendered in sidebar when you click on component
|
306 |
+
*/
|
307 |
+
wp.element.createElement(
|
308 |
+
InspectorControls,
|
309 |
+
null,
|
310 |
+
wp.element.createElement(
|
311 |
+
PanelBody,
|
312 |
+
{ title: __('Attributes', 'ff-shortcodes'), initialOpen: true },
|
313 |
+
wp.element.createElement(TextControl, {
|
314 |
+
label: __('Link URL', 'ff-shortcodes'),
|
315 |
+
value: link,
|
316 |
+
onChange: function onChange(value) {
|
317 |
+
return setAttributes({ link: value });
|
318 |
+
}
|
319 |
+
}),
|
320 |
+
wp.element.createElement(SelectControl, {
|
321 |
+
label: __('Target', 'ff-shortcodes'),
|
322 |
+
value: target,
|
323 |
+
options: [{ label: __('Current window', 'ff-shortcodes'), value: '_self' }, { label: __('New window', 'ff-shortcodes'), value: '_blank' }],
|
324 |
+
onChange: function onChange(value) {
|
325 |
+
return setAttributes({ target: value });
|
326 |
+
}
|
327 |
+
})
|
328 |
+
),
|
329 |
+
wp.element.createElement(
|
330 |
+
PanelBody,
|
331 |
+
{ title: __('Predefined styles', 'ff-shortcodes'), initialOpen: true },
|
332 |
+
wp.element.createElement(SelectControl, {
|
333 |
+
label: __('Size', 'ff-shortcodes'),
|
334 |
+
value: size,
|
335 |
+
options: [{ label: __('Mini', 'ff-shortcodes'), value: 'mini' }, { label: __('Small', 'ff-shortcodes'), value: 'small' }, { label: __('Large', 'ff-shortcodes'), value: 'large' }, { label: __('Extra Large', 'ff-shortcodes'), value: 'extra-large' }],
|
336 |
+
onChange: function onChange(value) {
|
337 |
+
return setAttributes({ size: value });
|
338 |
+
}
|
339 |
+
}),
|
340 |
+
wp.element.createElement(SelectControl, {
|
341 |
+
label: __('Color', 'ff-shortcodes'),
|
342 |
+
value: color,
|
343 |
+
options: [{ label: __('Default', 'ff-shortcodes'), value: 'default' }, { label: __('Primary', 'ff-shortcodes'), value: 'primary' }, { label: __('Info', 'ff-shortcodes'), value: 'info' }, { label: __('Success', 'ff-shortcodes'), value: 'success' }, { label: __('Secondary', 'ff-shortcodes'), value: 'secondary' }, { label: __('Warning', 'ff-shortcodes'), value: 'warning' }, { label: __('Inverse', 'ff-shortcodes'), value: 'inverse' }],
|
344 |
+
onChange: function onChange(value) {
|
345 |
+
return setAttributes({ color: value });
|
346 |
+
}
|
347 |
+
}),
|
348 |
+
wp.element.createElement(SelectControl, {
|
349 |
+
label: __('Style', 'ff-shortcodes'),
|
350 |
+
value: style,
|
351 |
+
options: [{ label: __('Filled', 'ff-shortcodes'), value: 'default' }, { label: __('Outline', 'ff-shortcodes'), value: 'outline' }],
|
352 |
+
onChange: function onChange(value) {
|
353 |
+
return setAttributes({ style: value });
|
354 |
+
}
|
355 |
+
})
|
356 |
+
),
|
357 |
+
wp.element.createElement(
|
358 |
+
PanelBody,
|
359 |
+
{ title: __('Custom styles', 'ff-shortcodes'), initialOpen: true },
|
360 |
+
wp.element.createElement(RangeControl, {
|
361 |
+
label: __('Radius', 'ff-shortcodes'),
|
362 |
+
value: radius,
|
363 |
+
onChange: function onChange(size) {
|
364 |
+
return setAttributes({ radius: size });
|
365 |
+
},
|
366 |
+
min: 0,
|
367 |
+
max: 20,
|
368 |
+
beforeIcon: 'editor-textcolor',
|
369 |
+
allowReset: true
|
370 |
+
}),
|
371 |
+
wp.element.createElement(RangeControl, {
|
372 |
+
label: __('Font size', 'ff-shortcodes'),
|
373 |
+
value: customFontSize,
|
374 |
+
onChange: function onChange(size) {
|
375 |
+
return setAttributes({ customFontSize: size });
|
376 |
+
},
|
377 |
+
min: 9,
|
378 |
+
max: 30,
|
379 |
+
beforeIcon: 'editor-textcolor',
|
380 |
+
allowReset: true
|
381 |
+
}),
|
382 |
+
wp.element.createElement(RangeControl, {
|
383 |
+
label: __('Line height', 'ff-shortcodes'),
|
384 |
+
value: customLineHeight,
|
385 |
+
onChange: function onChange(size) {
|
386 |
+
return setAttributes({ customLineHeight: size });
|
387 |
+
},
|
388 |
+
min: 9,
|
389 |
+
max: 50,
|
390 |
+
beforeIcon: 'editor-textcolor',
|
391 |
+
allowReset: true
|
392 |
+
}),
|
393 |
+
wp.element.createElement(PanelColorSettings, {
|
394 |
+
title: __('Text color', 'ff-shortcodes'),
|
395 |
+
initialOpen: false,
|
396 |
+
colorSettings: [{
|
397 |
+
value: customTextColor,
|
398 |
+
onChange: function onChange(colorValue) {
|
399 |
+
return setAttributes({ customTextColor: colorValue });
|
400 |
+
},
|
401 |
+
label: __('Text color', 'ff-shortcodes')
|
402 |
+
}]
|
403 |
+
}),
|
404 |
+
wp.element.createElement(PanelColorSettings, {
|
405 |
+
title: __('Background color', 'ff-shortcodes'),
|
406 |
+
initialOpen: false,
|
407 |
+
colorSettings: [{
|
408 |
+
value: customBtnColor,
|
409 |
+
onChange: function onChange(colorValue) {
|
410 |
+
return setAttributes({ customBtnColor: colorValue });
|
411 |
+
},
|
412 |
+
label: __('Background color', 'ff-shortcodes')
|
413 |
+
}]
|
414 |
+
}),
|
415 |
+
wp.element.createElement(PanelColorSettings, {
|
416 |
+
title: __('Border color', 'ff-shortcodes'),
|
417 |
+
initialOpen: false,
|
418 |
+
colorSettings: [{
|
419 |
+
value: customBtnBorderColor,
|
420 |
+
onChange: function onChange(colorValue) {
|
421 |
+
return setAttributes({ customBtnBorderColor: colorValue });
|
422 |
+
},
|
423 |
+
label: __('Border color', 'ff-shortcodes')
|
424 |
+
}]
|
425 |
+
})
|
426 |
+
),
|
427 |
+
wp.element.createElement(
|
428 |
+
PanelBody,
|
429 |
+
{ title: __('Custom hover styles', 'ff-shortcodes'), initialOpen: true },
|
430 |
+
wp.element.createElement(PanelColorSettings, {
|
431 |
+
title: __('Hover : Text color', 'ff-shortcodes'),
|
432 |
+
initialOpen: false,
|
433 |
+
colorSettings: [{
|
434 |
+
value: customHoverTextColor,
|
435 |
+
onChange: function onChange(colorValue) {
|
436 |
+
return setAttributes({ customHoverTextColor: colorValue });
|
437 |
+
},
|
438 |
+
label: __('Text color', 'ff-shortcodes')
|
439 |
+
}]
|
440 |
+
}),
|
441 |
+
wp.element.createElement(PanelColorSettings, {
|
442 |
+
title: __('Hover : Background color', 'ff-shortcodes'),
|
443 |
+
initialOpen: false,
|
444 |
+
colorSettings: [{
|
445 |
+
value: customHoverBtnColor,
|
446 |
+
onChange: function onChange(colorValue) {
|
447 |
+
return setAttributes({ customHoverBtnColor: colorValue });
|
448 |
+
},
|
449 |
+
label: __('Background color', 'ff-shortcodes')
|
450 |
+
}]
|
451 |
+
}),
|
452 |
+
wp.element.createElement(PanelColorSettings, {
|
453 |
+
title: __('Hover : Border color', 'ff-shortcodes'),
|
454 |
+
initialOpen: false,
|
455 |
+
colorSettings: [{
|
456 |
+
value: customBtnHoverBorderColor,
|
457 |
+
onChange: function onChange(colorValue) {
|
458 |
+
return setAttributes({ customBtnHoverBorderColor: colorValue });
|
459 |
+
},
|
460 |
+
label: __('Border color', 'ff-shortcodes')
|
461 |
+
}]
|
462 |
+
})
|
463 |
+
)
|
464 |
+
),
|
465 |
+
|
466 |
+
/**
|
467 |
+
* This element will be rendered directly in content editor
|
468 |
+
*/
|
469 |
+
wp.element.createElement(
|
470 |
+
'div',
|
471 |
+
{ style: { textAlign: align } },
|
472 |
+
wp.element.createElement(RichText, {
|
473 |
+
tagName: 'a',
|
474 |
+
className: className + ' ff fruitful_btn ff-type-button ff-size-' + size + ' ff-color-' + color + ' ff-style-' + style + ' ff-id-' + id,
|
475 |
+
href: 'https://google.com',
|
476 |
+
onChange: function onChange(value) {
|
477 |
+
return setAttributes({ content: value });
|
478 |
+
},
|
479 |
+
value: content,
|
480 |
+
id: id,
|
481 |
+
focus: focus,
|
482 |
+
onFocus: setFocus,
|
483 |
+
style: { fontSize: customFontSize + 'px', lineHeight: customLineHeight + 'px', color: customTextColor, backgroundColor: customBtnColor, borderColor: customBtnBorderColor, borderRadius: radius + 'px' }
|
484 |
+
})
|
485 |
+
)];
|
486 |
+
},
|
487 |
+
|
488 |
+
/**
|
489 |
+
* Following function saves block data into post content
|
490 |
+
*/
|
491 |
+
save: function save(props) {
|
492 |
+
|
493 |
+
/**
|
494 |
+
* Get saved properties
|
495 |
+
*/
|
496 |
+
var _props$attributes2 = props.attributes,
|
497 |
+
align = _props$attributes2.align,
|
498 |
+
link = _props$attributes2.link,
|
499 |
+
target = _props$attributes2.target,
|
500 |
+
id = _props$attributes2.id,
|
501 |
+
size = _props$attributes2.size,
|
502 |
+
color = _props$attributes2.color,
|
503 |
+
style = _props$attributes2.style,
|
504 |
+
radius = _props$attributes2.radius,
|
505 |
+
customFontSize = _props$attributes2.customFontSize,
|
506 |
+
customLineHeight = _props$attributes2.customLineHeight,
|
507 |
+
customTextColor = _props$attributes2.customTextColor,
|
508 |
+
customBtnColor = _props$attributes2.customBtnColor,
|
509 |
+
customBtnBorderColor = _props$attributes2.customBtnBorderColor,
|
510 |
+
customHoverTextColor = _props$attributes2.customHoverTextColor,
|
511 |
+
customHoverBtnColor = _props$attributes2.customHoverBtnColor,
|
512 |
+
customBtnHoverBorderColor = _props$attributes2.customBtnHoverBorderColor,
|
513 |
+
content = _props$attributes2.content;
|
514 |
+
|
515 |
+
|
516 |
+
var blockCSSStyles = [customFontSize && 'font-size:' + customFontSize + 'px;', customLineHeight && 'line-height:' + customLineHeight + 'px;', customTextColor && 'color:' + customTextColor + ';', radius && 'border-radius:' + radius + 'px;', customBtnColor && 'background-color:' + customBtnColor + ';', customBtnBorderColor && 'border-color:' + customBtnBorderColor + ';'].filter(Boolean).join(' ');
|
517 |
+
|
518 |
+
var blockHoverCSSStyles = [customHoverTextColor && 'color:' + customHoverTextColor + ';', customHoverBtnColor && 'background-color:' + customHoverBtnColor + ';', customBtnHoverBorderColor && 'border-color:' + customBtnHoverBorderColor + ';'].filter(Boolean).join(' ');
|
519 |
+
|
520 |
+
/**
|
521 |
+
* Render and save element
|
522 |
+
*/
|
523 |
+
return wp.element.createElement(
|
524 |
+
'div',
|
525 |
+
{ style: { textAlign: align } },
|
526 |
+
wp.element.createElement(RichText.Content, {
|
527 |
+
href: link || '',
|
528 |
+
target: target || '_self',
|
529 |
+
className: 'ff fruitful_btn ff-type-button ff-size-' + size + ' ff-color-' + color + ' ff-style-' + style + ' ff-id-' + id,
|
530 |
+
tagName: 'a',
|
531 |
+
id: id,
|
532 |
+
value: content
|
533 |
+
}),
|
534 |
+
wp.element.createElement(
|
535 |
+
'style',
|
536 |
+
null,
|
537 |
+
'a#' + id + ' {\n\t\t\t\t\t\t' + blockCSSStyles + '\n\t\t\t\t\t}\n\t\t\t\t\ta#' + id + ':hover {\n\t\t\t\t\t\t' + blockHoverCSSStyles + '\n\t\t\t\t\t}'
|
538 |
+
)
|
539 |
+
);
|
540 |
+
}
|
541 |
+
|
542 |
+
});
|
543 |
+
|
544 |
+
/**
|
545 |
+
|
546 |
+
function setDefaultBlockCustomClassName( className, blockName ) {
|
547 |
+
return blockName === 'fruitful-blocks/fruitful-btn' ?
|
548 |
+
'ff fruitful_btn ff-type-button ff-size-mini ff-color-default ff-style-default' :
|
549 |
+
className;
|
550 |
+
}
|
551 |
+
|
552 |
+
wp.hooks.addFilter(
|
553 |
+
'blocks.getBlockDefaultClassName',
|
554 |
+
'fruitful-blocks/fruitful-btn',
|
555 |
+
setDefaultBlockCustomClassName
|
556 |
+
);
|
557 |
+
|
558 |
+
function setCustomBlockClassName( props, blockType ) {
|
559 |
+
if( blockType.name === 'fruitful-blocks/fruitful-btn') {
|
560 |
+
return Object.assign( props, { class: 'wp-block-list' } );
|
561 |
+
}
|
562 |
+
return props;
|
563 |
+
}
|
564 |
+
|
565 |
+
wp.hooks.addFilter(
|
566 |
+
'blocks.getSaveContent.extraProps',
|
567 |
+
'fruitful-blocks/fruitful-btn',
|
568 |
+
setCustomBlockClassName
|
569 |
+
);
|
570 |
+
|
571 |
+
**/
|
572 |
+
|
573 |
+
/***/ }),
|
574 |
+
|
575 |
+
/***/ 1:
|
576 |
+
/*!*******************************************************************************************!*\
|
577 |
+
!*** multi ./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_btn/block/block.js ***!
|
578 |
+
\*******************************************************************************************/
|
579 |
+
/*! no static exports found */
|
580 |
+
/***/ (function(module, exports, __webpack_require__) {
|
581 |
+
|
582 |
+
module.exports = __webpack_require__(/*! F:/OSPanel/domains/_ff_/local/wp499.loc/wp-content/plugins/fruitful-shortcodes/fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_btn/block/block.js */"./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_btn/block/block.js");
|
583 |
+
|
584 |
+
|
585 |
+
/***/ })
|
586 |
+
|
587 |
+
/******/ });
|
588 |
+
//# sourceMappingURL=block.build.js.map
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_btn/block/block.build.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_btn/block/block.js"],"names":["wp","i18n","__","_x","_n","_nx","editor","RichText","InspectorControls","BlockControls","BlockAlignmentToolbar","PanelColorSettings","ColorPalette","components","RangeControl","PanelBody","SelectControl","TextControl","Toolbar","blocks","registerBlockType","registerBlockStyle","title","description","icon","category","supports","anchor","align","customClassName","html","multiple","attributes","content","type","source","selector","default","link","target","id","size","color","style","radius","customFontSize","customTextColor","customLineHeight","customBtnColor","customBtnBorderColor","customHoverTextColor","customHoverBtnColor","customHoverBtnBorderColor","edit","props","customBtnHoverBorderColor","setAttributes","focus","setFocus","className","clientId","value","label","onChange","colorValue","textAlign","fontSize","lineHeight","backgroundColor","borderColor","borderRadius","save","blockCSSStyles","filter","Boolean","join","blockHoverCSSStyles"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;AClFA;;;;eAI4BA,G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,4BAAC,QAAD,CAAU,OAAV;AACC,UAAOU,QAAQ,EADhB;AAEC,YAASC,UAAU,OAFpB;AAGC,eAAY,4CAA4CE,IAA5C,GAAmD,YAAnD,GAAkEC,KAAlE,GAA0E,YAA1E,GAAyFC,KAAzF,GAAiG,SAAjG,GAA6GH,EAH1H;AAIC,aAAQ,GAJT;AAKC,QAAKA,EALN;AAMC,WAAQP;AANT,KADD;AASC;AAAA;AAAA;AAAA,WACOO,EADP,wBAEIgC,cAFJ,mCAIKhC,EAJL,8BAKIoC,mBALJ;AAAA;AATD,GADD;AAoBA;;AAxYiD,CAAnD;;AA4YA","file":"fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_btn/block/block.build.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n","/**\n * Internationalization function, can be used like we do that in WordPress, e.g.:\n * __( 'My text', 'textdomain')\n */\nconst { __, _x, _n, _nx } = wp.i18n;\n\n/**\n * Import Gutenberg Components to use\n */\nconst {\n\tRichText,\n\tInspectorControls,\n\tBlockControls,\n\tBlockAlignmentToolbar,\n\tPanelColorSettings,\n\tColorPalette\n} = wp.editor;\n\nconst {\n\tRangeControl,\n\tPanelBody,\n\tSelectControl,\n\tTextControl,\n\tToolbar\n} = wp.components;\n\nconst {\n\tregisterBlockType,\n\tregisterBlockStyle\n} = wp.blocks;\n\n/**\n * Register block style\n * function adds additonal CSS class name to the block:\n * is-style-default\n * is-style-another-style\n */\n\n/*\nregisterBlockStyle( 'fruitful-blocks/fruitful-btn', {\n\tname: 'default',\n\tlabel: __( 'Default style', 'ff-shortcodes')\n});\n*/\n\n/**\n * Register block\n */\nregisterBlockType( 'fruitful-blocks/fruitful-btn', {\n\ttitle: __( 'Fruitful Button', 'ff-shortcodes' ),\n\tdescription: __( 'Customizable button', 'ff-shortcodes' ),\n\ticon: <svg viewBox=\"0 0 32 32\" version=\"1.1\"><g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"><rect x=\"0.5\" stroke=\"#4A4A4A\" y=\"8.5\" width=\"31\" height=\"15\" rx=\"3\"></rect><circle cx=\"8\" stroke=\"#4A4A4A\" cy=\"16\" r=\"1.5\"></circle><circle cx=\"16\" stroke=\"#4A4A4A\" cy=\"16\" r=\"1.5\"></circle><circle cx=\"24\" stroke=\"#4A4A4A\" cy=\"16\" r=\"1.5\"></circle></g></svg>,\n\tcategory: 'fruitful-blocks',\n\n\tsupports: {\n\t\t// add a possibility to change block ID\n\t\tanchor: false,\n\t\t// Add the support for block's alignment (left, center, right, wide, full).\n\t\talign: ['left', 'right', 'center'],\n\t\t// add a possibility to change block class name\n\t\tcustomClassName: true,\n\t\t// By default, Gutenberg will allow a block’s markup to be edited individually.\n\t\thtml: false,\n\t\t// set to false to use this block just one per post / page\n\t\tmultiple: true,\n\t},\n\n\t/**\n\t * Declare changeable block attributes\n\t */\n\tattributes: {\n\t\tcontent: {\n\t\t\ttype: 'array',\n\t\t\tsource: 'children',\n\t\t\tselector: 'a',\n\t\t\tdefault: __( 'Click me!', 'ff-shortcodes')\n\t\t},\n align: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'left'\n\t\t},\n\t\tlink: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'https://google.com'\n\t\t},\n\t\ttarget: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '_self'\n\t\t},\n\t\tid: {\n\t\t\ttype: 'string',\n\t\t\t// generate an unique element ID\n\t\t\tdefault: ''\n\t\t},\n\t\tsize: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'mini'\n\t\t},\n\t\tcolor: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'default'\n\t\t},\n\t\tstyle: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'default'\n\t\t},\n\t\tradius: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '0'\n\t\t},\n\t\tcustomFontSize: {\n\t\t\ttype: 'string',\n\t\t\tdefault: ''\n\t\t},\n\t\tcustomTextColor: {\n\t\t\ttype: 'string',\n\t\t\tdefault: ''\n\t\t},\n\t\tcustomLineHeight: {\n\t\t\ttype: 'string',\n\t\t\tdefault: ''\n\t\t},\n\t\tcustomBtnColor: {\n\t\t\ttype: 'string',\n\t\t\tdefault: ''\n\t\t},\n\t\tcustomBtnBorderColor: {\n\t\t\ttype: 'string',\n\t\t\tdefault: ''\n\t\t},\n\t\tcustomHoverTextColor: {\n\t\t\ttype: 'string',\n\t\t\tdefault: ''\n\t\t},\n\t\tcustomHoverBtnColor: {\n\t\t\ttype: 'string',\n\t\t\tdefault: ''\n\t\t},\n\t\tcustomHoverBtnBorderColor: {\n\t\t\ttype: 'string',\n\t\t\tdefault: ''\n\t\t},\n\t},\n\n\t/**\n\t * Following function called when you edit your block\n\t * through Gutenberg Editor\n\t */\n\tedit: ( props ) => {\n\n\t\t/**\n\t\t * Properties & attributes\n\t\t */\n\t\tconst {\n\t\t\tattributes: {\n\t\t\t\tcontent,\n\t\t\t\talign,\n\t\t\t\tlink,\n\t\t\t\ttarget,\n\t\t\t\tid,\n\t\t\t\tsize,\n\t\t\t\tcolor,\n\t\t\t\tstyle,\n\t\t\t\tradius,\n\t\t\t\tcustomFontSize,\n\t\t\t\tcustomLineHeight,\n\t\t\t\tcustomTextColor,\n\t\t\t\tcustomBtnColor,\n\t\t\t\tcustomBtnBorderColor,\n\t\t\t\tcustomHoverTextColor,\n\t\t\t\tcustomHoverBtnColor,\n\t\t\t\tcustomBtnHoverBorderColor\n\t\t\t},\n\t\t\tsetAttributes,\n\t\t\tfocus,\n\t\t\tsetFocus,\n\t\t\tclassName,\n\t\t\tclientId\n\t\t} = props;\n\n\t\tsetAttributes( {id: 'block-' + clientId});\n\n\t\t/**\n\t\t * Render component\n\t\t */\n\t\treturn ([ \n\n\t\t\t/**\n\t\t\t * Block controls appears on element focus in editor\n\t\t\t */\n\t\t\t<BlockControls>\n\t\t\t\t<BlockAlignmentToolbar value={ align } onChange={ ( align ) => setAttributes( { align: align } ) } />\n\t\t\t</BlockControls>,\n\n\t\t\t/**\n\t\t\t * Inspector controls items will be rendered in sidebar when you click on component\n\t\t\t */\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Attributes', 'ff-shortcodes' ) } initialOpen={ true }>\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tlabel={ __('Link URL', 'ff-shortcodes') }\n\t\t\t\t\t\tvalue={ link }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { link: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Target', 'ff-shortcodes' ) }\n\t\t\t\t\t\tvalue={ target }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t{ label: __( 'Current window', 'ff-shortcodes' ), value: '_self' },\n\t\t\t\t\t\t\t{ label: __( 'New window', 'ff-shortcodes' ), value: '_blank' },\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { target: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t\t<PanelBody title={ __( 'Predefined styles', 'ff-shortcodes' ) } initialOpen={ true }>\n\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Size', 'ff-shortcodes' ) }\n\t\t\t\t\t\tvalue={ size }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t{ label: __( 'Mini', 'ff-shortcodes' ), value: 'mini' },\n\t\t\t\t\t\t\t{ label: __( 'Small', 'ff-shortcodes' ), value: 'small' },\n\t\t\t\t\t\t\t{ label: __( 'Large', 'ff-shortcodes' ), value: 'large' },\n\t\t\t\t\t\t\t{ label: __( 'Extra Large', 'ff-shortcodes' ), value: 'extra-large' },\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { size: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Color', 'ff-shortcodes' ) }\n\t\t\t\t\t\tvalue={ color }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t{ label: __( 'Default', 'ff-shortcodes' ), value: 'default' },\n\t\t\t\t\t\t\t{ label: __( 'Primary', 'ff-shortcodes' ), value: 'primary' },\n\t\t\t\t\t\t\t{ label: __( 'Info', 'ff-shortcodes' ), value: 'info' },\n\t\t\t\t\t\t\t{ label: __( 'Success', 'ff-shortcodes' ), value: 'success' },\n\t\t\t\t\t\t\t{ label: __( 'Secondary', 'ff-shortcodes' ), value: 'secondary' },\n\t\t\t\t\t\t\t{ label: __( 'Warning', 'ff-shortcodes' ), value: 'warning' },\n\t\t\t\t\t\t\t{ label: __( 'Inverse', 'ff-shortcodes' ), value: 'inverse' },\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { color: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Style', 'ff-shortcodes' ) }\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t{ label: __( 'Filled', 'ff-shortcodes' ), value: 'default' },\n\t\t\t\t\t\t\t{ label: __( 'Outline', 'ff-shortcodes' ), value: 'outline' },\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { style: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t\t<PanelBody title={ __( 'Custom styles', 'ff-shortcodes' ) } initialOpen={ true }>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Radius', 'ff-shortcodes' ) }\n\t\t\t\t\t\tvalue={ radius }\n\t\t\t\t\t\tonChange={ ( size ) => setAttributes( { radius: size } ) }\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tmax={ 20 }\n\t\t\t\t\t\tbeforeIcon=\"editor-textcolor\"\n\t\t\t\t\t\tallowReset\n\t\t\t\t\t/>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Font size', 'ff-shortcodes' ) }\n\t\t\t\t\t\tvalue={ customFontSize }\n\t\t\t\t\t\tonChange={ ( size ) => setAttributes( { customFontSize: size } ) }\n\t\t\t\t\t\tmin={ 9 }\n\t\t\t\t\t\tmax={ 30 }\n\t\t\t\t\t\tbeforeIcon=\"editor-textcolor\"\n\t\t\t\t\t\tallowReset\n\t\t\t\t\t/>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Line height', 'ff-shortcodes' ) }\n\t\t\t\t\t\tvalue={ customLineHeight }\n\t\t\t\t\t\tonChange={ ( size ) => setAttributes( { customLineHeight: size } ) }\n\t\t\t\t\t\tmin={ 9 }\n\t\t\t\t\t\tmax={ 50 }\n\t\t\t\t\t\tbeforeIcon=\"editor-textcolor\"\n\t\t\t\t\t\tallowReset\n\t\t\t\t\t/>\n\t\t\t\t\t<PanelColorSettings\n\t\t\t\t\t\ttitle={__('Text color', 'ff-shortcodes')}\n\t\t\t\t\t\tinitialOpen={false}\n\t\t\t\t\t\tcolorSettings={[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: customTextColor,\n\t\t\t\t\t\t\t\tonChange: (colorValue) => setAttributes({customTextColor: colorValue}),\n\t\t\t\t\t\t\t\tlabel: __('Text color', 'ff-shortcodes')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]}\n\t\t\t\t\t>\n\t\t\t\t\t</PanelColorSettings>\n\t\t\t\t\t<PanelColorSettings\n\t\t\t\t\t\ttitle={ __( 'Background color', 'ff-shortcodes' ) }\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\tcolorSettings={[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: customBtnColor,\n\t\t\t\t\t\t\t\tonChange: (colorValue) => setAttributes({customBtnColor: colorValue}),\n\t\t\t\t\t\t\t\tlabel: __('Background color', 'ff-shortcodes')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]}\n\t\t\t\t\t>\n\t\t\t\t\t</PanelColorSettings>\n\t\t\t\t\t<PanelColorSettings\n\t\t\t\t\t\ttitle={ __( 'Border color', 'ff-shortcodes' ) }\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\tcolorSettings={[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: customBtnBorderColor,\n\t\t\t\t\t\t\t\tonChange: (colorValue) => setAttributes({customBtnBorderColor: colorValue}),\n\t\t\t\t\t\t\t\tlabel: __('Border color', 'ff-shortcodes')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]}\n\t\t\t\t\t>\n\t\t\t\t\t</PanelColorSettings>\n\t\t\t\t</PanelBody>\n\t\t\t\t<PanelBody title={ __( 'Custom hover styles', 'ff-shortcodes' ) } initialOpen={ true }>\n\t\t\t\t\t<PanelColorSettings\n\t\t\t\t\t\ttitle={ __( 'Hover : Text color', 'ff-shortcodes' ) }\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\tcolorSettings={[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: customHoverTextColor,\n\t\t\t\t\t\t\t\tonChange: (colorValue) => setAttributes({customHoverTextColor: colorValue}),\n\t\t\t\t\t\t\t\tlabel: __('Text color', 'ff-shortcodes')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]}\n\t\t\t\t\t>\n\t\t\t\t\t</PanelColorSettings>\n\t\t\t\t\t<PanelColorSettings\n\t\t\t\t\t\ttitle={ __( 'Hover : Background color', 'ff-shortcodes' ) }\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\tcolorSettings={[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: customHoverBtnColor,\n\t\t\t\t\t\t\t\tonChange: (colorValue) => setAttributes({customHoverBtnColor: colorValue}),\n\t\t\t\t\t\t\t\tlabel: __('Background color', 'ff-shortcodes')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]}\n\t\t\t\t\t>\n\t\t\t\t\t</PanelColorSettings>\n\t\t\t\t\t<PanelColorSettings\n\t\t\t\t\t\ttitle={ __( 'Hover : Border color', 'ff-shortcodes' ) }\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\tcolorSettings={[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: customBtnHoverBorderColor,\n\t\t\t\t\t\t\t\tonChange: (colorValue) => setAttributes({customBtnHoverBorderColor: colorValue}),\n\t\t\t\t\t\t\t\tlabel: __('Border color', 'ff-shortcodes')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]}\n\t\t\t\t\t>\n\t\t\t\t\t</PanelColorSettings>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>,\n\n\t\t\t/**\n\t\t\t * This element will be rendered directly in content editor\n\t\t\t */\n\t\t\t<div style={ {textAlign: align} }>\n\t\t\t\t<RichText\n\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\tclassName={ className + ' ff fruitful_btn ff-type-button ff-size-' + size + ' ff-color-' + color + ' ff-style-' + style + ' ff-id-' + id }\n\t\t\t\t\thref=\"https://google.com\"\n\t\t\t\t\tonChange={ ( value ) => setAttributes( { content: value } ) }\n\t\t\t\t\tvalue={ content }\n\t\t\t\t\tid={ id }\n\t\t\t\t\tfocus={ focus }\n\t\t\t\t\tonFocus={ setFocus }\n\t\t\t\t\tstyle={{ fontSize: customFontSize + 'px', lineHeight: customLineHeight + 'px', color: customTextColor, backgroundColor: customBtnColor, borderColor: customBtnBorderColor, borderRadius: radius + 'px' }}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t]);\n\t},\n\n\t/**\n\t * Following function saves block data into post content\n\t */\n\tsave: ( props ) => {\n\n\t\t/**\n\t\t * Get saved properties\n\t\t */\n\t\tconst {\n\t\t\talign,\n\t\t\tlink,\n\t\t\ttarget,\n\t\t\tid,\n\t\t\tsize,\n\t\t\tcolor,\n\t\t\tstyle,\n\t\t\tradius,\n\t\t\tcustomFontSize,\n\t\t\tcustomLineHeight,\n\t\t\tcustomTextColor,\n\t\t\tcustomBtnColor,\n\t\t\tcustomBtnBorderColor,\n\t\t\tcustomHoverTextColor,\n\t\t\tcustomHoverBtnColor,\n\t\t\tcustomBtnHoverBorderColor,\n\t\t\tcontent\n\t\t} = props.attributes;\n\n\t\tconst blockCSSStyles = [\n\t\t\tcustomFontSize && 'font-size:' + customFontSize + 'px;',\n\t\t\tcustomLineHeight && 'line-height:' + customLineHeight + 'px;',\n\t\t\tcustomTextColor && 'color:' + customTextColor + ';',\n\t\t\tradius && 'border-radius:' + radius + 'px;',\n\t\t\tcustomBtnColor && 'background-color:' + customBtnColor + ';',\n\t\t\tcustomBtnBorderColor && 'border-color:' + customBtnBorderColor + ';',\n\t\t].filter( Boolean ).join( ' ' );\n\n\t\tconst blockHoverCSSStyles = [\n\t\t\tcustomHoverTextColor && 'color:' + customHoverTextColor + ';',\n\t\t\tcustomHoverBtnColor && 'background-color:' + customHoverBtnColor + ';',\n\t\t\tcustomBtnHoverBorderColor && 'border-color:' + customBtnHoverBorderColor + ';'\n\t\t].filter( Boolean ).join( ' ' );\n\n\t\t/**\n\t\t * Render and save element\n\t\t */\n\t\treturn (\n\t\t\t<div style={ {textAlign: align} }>\n\t\t\t\t<RichText.Content\n\t\t\t\t\thref={ link || '' }\n\t\t\t\t\ttarget={ target || '_self' }\n\t\t\t\t\tclassName={ 'ff fruitful_btn ff-type-button ff-size-' + size + ' ff-color-' + color + ' ff-style-' + style + ' ff-id-' + id }\n\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\tid={ id }\n\t\t\t\t\tvalue={ content }\n\t\t\t\t/>\n\t\t\t\t<style>\n\t\t\t\t\t{`a#${id} {\n\t\t\t\t\t\t${blockCSSStyles}\n\t\t\t\t\t}\n\t\t\t\t\ta#${id}:hover {\n\t\t\t\t\t\t${blockHoverCSSStyles}\n\t\t\t\t\t}`}\n\t\t\t\t</style>\n\t\t\t</div>\n\t\t);\n\t},\n\n} );\n\n/**\n\nfunction setDefaultBlockCustomClassName( className, blockName ) {\n\treturn blockName === 'fruitful-blocks/fruitful-btn' ?\n\t'ff fruitful_btn ff-type-button ff-size-mini ff-color-default ff-style-default' :\n\tclassName;\n}\n\nwp.hooks.addFilter(\n\t'blocks.getBlockDefaultClassName',\n\t'fruitful-blocks/fruitful-btn',\n\tsetDefaultBlockCustomClassName\n);\n\nfunction setCustomBlockClassName( props, blockType ) {\n\tif( blockType.name === 'fruitful-blocks/fruitful-btn') {\n\t\treturn Object.assign( props, { class: 'wp-block-list' } );\n\t}\n\treturn props;\n}\n\nwp.hooks.addFilter(\n\t'blocks.getSaveContent.extraProps',\n\t'fruitful-blocks/fruitful-btn',\n\tsetCustomBlockClassName\n);\n\n**/"],"sourceRoot":""}
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_btn/block/block.js
ADDED
@@ -0,0 +1,472 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Internationalization function, can be used like we do that in WordPress, e.g.:
|
3 |
+
* __( 'My text', 'textdomain')
|
4 |
+
*/
|
5 |
+
const { __, _x, _n, _nx } = wp.i18n;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Import Gutenberg Components to use
|
9 |
+
*/
|
10 |
+
const {
|
11 |
+
RichText,
|
12 |
+
InspectorControls,
|
13 |
+
BlockControls,
|
14 |
+
BlockAlignmentToolbar,
|
15 |
+
PanelColorSettings,
|
16 |
+
ColorPalette
|
17 |
+
} = wp.editor;
|
18 |
+
|
19 |
+
const {
|
20 |
+
RangeControl,
|
21 |
+
PanelBody,
|
22 |
+
SelectControl,
|
23 |
+
TextControl,
|
24 |
+
Toolbar
|
25 |
+
} = wp.components;
|
26 |
+
|
27 |
+
const {
|
28 |
+
registerBlockType,
|
29 |
+
registerBlockStyle
|
30 |
+
} = wp.blocks;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Register block style
|
34 |
+
* function adds additonal CSS class name to the block:
|
35 |
+
* is-style-default
|
36 |
+
* is-style-another-style
|
37 |
+
*/
|
38 |
+
|
39 |
+
/*
|
40 |
+
registerBlockStyle( 'fruitful-blocks/fruitful-btn', {
|
41 |
+
name: 'default',
|
42 |
+
label: __( 'Default style', 'ff-shortcodes')
|
43 |
+
});
|
44 |
+
*/
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Register block
|
48 |
+
*/
|
49 |
+
registerBlockType( 'fruitful-blocks/fruitful-btn', {
|
50 |
+
title: __( 'Fruitful Button', 'ff-shortcodes' ),
|
51 |
+
description: __( 'Customizable button', 'ff-shortcodes' ),
|
52 |
+
icon: <svg viewBox="0 0 32 32" version="1.1"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><rect x="0.5" stroke="#4A4A4A" y="8.5" width="31" height="15" rx="3"></rect><circle cx="8" stroke="#4A4A4A" cy="16" r="1.5"></circle><circle cx="16" stroke="#4A4A4A" cy="16" r="1.5"></circle><circle cx="24" stroke="#4A4A4A" cy="16" r="1.5"></circle></g></svg>,
|
53 |
+
category: 'fruitful-blocks',
|
54 |
+
|
55 |
+
supports: {
|
56 |
+
// add a possibility to change block ID
|
57 |
+
anchor: false,
|
58 |
+
// Add the support for block's alignment (left, center, right, wide, full).
|
59 |
+
align: ['left', 'right', 'center'],
|
60 |
+
// add a possibility to change block class name
|
61 |
+
customClassName: true,
|
62 |
+
// By default, Gutenberg will allow a block’s markup to be edited individually.
|
63 |
+
html: false,
|
64 |
+
// set to false to use this block just one per post / page
|
65 |
+
multiple: true,
|
66 |
+
},
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Declare changeable block attributes
|
70 |
+
*/
|
71 |
+
attributes: {
|
72 |
+
content: {
|
73 |
+
type: 'array',
|
74 |
+
source: 'children',
|
75 |
+
selector: 'a',
|
76 |
+
default: __( 'Click me!', 'ff-shortcodes')
|
77 |
+
},
|
78 |
+
align: {
|
79 |
+
type: 'string',
|
80 |
+
default: 'left'
|
81 |
+
},
|
82 |
+
link: {
|
83 |
+
type: 'string',
|
84 |
+
default: 'https://google.com'
|
85 |
+
},
|
86 |
+
target: {
|
87 |
+
type: 'string',
|
88 |
+
default: '_self'
|
89 |
+
},
|
90 |
+
id: {
|
91 |
+
type: 'string',
|
92 |
+
// generate an unique element ID
|
93 |
+
default: ''
|
94 |
+
},
|
95 |
+
size: {
|
96 |
+
type: 'string',
|
97 |
+
default: 'mini'
|
98 |
+
},
|
99 |
+
color: {
|
100 |
+
type: 'string',
|
101 |
+
default: 'default'
|
102 |
+
},
|
103 |
+
style: {
|
104 |
+
type: 'string',
|
105 |
+
default: 'default'
|
106 |
+
},
|
107 |
+
radius: {
|
108 |
+
type: 'string',
|
109 |
+
default: '0'
|
110 |
+
},
|
111 |
+
customFontSize: {
|
112 |
+
type: 'string',
|
113 |
+
default: ''
|
114 |
+
},
|
115 |
+
customTextColor: {
|
116 |
+
type: 'string',
|
117 |
+
default: ''
|
118 |
+
},
|
119 |
+
customLineHeight: {
|
120 |
+
type: 'string',
|
121 |
+
default: ''
|
122 |
+
},
|
123 |
+
customBtnColor: {
|
124 |
+
type: 'string',
|
125 |
+
default: ''
|
126 |
+
},
|
127 |
+
customBtnBorderColor: {
|
128 |
+
type: 'string',
|
129 |
+
default: ''
|
130 |
+
},
|
131 |
+
customHoverTextColor: {
|
132 |
+
type: 'string',
|
133 |
+
default: ''
|
134 |
+
},
|
135 |
+
customHoverBtnColor: {
|
136 |
+
type: 'string',
|
137 |
+
default: ''
|
138 |
+
},
|
139 |
+
customHoverBtnBorderColor: {
|
140 |
+
type: 'string',
|
141 |
+
default: ''
|
142 |
+
},
|
143 |
+
},
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Following function called when you edit your block
|
147 |
+
* through Gutenberg Editor
|
148 |
+
*/
|
149 |
+
edit: ( props ) => {
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Properties & attributes
|
153 |
+
*/
|
154 |
+
const {
|
155 |
+
attributes: {
|
156 |
+
content,
|
157 |
+
align,
|
158 |
+
link,
|
159 |
+
target,
|
160 |
+
id,
|
161 |
+
size,
|
162 |
+
color,
|
163 |
+
style,
|
164 |
+
radius,
|
165 |
+
customFontSize,
|
166 |
+
customLineHeight,
|
167 |
+
customTextColor,
|
168 |
+
customBtnColor,
|
169 |
+
customBtnBorderColor,
|
170 |
+
customHoverTextColor,
|
171 |
+
customHoverBtnColor,
|
172 |
+
customBtnHoverBorderColor
|
173 |
+
},
|
174 |
+
setAttributes,
|
175 |
+
focus,
|
176 |
+
setFocus,
|
177 |
+
className,
|
178 |
+
clientId
|
179 |
+
} = props;
|
180 |
+
|
181 |
+
setAttributes( {id: 'block-' + clientId});
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Render component
|
185 |
+
*/
|
186 |
+
return ([
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Block controls appears on element focus in editor
|
190 |
+
*/
|
191 |
+
<BlockControls>
|
192 |
+
<BlockAlignmentToolbar value={ align } onChange={ ( align ) => setAttributes( { align: align } ) } />
|
193 |
+
</BlockControls>,
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Inspector controls items will be rendered in sidebar when you click on component
|
197 |
+
*/
|
198 |
+
<InspectorControls>
|
199 |
+
<PanelBody title={ __( 'Attributes', 'ff-shortcodes' ) } initialOpen={ true }>
|
200 |
+
<TextControl
|
201 |
+
label={ __('Link URL', 'ff-shortcodes') }
|
202 |
+
value={ link }
|
203 |
+
onChange={ ( value ) => setAttributes( { link: value } ) }
|
204 |
+
/>
|
205 |
+
<SelectControl
|
206 |
+
label={ __( 'Target', 'ff-shortcodes' ) }
|
207 |
+
value={ target }
|
208 |
+
options={ [
|
209 |
+
{ label: __( 'Current window', 'ff-shortcodes' ), value: '_self' },
|
210 |
+
{ label: __( 'New window', 'ff-shortcodes' ), value: '_blank' },
|
211 |
+
] }
|
212 |
+
onChange={ ( value ) => setAttributes( { target: value } ) }
|
213 |
+
/>
|
214 |
+
</PanelBody>
|
215 |
+
<PanelBody title={ __( 'Predefined styles', 'ff-shortcodes' ) } initialOpen={ true }>
|
216 |
+
<SelectControl
|
217 |
+
label={ __( 'Size', 'ff-shortcodes' ) }
|
218 |
+
value={ size }
|
219 |
+
options={ [
|
220 |
+
{ label: __( 'Mini', 'ff-shortcodes' ), value: 'mini' },
|
221 |
+
{ label: __( 'Small', 'ff-shortcodes' ), value: 'small' },
|
222 |
+
{ label: __( 'Large', 'ff-shortcodes' ), value: 'large' },
|
223 |
+
{ label: __( 'Extra Large', 'ff-shortcodes' ), value: 'extra-large' },
|
224 |
+
] }
|
225 |
+
onChange={ ( value ) => setAttributes( { size: value } ) }
|
226 |
+
/>
|
227 |
+
<SelectControl
|
228 |
+
label={ __( 'Color', 'ff-shortcodes' ) }
|
229 |
+
value={ color }
|
230 |
+
options={ [
|
231 |
+
{ label: __( 'Default', 'ff-shortcodes' ), value: 'default' },
|
232 |
+
{ label: __( 'Primary', 'ff-shortcodes' ), value: 'primary' },
|
233 |
+
{ label: __( 'Info', 'ff-shortcodes' ), value: 'info' },
|
234 |
+
{ label: __( 'Success', 'ff-shortcodes' ), value: 'success' },
|
235 |
+
{ label: __( 'Secondary', 'ff-shortcodes' ), value: 'secondary' },
|
236 |
+
{ label: __( 'Warning', 'ff-shortcodes' ), value: 'warning' },
|
237 |
+
{ label: __( 'Inverse', 'ff-shortcodes' ), value: 'inverse' },
|
238 |
+
] }
|
239 |
+
onChange={ ( value ) => setAttributes( { color: value } ) }
|
240 |
+
/>
|
241 |
+
<SelectControl
|
242 |
+
label={ __( 'Style', 'ff-shortcodes' ) }
|
243 |
+
value={ style }
|
244 |
+
options={ [
|
245 |
+
{ label: __( 'Filled', 'ff-shortcodes' ), value: 'default' },
|
246 |
+
{ label: __( 'Outline', 'ff-shortcodes' ), value: 'outline' },
|
247 |
+
] }
|
248 |
+
onChange={ ( value ) => setAttributes( { style: value } ) }
|
249 |
+
/>
|
250 |
+
</PanelBody>
|
251 |
+
<PanelBody title={ __( 'Custom styles', 'ff-shortcodes' ) } initialOpen={ true }>
|
252 |
+
<RangeControl
|
253 |
+
label={ __( 'Radius', 'ff-shortcodes' ) }
|
254 |
+
value={ radius }
|
255 |
+
onChange={ ( size ) => setAttributes( { radius: size } ) }
|
256 |
+
min={ 0 }
|
257 |
+
max={ 20 }
|
258 |
+
beforeIcon="editor-textcolor"
|
259 |
+
allowReset
|
260 |
+
/>
|
261 |
+
<RangeControl
|
262 |
+
label={ __( 'Font size', 'ff-shortcodes' ) }
|
263 |
+
value={ customFontSize }
|
264 |
+
onChange={ ( size ) => setAttributes( { customFontSize: size } ) }
|
265 |
+
min={ 9 }
|
266 |
+
max={ 30 }
|
267 |
+
beforeIcon="editor-textcolor"
|
268 |
+
allowReset
|
269 |
+
/>
|
270 |
+
<RangeControl
|
271 |
+
label={ __( 'Line height', 'ff-shortcodes' ) }
|
272 |
+
value={ customLineHeight }
|
273 |
+
onChange={ ( size ) => setAttributes( { customLineHeight: size } ) }
|
274 |
+
min={ 9 }
|
275 |
+
max={ 50 }
|
276 |
+
beforeIcon="editor-textcolor"
|
277 |
+
allowReset
|
278 |
+
/>
|
279 |
+
<PanelColorSettings
|
280 |
+
title={__('Text color', 'ff-shortcodes')}
|
281 |
+
initialOpen={false}
|
282 |
+
colorSettings={[
|
283 |
+
{
|
284 |
+
value: customTextColor,
|
285 |
+
onChange: (colorValue) => setAttributes({customTextColor: colorValue}),
|
286 |
+
label: __('Text color', 'ff-shortcodes')
|
287 |
+
}
|
288 |
+
]}
|
289 |
+
>
|
290 |
+
</PanelColorSettings>
|
291 |
+
<PanelColorSettings
|
292 |
+
title={ __( 'Background color', 'ff-shortcodes' ) }
|
293 |
+
initialOpen={ false }
|
294 |
+
colorSettings={[
|
295 |
+
{
|
296 |
+
value: customBtnColor,
|
297 |
+
onChange: (colorValue) => setAttributes({customBtnColor: colorValue}),
|
298 |
+
label: __('Background color', 'ff-shortcodes')
|
299 |
+
}
|
300 |
+
]}
|
301 |
+
>
|
302 |
+
</PanelColorSettings>
|
303 |
+
<PanelColorSettings
|
304 |
+
title={ __( 'Border color', 'ff-shortcodes' ) }
|
305 |
+
initialOpen={ false }
|
306 |
+
colorSettings={[
|
307 |
+
{
|
308 |
+
value: customBtnBorderColor,
|
309 |
+
onChange: (colorValue) => setAttributes({customBtnBorderColor: colorValue}),
|
310 |
+
label: __('Border color', 'ff-shortcodes')
|
311 |
+
}
|
312 |
+
]}
|
313 |
+
>
|
314 |
+
</PanelColorSettings>
|
315 |
+
</PanelBody>
|
316 |
+
<PanelBody title={ __( 'Custom hover styles', 'ff-shortcodes' ) } initialOpen={ true }>
|
317 |
+
<PanelColorSettings
|
318 |
+
title={ __( 'Hover : Text color', 'ff-shortcodes' ) }
|
319 |
+
initialOpen={ false }
|
320 |
+
colorSettings={[
|
321 |
+
{
|
322 |
+
value: customHoverTextColor,
|
323 |
+
onChange: (colorValue) => setAttributes({customHoverTextColor: colorValue}),
|
324 |
+
label: __('Text color', 'ff-shortcodes')
|
325 |
+
}
|
326 |
+
]}
|
327 |
+
>
|
328 |
+
</PanelColorSettings>
|
329 |
+
<PanelColorSettings
|
330 |
+
title={ __( 'Hover : Background color', 'ff-shortcodes' ) }
|
331 |
+
initialOpen={ false }
|
332 |
+
colorSettings={[
|
333 |
+
{
|
334 |
+
value: customHoverBtnColor,
|
335 |
+
onChange: (colorValue) => setAttributes({customHoverBtnColor: colorValue}),
|
336 |
+
label: __('Background color', 'ff-shortcodes')
|
337 |
+
}
|
338 |
+
]}
|
339 |
+
>
|
340 |
+
</PanelColorSettings>
|
341 |
+
<PanelColorSettings
|
342 |
+
title={ __( 'Hover : Border color', 'ff-shortcodes' ) }
|
343 |
+
initialOpen={ false }
|
344 |
+
colorSettings={[
|
345 |
+
{
|
346 |
+
value: customBtnHoverBorderColor,
|
347 |
+
onChange: (colorValue) => setAttributes({customBtnHoverBorderColor: colorValue}),
|
348 |
+
label: __('Border color', 'ff-shortcodes')
|
349 |
+
}
|
350 |
+
]}
|
351 |
+
>
|
352 |
+
</PanelColorSettings>
|
353 |
+
</PanelBody>
|
354 |
+
</InspectorControls>,
|
355 |
+
|
356 |
+
/**
|
357 |
+
* This element will be rendered directly in content editor
|
358 |
+
*/
|
359 |
+
<div style={ {textAlign: align} }>
|
360 |
+
<RichText
|
361 |
+
tagName="a"
|
362 |
+
className={ className + ' ff fruitful_btn ff-type-button ff-size-' + size + ' ff-color-' + color + ' ff-style-' + style + ' ff-id-' + id }
|
363 |
+
href="https://google.com"
|
364 |
+
onChange={ ( value ) => setAttributes( { content: value } ) }
|
365 |
+
value={ content }
|
366 |
+
id={ id }
|
367 |
+
focus={ focus }
|
368 |
+
onFocus={ setFocus }
|
369 |
+
style={{ fontSize: customFontSize + 'px', lineHeight: customLineHeight + 'px', color: customTextColor, backgroundColor: customBtnColor, borderColor: customBtnBorderColor, borderRadius: radius + 'px' }}
|
370 |
+
/>
|
371 |
+
</div>
|
372 |
+
]);
|
373 |
+
},
|
374 |
+
|
375 |
+
/**
|
376 |
+
* Following function saves block data into post content
|
377 |
+
*/
|
378 |
+
save: ( props ) => {
|
379 |
+
|
380 |
+
/**
|
381 |
+
* Get saved properties
|
382 |
+
*/
|
383 |
+
const {
|
384 |
+
align,
|
385 |
+
link,
|
386 |
+
target,
|
387 |
+
id,
|
388 |
+
size,
|
389 |
+
color,
|
390 |
+
style,
|
391 |
+
radius,
|
392 |
+
customFontSize,
|
393 |
+
customLineHeight,
|
394 |
+
customTextColor,
|
395 |
+
customBtnColor,
|
396 |
+
customBtnBorderColor,
|
397 |
+
customHoverTextColor,
|
398 |
+
customHoverBtnColor,
|
399 |
+
customBtnHoverBorderColor,
|
400 |
+
content
|
401 |
+
} = props.attributes;
|
402 |
+
|
403 |
+
const blockCSSStyles = [
|
404 |
+
customFontSize && 'font-size:' + customFontSize + 'px;',
|
405 |
+
customLineHeight && 'line-height:' + customLineHeight + 'px;',
|
406 |
+
customTextColor && 'color:' + customTextColor + ';',
|
407 |
+
radius && 'border-radius:' + radius + 'px;',
|
408 |
+
customBtnColor && 'background-color:' + customBtnColor + ';',
|
409 |
+
customBtnBorderColor && 'border-color:' + customBtnBorderColor + ';',
|
410 |
+
].filter( Boolean ).join( ' ' );
|
411 |
+
|
412 |
+
const blockHoverCSSStyles = [
|
413 |
+
customHoverTextColor && 'color:' + customHoverTextColor + ';',
|
414 |
+
customHoverBtnColor && 'background-color:' + customHoverBtnColor + ';',
|
415 |
+
customBtnHoverBorderColor && 'border-color:' + customBtnHoverBorderColor + ';'
|
416 |
+
].filter( Boolean ).join( ' ' );
|
417 |
+
|
418 |
+
/**
|
419 |
+
* Render and save element
|
420 |
+
*/
|
421 |
+
return (
|
422 |
+
<div style={ {textAlign: align} }>
|
423 |
+
<RichText.Content
|
424 |
+
href={ link || '' }
|
425 |
+
target={ target || '_self' }
|
426 |
+
className={ 'ff fruitful_btn ff-type-button ff-size-' + size + ' ff-color-' + color + ' ff-style-' + style + ' ff-id-' + id }
|
427 |
+
tagName="a"
|
428 |
+
id={ id }
|
429 |
+
value={ content }
|
430 |
+
/>
|
431 |
+
<style>
|
432 |
+
{`a#${id} {
|
433 |
+
${blockCSSStyles}
|
434 |
+
}
|
435 |
+
a#${id}:hover {
|
436 |
+
${blockHoverCSSStyles}
|
437 |
+
}`}
|
438 |
+
</style>
|
439 |
+
</div>
|
440 |
+
);
|
441 |
+
},
|
442 |
+
|
443 |
+
} );
|
444 |
+
|
445 |
+
/**
|
446 |
+
|
447 |
+
function setDefaultBlockCustomClassName( className, blockName ) {
|
448 |
+
return blockName === 'fruitful-blocks/fruitful-btn' ?
|
449 |
+
'ff fruitful_btn ff-type-button ff-size-mini ff-color-default ff-style-default' :
|
450 |
+
className;
|
451 |
+
}
|
452 |
+
|
453 |
+
wp.hooks.addFilter(
|
454 |
+
'blocks.getBlockDefaultClassName',
|
455 |
+
'fruitful-blocks/fruitful-btn',
|
456 |
+
setDefaultBlockCustomClassName
|
457 |
+
);
|
458 |
+
|
459 |
+
function setCustomBlockClassName( props, blockType ) {
|
460 |
+
if( blockType.name === 'fruitful-blocks/fruitful-btn') {
|
461 |
+
return Object.assign( props, { class: 'wp-block-list' } );
|
462 |
+
}
|
463 |
+
return props;
|
464 |
+
}
|
465 |
+
|
466 |
+
wp.hooks.addFilter(
|
467 |
+
'blocks.getSaveContent.extraProps',
|
468 |
+
'fruitful-blocks/fruitful-btn',
|
469 |
+
setCustomBlockClassName
|
470 |
+
);
|
471 |
+
|
472 |
+
**/
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_btn/init.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// enqueue admin scripts and styles
|
4 |
+
add_action( 'enqueue_block_editor_assets', function () {
|
5 |
+
|
6 |
+
$block_name = 'fruitful_btn';
|
7 |
+
$block_url = FF_SHORTCODES()->plugin_url . FF_SHORTCODES()->gutenberg_blocks_dir . '/' . $block_name . '/';
|
8 |
+
$assets_url = FF_SHORTCODES()->plugin_url . FF_SHORTCODES()->assets_dir . '/' . $block_name . '/';
|
9 |
+
|
10 |
+
// Block Scripts
|
11 |
+
wp_enqueue_script(
|
12 |
+
'fruitful-blocks-btn', // Handle
|
13 |
+
$block_url . 'block/block.build.js',
|
14 |
+
[ 'wp-editor', 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components' ],
|
15 |
+
FF_SHORTCODES()->cache_time,
|
16 |
+
true
|
17 |
+
);
|
18 |
+
|
19 |
+
// Block Styles
|
20 |
+
wp_enqueue_style(
|
21 |
+
'fruitful-blocks-btn', // Handle
|
22 |
+
$assets_url . '/css/styles.css',
|
23 |
+
[ 'wp-edit-blocks' ],
|
24 |
+
'b' . FF_SHORTCODES()->cache_time
|
25 |
+
);
|
26 |
+
|
27 |
+
// Set translations ( since WP 5.0 )
|
28 |
+
if ( function_exists( 'wp_set_script_translations' ) ) {
|
29 |
+
wp_set_script_translations( 'fruitful-blocks-btn', 'ff-shortcodes' );
|
30 |
+
}
|
31 |
+
|
32 |
+
// pre WP 5.0 with gutenberg plugin
|
33 |
+
if ( function_exists( 'gutenberg_get_jed_locale_data' ) ) {
|
34 |
+
wp_add_inline_script(
|
35 |
+
'fruitful-blocks-btn',
|
36 |
+
sprintf(
|
37 |
+
'var fruitful_blocks_btn = { localeData: %s };',
|
38 |
+
json_encode( gutenberg_get_jed_locale_data( 'ff-shortcodes' ) )
|
39 |
+
),
|
40 |
+
'before'
|
41 |
+
);
|
42 |
+
}
|
43 |
+
|
44 |
+
} );
|
45 |
+
|
46 |
+
|
47 |
+
// load both front-end + back-end assets
|
48 |
+
add_action( 'enqueue_block_assets', function () {
|
49 |
+
|
50 |
+
if ( ! is_admin() ) {
|
51 |
+
wp_enqueue_style( 'ff-fruitful_btn' );
|
52 |
+
wp_enqueue_script( 'ff-fruitful_btn' );
|
53 |
+
}
|
54 |
+
|
55 |
+
} );
|
56 |
+
|
57 |
+
|
58 |
+
// register the block
|
59 |
+
add_action( 'admin_init', function () {
|
60 |
+
|
61 |
+
register_block_type( 'fruitful-blocks/fruitful-btn', [
|
62 |
+
'script' => 'fruitful-blocks-btn',
|
63 |
+
] );
|
64 |
+
|
65 |
+
} );
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_dbox/block/block.build.js
ADDED
@@ -0,0 +1,370 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/******/ (function(modules) { // webpackBootstrap
|
2 |
+
/******/ // The module cache
|
3 |
+
/******/ var installedModules = {};
|
4 |
+
/******/
|
5 |
+
/******/ // The require function
|
6 |
+
/******/ function __webpack_require__(moduleId) {
|
7 |
+
/******/
|
8 |
+
/******/ // Check if module is in cache
|
9 |
+
/******/ if(installedModules[moduleId]) {
|
10 |
+
/******/ return installedModules[moduleId].exports;
|
11 |
+
/******/ }
|
12 |
+
/******/ // Create a new module (and put it into the cache)
|
13 |
+
/******/ var module = installedModules[moduleId] = {
|
14 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
17 |
+
/******/ };
|
18 |
+
/******/
|
19 |
+
/******/ // Execute the module function
|
20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
+
/******/
|
22 |
+
/******/ // Flag the module as loaded
|
23 |
+
/******/ module.l = true;
|
24 |
+
/******/
|
25 |
+
/******/ // Return the exports of the module
|
26 |
+
/******/ return module.exports;
|
27 |
+
/******/ }
|
28 |
+
/******/
|
29 |
+
/******/
|
30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
31 |
+
/******/ __webpack_require__.m = modules;
|
32 |
+
/******/
|
33 |
+
/******/ // expose the module cache
|
34 |
+
/******/ __webpack_require__.c = installedModules;
|
35 |
+
/******/
|
36 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
40 |
+
/******/ }
|
41 |
+
/******/ };
|
42 |
+
/******/
|
43 |
+
/******/ // define __esModule on exports
|
44 |
+
/******/ __webpack_require__.r = function(exports) {
|
45 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
46 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
47 |
+
/******/ }
|
48 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
49 |
+
/******/ };
|
50 |
+
/******/
|
51 |
+
/******/ // create a fake namespace object
|
52 |
+
/******/ // mode & 1: value is a module id, require it
|
53 |
+
/******/ // mode & 2: merge all properties of value into the ns
|
54 |
+
/******/ // mode & 4: return value when already ns object
|
55 |
+
/******/ // mode & 8|1: behave like require
|
56 |
+
/******/ __webpack_require__.t = function(value, mode) {
|
57 |
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
58 |
+
/******/ if(mode & 8) return value;
|
59 |
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
60 |
+
/******/ var ns = Object.create(null);
|
61 |
+
/******/ __webpack_require__.r(ns);
|
62 |
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
63 |
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
64 |
+
/******/ return ns;
|
65 |
+
/******/ };
|
66 |
+
/******/
|
67 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
68 |
+
/******/ __webpack_require__.n = function(module) {
|
69 |
+
/******/ var getter = module && module.__esModule ?
|
70 |
+
/******/ function getDefault() { return module['default']; } :
|
71 |
+
/******/ function getModuleExports() { return module; };
|
72 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
73 |
+
/******/ return getter;
|
74 |
+
/******/ };
|
75 |
+
/******/
|
76 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
77 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
78 |
+
/******/
|
79 |
+
/******/ // __webpack_public_path__
|
80 |
+
/******/ __webpack_require__.p = "";
|
81 |
+
/******/
|
82 |
+
/******/
|
83 |
+
/******/ // Load entry module and return exports
|
84 |
+
/******/ return __webpack_require__(__webpack_require__.s = 2);
|
85 |
+
/******/ })
|
86 |
+
/************************************************************************/
|
87 |
+
/******/ ({
|
88 |
+
|
89 |
+
/***/ "./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_dbox/block/block.js":
|
90 |
+
/*!**************************************************************************************!*\
|
91 |
+
!*** ./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_dbox/block/block.js ***!
|
92 |
+
\**************************************************************************************/
|
93 |
+
/*! no static exports found */
|
94 |
+
/***/ (function(module, exports) {
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Internationalization function, can be used like we do that in WordPress, e.g.:
|
98 |
+
* __( 'My text', 'textdomain')
|
99 |
+
*/
|
100 |
+
var _wp$i18n = wp.i18n,
|
101 |
+
__ = _wp$i18n.__,
|
102 |
+
_x = _wp$i18n._x,
|
103 |
+
_n = _wp$i18n._n,
|
104 |
+
_nx = _wp$i18n._nx;
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Import Gutenberg Components to use
|
108 |
+
*/
|
109 |
+
|
110 |
+
var _wp$editor = wp.editor,
|
111 |
+
RichText = _wp$editor.RichText,
|
112 |
+
InspectorControls = _wp$editor.InspectorControls,
|
113 |
+
BlockControls = _wp$editor.BlockControls;
|
114 |
+
var _wp$components = wp.components,
|
115 |
+
PanelBody = _wp$components.PanelBody,
|
116 |
+
SelectControl = _wp$components.SelectControl,
|
117 |
+
TextControl = _wp$components.TextControl;
|
118 |
+
var registerBlockType = wp.blocks.registerBlockType;
|
119 |
+
|
120 |
+
|
121 |
+
registerBlockType('fruitful-blocks/fruitful-dbox', {
|
122 |
+
title: __('Fruitful Promo Text', 'ff-shortcodes'),
|
123 |
+
description: __('Customizable Promo Text Box', 'ff-shortcodes'),
|
124 |
+
icon: wp.element.createElement(
|
125 |
+
'svg',
|
126 |
+
{ viewBox: '0 0 32 32', version: '1.1' },
|
127 |
+
wp.element.createElement(
|
128 |
+
'g',
|
129 |
+
{ stroke: 'none', 'stroke-width': '1', fill: 'none', 'fill-rule': 'evenodd' },
|
130 |
+
wp.element.createElement('path', { d: 'M6.5,4.5 L6.5,27.5 L13.5,27.5 L13.5,19.5 L18.5,19.5 L18.5,27.5 L25.5,27.5 L25.5,4.5 L18.5000153,4.5 L18.5002594,12.5 L13.5,12.5 L13.5,4.5 L6.5,4.5 Z', stroke: '#4A4A4A' }),
|
131 |
+
wp.element.createElement('rect', { fill: '#4A4A4A', x: '26', y: '4', width: '2', height: '1' }),
|
132 |
+
wp.element.createElement('rect', { fill: '#4A4A4A', x: '4', y: '4', width: '2', height: '1' }),
|
133 |
+
wp.element.createElement('rect', { fill: '#4A4A4A', x: '26', y: '27', width: '2', height: '1' }),
|
134 |
+
wp.element.createElement('rect', { fill: '#4A4A4A', x: '4', y: '27', width: '2', height: '1' })
|
135 |
+
)
|
136 |
+
),
|
137 |
+
category: 'fruitful-blocks',
|
138 |
+
|
139 |
+
supports: {
|
140 |
+
// add a possibility to change block ID
|
141 |
+
anchor: false,
|
142 |
+
// Add the support for block's alignment (left, center, right, wide, full).
|
143 |
+
align: false,
|
144 |
+
// add a possibility to change block class name
|
145 |
+
customClassName: true,
|
146 |
+
// By default, Gutenberg will allow a block’s markup to be edited individually.
|
147 |
+
html: false,
|
148 |
+
// set to false to use this block just one per post / page
|
149 |
+
multiple: true
|
150 |
+
},
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Declare changeable block attributes
|
154 |
+
*/
|
155 |
+
attributes: {
|
156 |
+
smallHeadingText: {
|
157 |
+
type: 'string',
|
158 |
+
default: __('Hello, there!', 'ff-shortcodes')
|
159 |
+
},
|
160 |
+
headingText: {
|
161 |
+
type: 'string',
|
162 |
+
default: __('I am a promo box', 'ff-shortcodes')
|
163 |
+
},
|
164 |
+
text: {
|
165 |
+
type: 'string',
|
166 |
+
default: __('Click here to change this text or add your own', 'ff-shortcodes')
|
167 |
+
},
|
168 |
+
btnTitle: {
|
169 |
+
type: 'string',
|
170 |
+
default: __('Button title', 'ff-shortcodes')
|
171 |
+
},
|
172 |
+
btnLink: {
|
173 |
+
type: 'string',
|
174 |
+
default: 'https://google.com'
|
175 |
+
},
|
176 |
+
style: {
|
177 |
+
type: 'string',
|
178 |
+
default: 'style-1'
|
179 |
+
}
|
180 |
+
},
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Following function called when you edit your block
|
184 |
+
* through Gutenberg Editor
|
185 |
+
*/
|
186 |
+
edit: function edit(props) {
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Properties & attributes
|
190 |
+
*/
|
191 |
+
var _props$attributes = props.attributes,
|
192 |
+
smallHeadingText = _props$attributes.smallHeadingText,
|
193 |
+
headingText = _props$attributes.headingText,
|
194 |
+
text = _props$attributes.text,
|
195 |
+
btnTitle = _props$attributes.btnTitle,
|
196 |
+
btnLink = _props$attributes.btnLink,
|
197 |
+
style = _props$attributes.style,
|
198 |
+
setAttributes = props.setAttributes,
|
199 |
+
className = props.className;
|
200 |
+
|
201 |
+
|
202 |
+
return [
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Inspector controls items will be rendered in sidebar when you click on component
|
206 |
+
*/
|
207 |
+
wp.element.createElement(
|
208 |
+
InspectorControls,
|
209 |
+
null,
|
210 |
+
wp.element.createElement(
|
211 |
+
PanelBody,
|
212 |
+
{ title: __('Style', 'ff-shortcodes'), initialOpen: true },
|
213 |
+
wp.element.createElement(SelectControl, {
|
214 |
+
label: __('Style', 'ff-shortcodes'),
|
215 |
+
value: style,
|
216 |
+
options: [{ label: __('Style 1', 'ff-shortcodes'), value: 'style-1' }, { label: __('Style 2', 'ff-shortcodes'), value: 'style-2' }, { label: __('Style 3', 'ff-shortcodes'), value: 'style-3' }],
|
217 |
+
onChange: function onChange(value) {
|
218 |
+
return setAttributes({ style: value });
|
219 |
+
}
|
220 |
+
})
|
221 |
+
),
|
222 |
+
wp.element.createElement(
|
223 |
+
PanelBody,
|
224 |
+
{ title: __('Button', 'ff-shortcodes'), initialOpen: true },
|
225 |
+
wp.element.createElement(TextControl, {
|
226 |
+
label: __('Button URL', 'ff-shortcodes'),
|
227 |
+
value: btnLink,
|
228 |
+
onChange: function onChange(value) {
|
229 |
+
return setAttributes({ btnLink: value });
|
230 |
+
}
|
231 |
+
})
|
232 |
+
)
|
233 |
+
),
|
234 |
+
|
235 |
+
/**
|
236 |
+
* This element will be rendered directly in content editor
|
237 |
+
*/
|
238 |
+
wp.element.createElement(
|
239 |
+
'div',
|
240 |
+
{
|
241 |
+
className: className + ' ff fruitful_dbox ff-' + style },
|
242 |
+
wp.element.createElement(RichText, {
|
243 |
+
tagName: 'h4',
|
244 |
+
value: smallHeadingText,
|
245 |
+
onChange: function onChange(value) {
|
246 |
+
return setAttributes({ smallHeadingText: value });
|
247 |
+
}
|
248 |
+
}),
|
249 |
+
wp.element.createElement(RichText, {
|
250 |
+
tagName: 'h2',
|
251 |
+
value: headingText,
|
252 |
+
onChange: function onChange(value) {
|
253 |
+
return setAttributes({ headingText: value });
|
254 |
+
}
|
255 |
+
}),
|
256 |
+
wp.element.createElement(RichText, {
|
257 |
+
tagName: 'p',
|
258 |
+
value: text,
|
259 |
+
onChange: function onChange(value) {
|
260 |
+
return setAttributes({ text: value });
|
261 |
+
}
|
262 |
+
}),
|
263 |
+
wp.element.createElement(RichText, {
|
264 |
+
tagName: 'a',
|
265 |
+
className: 'dbox-btn',
|
266 |
+
href: btnLink,
|
267 |
+
onChange: function onChange(value) {
|
268 |
+
return setAttributes({ btnTitle: value });
|
269 |
+
},
|
270 |
+
value: __('Click me!', 'ff-shortcodes'),
|
271 |
+
onRemove: function onRemove() {
|
272 |
+
forward: false;
|
273 |
+
}
|
274 |
+
})
|
275 |
+
)];
|
276 |
+
},
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Following function saves block data into post content
|
280 |
+
*/
|
281 |
+
save: function save(props) {
|
282 |
+
var _props$attributes2 = props.attributes,
|
283 |
+
smallHeadingText = _props$attributes2.smallHeadingText,
|
284 |
+
headingText = _props$attributes2.headingText,
|
285 |
+
text = _props$attributes2.text,
|
286 |
+
btnTitle = _props$attributes2.btnTitle,
|
287 |
+
btnLink = _props$attributes2.btnLink,
|
288 |
+
style = _props$attributes2.style,
|
289 |
+
className = _props$attributes2.className;
|
290 |
+
|
291 |
+
/**
|
292 |
+
* Conditional rendering functions
|
293 |
+
*/
|
294 |
+
|
295 |
+
var renderSmallHeaderText = function renderSmallHeaderText(smallHeadingText) {
|
296 |
+
|
297 |
+
if (smallHeadingText) {
|
298 |
+
return wp.element.createElement(RichText.Content, {
|
299 |
+
tagName: 'h4',
|
300 |
+
value: smallHeadingText || ''
|
301 |
+
});
|
302 |
+
} else {
|
303 |
+
return null;
|
304 |
+
}
|
305 |
+
};
|
306 |
+
|
307 |
+
var renderHeaderText = function renderHeaderText(headingText) {
|
308 |
+
if (headingText) {
|
309 |
+
return wp.element.createElement(RichText.Content, {
|
310 |
+
tagName: 'h2',
|
311 |
+
value: headingText || ''
|
312 |
+
});
|
313 |
+
} else {
|
314 |
+
return null;
|
315 |
+
}
|
316 |
+
};
|
317 |
+
|
318 |
+
var renderContent = function renderContent(text) {
|
319 |
+
if (text) {
|
320 |
+
return wp.element.createElement(RichText.Content, {
|
321 |
+
tagName: 'p',
|
322 |
+
value: text || ''
|
323 |
+
});
|
324 |
+
} else {
|
325 |
+
return null;
|
326 |
+
}
|
327 |
+
};
|
328 |
+
|
329 |
+
var renderBtn = function renderBtn(btnLink, btnTitle) {
|
330 |
+
if (btnTitle) {
|
331 |
+
return wp.element.createElement(RichText.Content, {
|
332 |
+
tagName: 'a',
|
333 |
+
className: 'dbox-btn',
|
334 |
+
href: btnLink,
|
335 |
+
value: btnTitle || ''
|
336 |
+
});
|
337 |
+
} else {
|
338 |
+
return null;
|
339 |
+
}
|
340 |
+
};
|
341 |
+
|
342 |
+
return wp.element.createElement(
|
343 |
+
'div',
|
344 |
+
{
|
345 |
+
className: ' ff fruitful_dbox ff-' + style },
|
346 |
+
renderSmallHeaderText(smallHeadingText),
|
347 |
+
renderHeaderText(headingText),
|
348 |
+
renderContent(text),
|
349 |
+
renderBtn(btnLink, btnTitle)
|
350 |
+
);
|
351 |
+
}
|
352 |
+
|
353 |
+
});
|
354 |
+
|
355 |
+
/***/ }),
|
356 |
+
|
357 |
+
/***/ 2:
|
358 |
+
/*!********************************************************************************************!*\
|
359 |
+
!*** multi ./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_dbox/block/block.js ***!
|
360 |
+
\********************************************************************************************/
|
361 |
+
/*! no static exports found */
|
362 |
+
/***/ (function(module, exports, __webpack_require__) {
|
363 |
+
|
364 |
+
module.exports = __webpack_require__(/*! F:/OSPanel/domains/_ff_/local/wp499.loc/wp-content/plugins/fruitful-shortcodes/fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_dbox/block/block.js */"./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_dbox/block/block.js");
|
365 |
+
|
366 |
+
|
367 |
+
/***/ })
|
368 |
+
|
369 |
+
/******/ });
|
370 |
+
//# sourceMappingURL=block.build.js.map
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_dbox/block/block.build.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_dbox/block/block.js"],"names":["wp","i18n","__","_x","_n","_nx","editor","RichText","InspectorControls","BlockControls","components","PanelBody","SelectControl","TextControl","registerBlockType","blocks","title","description","icon","category","supports","anchor","align","customClassName","html","multiple","attributes","smallHeadingText","type","default","headingText","text","btnTitle","btnLink","style","edit","props","setAttributes","className","label","value","forward","save","renderSmallHeaderText","renderHeaderText","renderContent","renderBtn"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;AClFA;;;;eAI4BA,GAAGC,I;IAAvBC,E,YAAAA,E;IAAIC,E,YAAAA,E;IAAIC,E,YAAAA,E;IAAIC,G,YAAAA,G;;AAEpB;;;;iBAOIL,GAAGM,M;IAHNC,Q,cAAAA,Q;IACAC,iB,cAAAA,iB;IACAC,a,cAAAA,a;qBAOGT,GAAGU,U;IAHNC,S,kBAAAA,S;IACAC,a,kBAAAA,a;IACAC,W,kBAAAA,W;IAKAC,iB,GACGd,GAAGe,M,CADND,iB;;;AAGDA,kBAAkB,+BAAlB,EAAmD;AAClDE,QAAOd,GAAG,qBAAH,EAA0B,eAA1B,CAD2C;AAElDe,cAAaf,GAAG,6BAAH,EAAkC,eAAlC,CAFqC;AAGlDgB,O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var installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","/**\n * Internationalization function, can be used like we do that in WordPress, e.g.:\n * __( 'My text', 'textdomain')\n */\nconst { __, _x, _n, _nx } = wp.i18n;\n\n/**\n * Import Gutenberg Components to use\n */\nconst {\n\tRichText,\n\tInspectorControls,\n\tBlockControls\n} = wp.editor;\n\nconst {\n\tPanelBody,\n\tSelectControl,\n\tTextControl\n} = wp.components;\n\n\nconst {\n\tregisterBlockType\n} = wp.blocks;\n\nregisterBlockType('fruitful-blocks/fruitful-dbox', {\n\ttitle: __('Fruitful Promo Text', 'ff-shortcodes'),\n\tdescription: __('Customizable Promo Text Box', 'ff-shortcodes'),\n\ticon: <svg viewBox=\"0 0 32 32\" version=\"1.1\">\n\t\t<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n\t\t\t<path d=\"M6.5,4.5 L6.5,27.5 L13.5,27.5 L13.5,19.5 L18.5,19.5 L18.5,27.5 L25.5,27.5 L25.5,4.5 L18.5000153,4.5 L18.5002594,12.5 L13.5,12.5 L13.5,4.5 L6.5,4.5 Z\" stroke=\"#4A4A4A\"></path>\n\t\t\t<rect fill=\"#4A4A4A\" x=\"26\" y=\"4\" width=\"2\" height=\"1\"></rect>\n\t\t\t<rect fill=\"#4A4A4A\" x=\"4\" y=\"4\" width=\"2\" height=\"1\"></rect>\n\t\t\t<rect fill=\"#4A4A4A\" x=\"26\" y=\"27\" width=\"2\" height=\"1\"></rect>\n\t\t\t<rect fill=\"#4A4A4A\" x=\"4\" y=\"27\" width=\"2\" height=\"1\"></rect>\n\t\t</g>\n\t</svg>,\n\tcategory: 'fruitful-blocks',\n\n\tsupports: {\n\t\t// add a possibility to change block ID\n\t\tanchor: false,\n\t\t// Add the support for block's alignment (left, center, right, wide, full).\n\t\talign: false,\n\t\t// add a possibility to change block class name\n\t\tcustomClassName: true,\n\t\t// By default, Gutenberg will allow a block’s markup to be edited individually.\n\t\thtml: false,\n\t\t// set to false to use this block just one per post / page\n\t\tmultiple: true,\n\t},\n\n\t/**\n\t * Declare changeable block attributes\n\t */\n\tattributes: {\n\t\tsmallHeadingText: {\n\t\t\ttype: 'string',\n\t\t\tdefault: __('Hello, there!', 'ff-shortcodes'),\n\t\t},\n\t\theadingText: {\n\t\t\ttype: 'string',\n\t\t\tdefault: __('I am a promo box', 'ff-shortcodes'),\n\t\t},\n\t\ttext: {\n\t\t\ttype: 'string',\n\t\t\tdefault: __('Click here to change this text or add your own', 'ff-shortcodes'),\n\t\t},\n\t\tbtnTitle: {\n\t\t\ttype: 'string',\n\t\t\tdefault: __('Button title', 'ff-shortcodes'),\n\t\t},\n\t\tbtnLink: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'https://google.com',\n\t\t},\n\t\tstyle: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'style-1'\n\t\t},\n\t},\n\n\t/**\n\t * Following function called when you edit your block\n\t * through Gutenberg Editor\n\t */\n\tedit: (props) => {\n\n\t\t/**\n\t\t * Properties & attributes\n\t\t */\n\t\tconst {\n\t\t\tattributes: {\n\t\t\t\tsmallHeadingText,\n\t\t\t\theadingText,\n\t\t\t\ttext,\n\t\t\t\tbtnTitle,\n\t\t\t\tbtnLink,\n\t\t\t\tstyle\n\t\t\t},\n\t\t\tsetAttributes,\n\t\t\tclassName\n\t\t} = props;\n\n\t\treturn ([\n\n\t\t\t/**\n\t\t\t * Inspector controls items will be rendered in sidebar when you click on component\n\t\t\t */\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={__('Style', 'ff-shortcodes')} initialOpen={true}>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={__('Style', 'ff-shortcodes')}\n\t\t\t\t\t\tvalue={style}\n\t\t\t\t\t\toptions={[\n\t\t\t\t\t\t\t{label: __('Style 1', 'ff-shortcodes'), value: 'style-1'},\n\t\t\t\t\t\t\t{label: __('Style 2', 'ff-shortcodes'), value: 'style-2'},\n\t\t\t\t\t\t\t{label: __('Style 3', 'ff-shortcodes'), value: 'style-3'},\n\t\t\t\t\t\t]}\n\t\t\t\t\t\tonChange={(value) => setAttributes({style: value})}\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t\t<PanelBody title={ __('Button', 'ff-shortcodes')} initialOpen={true}>\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tlabel={ __('Button URL', 'ff-shortcodes') }\n\t\t\t\t\t\tvalue={ btnLink }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { btnLink: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>,\n\n\t\t\t/**\n\t\t\t * This element will be rendered directly in content editor\n\t\t\t */\n\t\t\t<div\n\t\t\t\t className={className + ' ff fruitful_dbox ff-' + style }>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\ttagName=\"h4\" \n\t\t\t\t\t\tvalue={smallHeadingText}\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { smallHeadingText: value } ) } \n\t\t\t\t\t/>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\ttagName=\"h2\" \n\t\t\t\t\t\tvalue={headingText}\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { headingText: value } ) } \n\t\t\t\t\t/>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\ttagName=\"p\" \n\t\t\t\t\t\tvalue={text}\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { text: value } ) } \n\t\t\t\t\t/>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\t\tclassName=\"dbox-btn\"\n\t\t\t\t\t\thref={ btnLink }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { btnTitle: value } ) }\n\t\t\t\t\t\tvalue={ __('Click me!', 'ff-shortcodes') }\n\t\t\t\t\t\tonRemove={ () => { forward: false } }\n\t\t\t\t\t/>\n\t\t\t</div>\n\t\t]);\n\t},\n\n\t/**\n\t * Following function saves block data into post content\n\t */\n\tsave: (props) => {\n\n\t\tconst {\n\t\t\tsmallHeadingText,\n\t\t\theadingText,\n\t\t\ttext,\n\t\t\tbtnTitle,\n\t\t\tbtnLink,\n\t\t\tstyle,\n\t\t\tclassName\n\t\t} = props.attributes;\n\n\t\t/**\n\t\t * Conditional rendering functions\n\t\t */\n\n\t\tconst renderSmallHeaderText = ( smallHeadingText ) => {\n\n\t\t\tif( smallHeadingText ) {\n\t\t\t\treturn (\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\ttagName=\"h4\" \n\t\t\t\t\t\tvalue={smallHeadingText || ''}\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\n\t\tconst renderHeaderText = ( headingText ) => {\n\t\t\tif( headingText ) {\n\t\t\t\treturn(\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\ttagName=\"h2\" \n\t\t\t\t\t\tvalue={headingText || ''}\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\n\t\tconst renderContent = ( text ) => {\n\t\t\tif( text ) {\n\t\t\t\treturn(\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\ttagName=\"p\" \n\t\t\t\t\t\tvalue={text || ''}\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\n\t\tconst renderBtn = ( btnLink, btnTitle ) => {\n\t\t\tif( btnTitle ) {\n\t\t\t\treturn(\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\t\tclassName=\"dbox-btn\"\n\t\t\t\t\t\thref={ btnLink }\n\t\t\t\t\t\tvalue={ btnTitle || '' }\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<div \n\t\t\t\t className={ ' ff fruitful_dbox ff-' + style }>\n\t\t\t\t\t{ renderSmallHeaderText( smallHeadingText ) }\n\t\t\t\t\t{ renderHeaderText( headingText ) }\n\t\t\t\t\t{ renderContent( text ) }\n\t\t\t\t\t{ renderBtn( btnLink, btnTitle ) }\n\t\t\t</div>\n\t\t);\n\t}\n\n});\n"],"sourceRoot":""}
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_dbox/block/block.js
ADDED
@@ -0,0 +1,250 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Internationalization function, can be used like we do that in WordPress, e.g.:
|
3 |
+
* __( 'My text', 'textdomain')
|
4 |
+
*/
|
5 |
+
const { __, _x, _n, _nx } = wp.i18n;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Import Gutenberg Components to use
|
9 |
+
*/
|
10 |
+
const {
|
11 |
+
RichText,
|
12 |
+
InspectorControls,
|
13 |
+
BlockControls
|
14 |
+
} = wp.editor;
|
15 |
+
|
16 |
+
const {
|
17 |
+
PanelBody,
|
18 |
+
SelectControl,
|
19 |
+
TextControl
|
20 |
+
} = wp.components;
|
21 |
+
|
22 |
+
|
23 |
+
const {
|
24 |
+
registerBlockType
|
25 |
+
} = wp.blocks;
|
26 |
+
|
27 |
+
registerBlockType('fruitful-blocks/fruitful-dbox', {
|
28 |
+
title: __('Fruitful Promo Text', 'ff-shortcodes'),
|
29 |
+
description: __('Customizable Promo Text Box', 'ff-shortcodes'),
|
30 |
+
icon: <svg viewBox="0 0 32 32" version="1.1">
|
31 |
+
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
32 |
+
<path d="M6.5,4.5 L6.5,27.5 L13.5,27.5 L13.5,19.5 L18.5,19.5 L18.5,27.5 L25.5,27.5 L25.5,4.5 L18.5000153,4.5 L18.5002594,12.5 L13.5,12.5 L13.5,4.5 L6.5,4.5 Z" stroke="#4A4A4A"></path>
|
33 |
+
<rect fill="#4A4A4A" x="26" y="4" width="2" height="1"></rect>
|
34 |
+
<rect fill="#4A4A4A" x="4" y="4" width="2" height="1"></rect>
|
35 |
+
<rect fill="#4A4A4A" x="26" y="27" width="2" height="1"></rect>
|
36 |
+
<rect fill="#4A4A4A" x="4" y="27" width="2" height="1"></rect>
|
37 |
+
</g>
|
38 |
+
</svg>,
|
39 |
+
category: 'fruitful-blocks',
|
40 |
+
|
41 |
+
supports: {
|
42 |
+
// add a possibility to change block ID
|
43 |
+
anchor: false,
|
44 |
+
// Add the support for block's alignment (left, center, right, wide, full).
|
45 |
+
align: false,
|
46 |
+
// add a possibility to change block class name
|
47 |
+
customClassName: true,
|
48 |
+
// By default, Gutenberg will allow a block’s markup to be edited individually.
|
49 |
+
html: false,
|
50 |
+
// set to false to use this block just one per post / page
|
51 |
+
multiple: true,
|
52 |
+
},
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Declare changeable block attributes
|
56 |
+
*/
|
57 |
+
attributes: {
|
58 |
+
smallHeadingText: {
|
59 |
+
type: 'string',
|
60 |
+
default: __('Hello, there!', 'ff-shortcodes'),
|
61 |
+
},
|
62 |
+
headingText: {
|
63 |
+
type: 'string',
|
64 |
+
default: __('I am a promo box', 'ff-shortcodes'),
|
65 |
+
},
|
66 |
+
text: {
|
67 |
+
type: 'string',
|
68 |
+
default: __('Click here to change this text or add your own', 'ff-shortcodes'),
|
69 |
+
},
|
70 |
+
btnTitle: {
|
71 |
+
type: 'string',
|
72 |
+
default: __('Button title', 'ff-shortcodes'),
|
73 |
+
},
|
74 |
+
btnLink: {
|
75 |
+
type: 'string',
|
76 |
+
default: 'https://google.com',
|
77 |
+
},
|
78 |
+
style: {
|
79 |
+
type: 'string',
|
80 |
+
default: 'style-1'
|
81 |
+
},
|
82 |
+
},
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Following function called when you edit your block
|
86 |
+
* through Gutenberg Editor
|
87 |
+
*/
|
88 |
+
edit: (props) => {
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Properties & attributes
|
92 |
+
*/
|
93 |
+
const {
|
94 |
+
attributes: {
|
95 |
+
smallHeadingText,
|
96 |
+
headingText,
|
97 |
+
text,
|
98 |
+
btnTitle,
|
99 |
+
btnLink,
|
100 |
+
style
|
101 |
+
},
|
102 |
+
setAttributes,
|
103 |
+
className
|
104 |
+
} = props;
|
105 |
+
|
106 |
+
return ([
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Inspector controls items will be rendered in sidebar when you click on component
|
110 |
+
*/
|
111 |
+
<InspectorControls>
|
112 |
+
<PanelBody title={__('Style', 'ff-shortcodes')} initialOpen={true}>
|
113 |
+
<SelectControl
|
114 |
+
label={__('Style', 'ff-shortcodes')}
|
115 |
+
value={style}
|
116 |
+
options={[
|
117 |
+
{label: __('Style 1', 'ff-shortcodes'), value: 'style-1'},
|
118 |
+
{label: __('Style 2', 'ff-shortcodes'), value: 'style-2'},
|
119 |
+
{label: __('Style 3', 'ff-shortcodes'), value: 'style-3'},
|
120 |
+
]}
|
121 |
+
onChange={(value) => setAttributes({style: value})}
|
122 |
+
/>
|
123 |
+
</PanelBody>
|
124 |
+
<PanelBody title={ __('Button', 'ff-shortcodes')} initialOpen={true}>
|
125 |
+
<TextControl
|
126 |
+
label={ __('Button URL', 'ff-shortcodes') }
|
127 |
+
value={ btnLink }
|
128 |
+
onChange={ ( value ) => setAttributes( { btnLink: value } ) }
|
129 |
+
/>
|
130 |
+
</PanelBody>
|
131 |
+
</InspectorControls>,
|
132 |
+
|
133 |
+
/**
|
134 |
+
* This element will be rendered directly in content editor
|
135 |
+
*/
|
136 |
+
<div
|
137 |
+
className={className + ' ff fruitful_dbox ff-' + style }>
|
138 |
+
<RichText
|
139 |
+
tagName="h4"
|
140 |
+
value={smallHeadingText}
|
141 |
+
onChange={ ( value ) => setAttributes( { smallHeadingText: value } ) }
|
142 |
+
/>
|
143 |
+
<RichText
|
144 |
+
tagName="h2"
|
145 |
+
value={headingText}
|
146 |
+
onChange={ ( value ) => setAttributes( { headingText: value } ) }
|
147 |
+
/>
|
148 |
+
<RichText
|
149 |
+
tagName="p"
|
150 |
+
value={text}
|
151 |
+
onChange={ ( value ) => setAttributes( { text: value } ) }
|
152 |
+
/>
|
153 |
+
<RichText
|
154 |
+
tagName="a"
|
155 |
+
className="dbox-btn"
|
156 |
+
href={ btnLink }
|
157 |
+
onChange={ ( value ) => setAttributes( { btnTitle: value } ) }
|
158 |
+
value={ __('Click me!', 'ff-shortcodes') }
|
159 |
+
onRemove={ () => { forward: false } }
|
160 |
+
/>
|
161 |
+
</div>
|
162 |
+
]);
|
163 |
+
},
|
164 |
+
|
165 |
+
/**
|
166 |
+
* Following function saves block data into post content
|
167 |
+
*/
|
168 |
+
save: (props) => {
|
169 |
+
|
170 |
+
const {
|
171 |
+
smallHeadingText,
|
172 |
+
headingText,
|
173 |
+
text,
|
174 |
+
btnTitle,
|
175 |
+
btnLink,
|
176 |
+
style,
|
177 |
+
className
|
178 |
+
} = props.attributes;
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Conditional rendering functions
|
182 |
+
*/
|
183 |
+
|
184 |
+
const renderSmallHeaderText = ( smallHeadingText ) => {
|
185 |
+
|
186 |
+
if( smallHeadingText ) {
|
187 |
+
return (
|
188 |
+
<RichText.Content
|
189 |
+
tagName="h4"
|
190 |
+
value={smallHeadingText || ''}
|
191 |
+
/>
|
192 |
+
)
|
193 |
+
} else {
|
194 |
+
return null;
|
195 |
+
}
|
196 |
+
};
|
197 |
+
|
198 |
+
const renderHeaderText = ( headingText ) => {
|
199 |
+
if( headingText ) {
|
200 |
+
return(
|
201 |
+
<RichText.Content
|
202 |
+
tagName="h2"
|
203 |
+
value={headingText || ''}
|
204 |
+
/>
|
205 |
+
)
|
206 |
+
} else {
|
207 |
+
return null;
|
208 |
+
}
|
209 |
+
};
|
210 |
+
|
211 |
+
const renderContent = ( text ) => {
|
212 |
+
if( text ) {
|
213 |
+
return(
|
214 |
+
<RichText.Content
|
215 |
+
tagName="p"
|
216 |
+
value={text || ''}
|
217 |
+
/>
|
218 |
+
)
|
219 |
+
} else {
|
220 |
+
return null;
|
221 |
+
}
|
222 |
+
};
|
223 |
+
|
224 |
+
const renderBtn = ( btnLink, btnTitle ) => {
|
225 |
+
if( btnTitle ) {
|
226 |
+
return(
|
227 |
+
<RichText.Content
|
228 |
+
tagName="a"
|
229 |
+
className="dbox-btn"
|
230 |
+
href={ btnLink }
|
231 |
+
value={ btnTitle || '' }
|
232 |
+
/>
|
233 |
+
)
|
234 |
+
} else {
|
235 |
+
return null;
|
236 |
+
}
|
237 |
+
};
|
238 |
+
|
239 |
+
return (
|
240 |
+
<div
|
241 |
+
className={ ' ff fruitful_dbox ff-' + style }>
|
242 |
+
{ renderSmallHeaderText( smallHeadingText ) }
|
243 |
+
{ renderHeaderText( headingText ) }
|
244 |
+
{ renderContent( text ) }
|
245 |
+
{ renderBtn( btnLink, btnTitle ) }
|
246 |
+
</div>
|
247 |
+
);
|
248 |
+
}
|
249 |
+
|
250 |
+
});
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_dbox/init.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// enqueue editor styles and scripts
|
4 |
+
add_action( 'enqueue_block_editor_assets', function () {
|
5 |
+
|
6 |
+
$block_name = 'fruitful_dbox';
|
7 |
+
$block_url = FF_SHORTCODES()->plugin_url . FF_SHORTCODES()->gutenberg_blocks_dir . '/' . $block_name . '/';
|
8 |
+
$assets_url = FF_SHORTCODES()->plugin_url . FF_SHORTCODES()->assets_dir . '/' . $block_name . '/';
|
9 |
+
|
10 |
+
// Block Scripts
|
11 |
+
wp_enqueue_script(
|
12 |
+
'fruitful-blocks-dbox', // Handle
|
13 |
+
$block_url . 'block/block.build.js',
|
14 |
+
[ 'wp-editor', 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components' ],
|
15 |
+
FF_SHORTCODES()->cache_time,
|
16 |
+
true
|
17 |
+
);
|
18 |
+
|
19 |
+
// Block Styles
|
20 |
+
wp_enqueue_style(
|
21 |
+
'fruitful-blocks-dbox', // Handle
|
22 |
+
$assets_url . '/css/styles.css',
|
23 |
+
[ 'wp-edit-blocks' ],
|
24 |
+
'b' . FF_SHORTCODES()->cache_time
|
25 |
+
);
|
26 |
+
|
27 |
+
// Set translations ( since WP 5.0 )
|
28 |
+
if ( function_exists( 'wp_set_script_translations' ) ) {
|
29 |
+
wp_set_script_translations( 'fruitful-blocks-dbox', 'ff-shortcodes' );
|
30 |
+
}
|
31 |
+
|
32 |
+
// pre WP 5.0 with gutenberg plugin
|
33 |
+
if ( function_exists( 'gutenberg_get_jed_locale_data' ) ) {
|
34 |
+
wp_add_inline_script(
|
35 |
+
'fruitful-blocks-dbox',
|
36 |
+
sprintf(
|
37 |
+
'var fruitful_blocks_dbox = { localeData: %s };',
|
38 |
+
json_encode( gutenberg_get_jed_locale_data( 'ff-shortcodes' ) )
|
39 |
+
),
|
40 |
+
'before'
|
41 |
+
);
|
42 |
+
}
|
43 |
+
|
44 |
+
} );
|
45 |
+
|
46 |
+
|
47 |
+
// load both front-end + back-end assets
|
48 |
+
add_action( 'enqueue_block_assets', function () {
|
49 |
+
|
50 |
+
if ( ! is_admin() ) {
|
51 |
+
wp_enqueue_style( 'ff-fruitful_dbox' );
|
52 |
+
}
|
53 |
+
|
54 |
+
} );
|
55 |
+
|
56 |
+
|
57 |
+
// register the block
|
58 |
+
add_action( 'admin_init', function () {
|
59 |
+
register_block_type( 'fruitful-blocks/fruitful-dbox', [
|
60 |
+
'script' => 'fruitful-blocks-dbox',
|
61 |
+
] );
|
62 |
+
} );
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_pbar/block/block.build.js
ADDED
@@ -0,0 +1,419 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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ules = {};
|
4 |
+
/******/
|
5 |
+
/******/ // The require function
|
6 |
+
/******/ function __webpack_require__(moduleId) {
|
7 |
+
/******/
|
8 |
+
/******/ // Check if module is in cache
|
9 |
+
/******/ if(installedModules[moduleId]) {
|
10 |
+
/******/ return installedModules[moduleId].exports;
|
11 |
+
/******/ }
|
12 |
+
/******/ // Create a new module (and put it into the cache)
|
13 |
+
/******/ var module = installedModules[moduleId] = {
|
14 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
17 |
+
/******/ };
|
18 |
+
/******/
|
19 |
+
/******/ // Execute the module function
|
20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
+
/******/
|
22 |
+
/******/ // Flag the module as loaded
|
23 |
+
/******/ module.l = true;
|
24 |
+
/******/
|
25 |
+
/******/ // Return the exports of the module
|
26 |
+
/******/ return module.exports;
|
27 |
+
/******/ }
|
28 |
+
/******/
|
29 |
+
/******/
|
30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
31 |
+
/******/ __webpack_require__.m = modules;
|
32 |
+
/******/
|
33 |
+
/******/ // expose the module cache
|
34 |
+
/******/ __webpack_require__.c = installedModules;
|
35 |
+
/******/
|
36 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
40 |
+
/******/ }
|
41 |
+
/******/ };
|
42 |
+
/******/
|
43 |
+
/******/ // define __esModule on exports
|
44 |
+
/******/ __webpack_require__.r = function(exports) {
|
45 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
46 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
47 |
+
/******/ }
|
48 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
49 |
+
/******/ };
|
50 |
+
/******/
|
51 |
+
/******/ // create a fake namespace object
|
52 |
+
/******/ // mode & 1: value is a module id, require it
|
53 |
+
/******/ // mode & 2: merge all properties of value into the ns
|
54 |
+
/******/ // mode & 4: return value when already ns object
|
55 |
+
/******/ // mode & 8|1: behave like require
|
56 |
+
/******/ __webpack_require__.t = function(value, mode) {
|
57 |
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
58 |
+
/******/ if(mode & 8) return value;
|
59 |
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
60 |
+
/******/ var ns = Object.create(null);
|
61 |
+
/******/ __webpack_require__.r(ns);
|
62 |
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
63 |
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
64 |
+
/******/ return ns;
|
65 |
+
/******/ };
|
66 |
+
/******/
|
67 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
68 |
+
/******/ __webpack_require__.n = function(module) {
|
69 |
+
/******/ var getter = module && module.__esModule ?
|
70 |
+
/******/ function getDefault() { return module['default']; } :
|
71 |
+
/******/ function getModuleExports() { return module; };
|
72 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
73 |
+
/******/ return getter;
|
74 |
+
/******/ };
|
75 |
+
/******/
|
76 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
77 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
78 |
+
/******/
|
79 |
+
/******/ // __webpack_public_path__
|
80 |
+
/******/ __webpack_require__.p = "";
|
81 |
+
/******/
|
82 |
+
/******/
|
83 |
+
/******/ // Load entry module and return exports
|
84 |
+
/******/ return __webpack_require__(__webpack_require__.s = 3);
|
85 |
+
/******/ })
|
86 |
+
/************************************************************************/
|
87 |
+
/******/ ({
|
88 |
+
|
89 |
+
/***/ "./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_pbar/block/block.js":
|
90 |
+
/*!**************************************************************************************!*\
|
91 |
+
!*** ./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_pbar/block/block.js ***!
|
92 |
+
\**************************************************************************************/
|
93 |
+
/*! no static exports found */
|
94 |
+
/***/ (function(module, exports) {
|
95 |
+
|
96 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
97 |
+
|
98 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
99 |
+
|
100 |
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
101 |
+
|
102 |
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Internationalization function, can be used like we do that in WordPress, e.g.:
|
106 |
+
* __( 'My text', 'textdomain')
|
107 |
+
*/
|
108 |
+
var _wp$i18n = wp.i18n,
|
109 |
+
__ = _wp$i18n.__,
|
110 |
+
_x = _wp$i18n._x,
|
111 |
+
_n = _wp$i18n._n,
|
112 |
+
_nx = _wp$i18n._nx;
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Import Gutenberg Components to use
|
116 |
+
*/
|
117 |
+
|
118 |
+
var _wp$editor = wp.editor,
|
119 |
+
BlockControls = _wp$editor.BlockControls,
|
120 |
+
InspectorControls = _wp$editor.InspectorControls;
|
121 |
+
var _wp$components = wp.components,
|
122 |
+
RangeControl = _wp$components.RangeControl,
|
123 |
+
PanelBody = _wp$components.PanelBody,
|
124 |
+
SelectControl = _wp$components.SelectControl,
|
125 |
+
TextControl = _wp$components.TextControl,
|
126 |
+
ToggleControl = _wp$components.ToggleControl,
|
127 |
+
IconButton = _wp$components.IconButton;
|
128 |
+
var registerBlockType = wp.blocks.registerBlockType;
|
129 |
+
var _wp$element = wp.element,
|
130 |
+
Component = _wp$element.Component,
|
131 |
+
Fragment = _wp$element.Fragment;
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Create new react component
|
135 |
+
*/
|
136 |
+
|
137 |
+
var fruitfulBlocksPbar = function (_Component) {
|
138 |
+
_inherits(fruitfulBlocksPbar, _Component);
|
139 |
+
|
140 |
+
function fruitfulBlocksPbar() {
|
141 |
+
_classCallCheck(this, fruitfulBlocksPbar);
|
142 |
+
|
143 |
+
return _possibleConstructorReturn(this, (fruitfulBlocksPbar.__proto__ || Object.getPrototypeOf(fruitfulBlocksPbar)).apply(this, arguments));
|
144 |
+
}
|
145 |
+
|
146 |
+
_createClass(fruitfulBlocksPbar, [{
|
147 |
+
key: 'componentDidMount',
|
148 |
+
value: function componentDidMount() {
|
149 |
+
this.initPbar();
|
150 |
+
}
|
151 |
+
}, {
|
152 |
+
key: 'componentDidUpdate',
|
153 |
+
value: function componentDidUpdate(prevProps) {
|
154 |
+
this.initPbar();
|
155 |
+
}
|
156 |
+
}, {
|
157 |
+
key: 'initPbar',
|
158 |
+
value: function initPbar() {
|
159 |
+
|
160 |
+
if (typeof jQuery !== 'undefined') {
|
161 |
+
window.ff_bar_shortcode_reinit();
|
162 |
+
}
|
163 |
+
}
|
164 |
+
}, {
|
165 |
+
key: 'render',
|
166 |
+
value: function render() {
|
167 |
+
/**
|
168 |
+
* Properties & attributes
|
169 |
+
*/
|
170 |
+
var _props = this.props,
|
171 |
+
_props$attributes = _props.attributes,
|
172 |
+
title = _props$attributes.title,
|
173 |
+
width = _props$attributes.width,
|
174 |
+
delay = _props$attributes.delay,
|
175 |
+
type = _props$attributes.type,
|
176 |
+
isStriped = _props$attributes.isStriped,
|
177 |
+
setAttributes = _props.setAttributes,
|
178 |
+
focus = _props.focus,
|
179 |
+
setFocus = _props.setFocus,
|
180 |
+
className = _props.className;
|
181 |
+
|
182 |
+
|
183 |
+
var isStyleStriped = isStriped ? 'ff-style-striped' : '';
|
184 |
+
var isFull = width >= 95 ? 'ff-full' : '';
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Render component
|
188 |
+
*/
|
189 |
+
return wp.element.createElement(
|
190 |
+
Fragment,
|
191 |
+
null,
|
192 |
+
wp.element.createElement(
|
193 |
+
InspectorControls,
|
194 |
+
null,
|
195 |
+
wp.element.createElement(
|
196 |
+
PanelBody,
|
197 |
+
{ title: __('Attributes', 'ff-shortcodes'), initialOpen: true },
|
198 |
+
wp.element.createElement(TextControl, {
|
199 |
+
label: __('Title', 'ff-shortcodes'),
|
200 |
+
value: title,
|
201 |
+
onChange: function onChange(value) {
|
202 |
+
return setAttributes({ title: value });
|
203 |
+
}
|
204 |
+
}),
|
205 |
+
wp.element.createElement(SelectControl, {
|
206 |
+
label: __('Type', 'ff-shortcodes'),
|
207 |
+
value: type,
|
208 |
+
options: [{ label: __('Success', 'ff-shortcodes'), value: 'success' }, { label: __('Info', 'ff-shortcodes'), value: 'info' }, { label: __('Warning', 'ff-shortcodes'), value: 'warning' }, { label: __('Danger', 'ff-shortcodes'), value: 'danger' }],
|
209 |
+
onChange: function onChange(value) {
|
210 |
+
setAttributes({ type: value });
|
211 |
+
}
|
212 |
+
}),
|
213 |
+
wp.element.createElement(RangeControl, {
|
214 |
+
label: __('Width', 'ff-shortcodes'),
|
215 |
+
value: width,
|
216 |
+
onChange: function onChange(size) {
|
217 |
+
return setAttributes({ width: size });
|
218 |
+
},
|
219 |
+
min: 0,
|
220 |
+
max: 100,
|
221 |
+
beforeIcon: 'editor-textcolor',
|
222 |
+
allowReset: true
|
223 |
+
}),
|
224 |
+
wp.element.createElement(TextControl, {
|
225 |
+
label: __('Delay', 'ff-shortcodes'),
|
226 |
+
value: delay,
|
227 |
+
onChange: function onChange(value) {
|
228 |
+
return setAttributes({ delay: value });
|
229 |
+
}
|
230 |
+
}),
|
231 |
+
wp.element.createElement(ToggleControl, {
|
232 |
+
label: __('Stripes', 'ff-shortcodes'),
|
233 |
+
checked: isStriped,
|
234 |
+
onChange: function onChange(state) {
|
235 |
+
return setAttributes({ isStriped: state });
|
236 |
+
}
|
237 |
+
})
|
238 |
+
)
|
239 |
+
),
|
240 |
+
wp.element.createElement(
|
241 |
+
'div',
|
242 |
+
{ className: 'fruitful_pbar' },
|
243 |
+
wp.element.createElement(
|
244 |
+
'div',
|
245 |
+
{ className: 'ff fruitful_bar ff-type-' + type + ' ' + isStyleStriped + ' ' + isFull },
|
246 |
+
wp.element.createElement('div', {
|
247 |
+
className: 'ff-bar',
|
248 |
+
'data-delay': delay,
|
249 |
+
'data-width': width + '%' }),
|
250 |
+
wp.element.createElement(
|
251 |
+
'div',
|
252 |
+
{ className: 'ff-title' },
|
253 |
+
title
|
254 |
+
),
|
255 |
+
wp.element.createElement(
|
256 |
+
'div',
|
257 |
+
{ className: 'ff-value' },
|
258 |
+
width + '%'
|
259 |
+
)
|
260 |
+
)
|
261 |
+
)
|
262 |
+
);
|
263 |
+
}
|
264 |
+
}]);
|
265 |
+
|
266 |
+
return fruitfulBlocksPbar;
|
267 |
+
}(Component);
|
268 |
+
|
269 |
+
/**
|
270 |
+
* Register block
|
271 |
+
*/
|
272 |
+
|
273 |
+
|
274 |
+
registerBlockType('fruitful-blocks/fruitful-pbar', {
|
275 |
+
title: __('Fruitful Progress Bar', 'ff-shortcodes'),
|
276 |
+
description: __('Progress Bar', 'ff-shortcodes'),
|
277 |
+
icon: wp.element.createElement(
|
278 |
+
'svg',
|
279 |
+
{ viewBox: '0 0 32 32', version: '1.1' },
|
280 |
+
wp.element.createElement(
|
281 |
+
'g',
|
282 |
+
{ stroke: 'none', 'stroke-width': '1', fill: 'none', 'fill-rule': 'evenodd' },
|
283 |
+
wp.element.createElement('rect', { stroke: '#4A4A4A', x: '0.5', y: '8.5', width: '31', height: '5', rx: '2.5' }),
|
284 |
+
wp.element.createElement('path', { d: 'M26,8.5 L22,13.5', id: 'Line', stroke: '#4A4A4A' }),
|
285 |
+
wp.element.createElement('path', { d: 'M22,8.5 L18,13.5', id: 'Line', stroke: '#4A4A4A' }),
|
286 |
+
wp.element.createElement('path', { d: 'M18,8.5 L14,13.5', id: 'Line', stroke: '#4A4A4A' }),
|
287 |
+
wp.element.createElement('path', { d: 'M14,8.5 L10,13.5', id: 'Line', stroke: '#4A4A4A' }),
|
288 |
+
wp.element.createElement('path', { d: 'M10,8.5 L6,13.5', id: 'Line', stroke: '#4A4A4A' }),
|
289 |
+
wp.element.createElement('path', { d: 'M6,8.5 L2,13.5', id: 'Line', stroke: '#4A4A4A' }),
|
290 |
+
wp.element.createElement('rect', { stroke: '#4A4A4A', x: '0.5', y: '18.5', width: '31', height: '5', rx: '2.5' }),
|
291 |
+
wp.element.createElement('path', { d: 'M18,18.5 L14,23.5', id: 'Line', stroke: '#4A4A4A' }),
|
292 |
+
wp.element.createElement('path', { d: 'M14,18.5 L10,23.5', id: 'Line', stroke: '#4A4A4A' }),
|
293 |
+
wp.element.createElement('path', { d: 'M10,18.5 L6,23.5', id: 'Line', stroke: '#4A4A4A' }),
|
294 |
+
wp.element.createElement('path', { d: 'M6,18.5 L2,23.5', id: 'Line', stroke: '#4A4A4A' })
|
295 |
+
)
|
296 |
+
),
|
297 |
+
category: 'fruitful-blocks',
|
298 |
+
|
299 |
+
supports: {
|
300 |
+
// add a possibility to change block ID
|
301 |
+
anchor: false,
|
302 |
+
// Add the support for block's alignment (left, center, right, wide, full).
|
303 |
+
align: false,
|
304 |
+
// add a possibility to change block class name
|
305 |
+
customClassName: true,
|
306 |
+
// By default, Gutenberg will allow a block’s markup to be edited individually.
|
307 |
+
html: false,
|
308 |
+
// set to false to use this block just one per post / page
|
309 |
+
multiple: true
|
310 |
+
},
|
311 |
+
|
312 |
+
keywords: [__('pbar', 'ff-shortcodes'), __('progress', 'ff-shortcodes'), __('bar', 'ff-shortcodes')],
|
313 |
+
|
314 |
+
attributes: {
|
315 |
+
title: {
|
316 |
+
type: 'string',
|
317 |
+
default: __('My title', 'ff-shortcodes')
|
318 |
+
},
|
319 |
+
width: {
|
320 |
+
type: 'number',
|
321 |
+
default: 70
|
322 |
+
},
|
323 |
+
delay: {
|
324 |
+
type: 'string',
|
325 |
+
default: '0.2s'
|
326 |
+
},
|
327 |
+
type: {
|
328 |
+
type: 'string',
|
329 |
+
default: 'success'
|
330 |
+
},
|
331 |
+
icon: {
|
332 |
+
type: 'string',
|
333 |
+
default: ''
|
334 |
+
},
|
335 |
+
isStriped: {
|
336 |
+
type: 'boolean',
|
337 |
+
default: false
|
338 |
+
}
|
339 |
+
},
|
340 |
+
|
341 |
+
/**
|
342 |
+
* Following function called when you edit your block
|
343 |
+
* through Gutenberg Editor
|
344 |
+
*/
|
345 |
+
edit: fruitfulBlocksPbar,
|
346 |
+
|
347 |
+
/**
|
348 |
+
* Following function saves block data into post content
|
349 |
+
*/
|
350 |
+
save: function save(props) {
|
351 |
+
|
352 |
+
/**
|
353 |
+
* Get saved properties
|
354 |
+
*/
|
355 |
+
var _props$attributes2 = props.attributes,
|
356 |
+
title = _props$attributes2.title,
|
357 |
+
width = _props$attributes2.width,
|
358 |
+
delay = _props$attributes2.delay,
|
359 |
+
type = _props$attributes2.type,
|
360 |
+
icon = _props$attributes2.icon,
|
361 |
+
isStriped = _props$attributes2.isStriped;
|
362 |
+
|
363 |
+
/**
|
364 |
+
* Conditional rendering functions
|
365 |
+
*/
|
366 |
+
|
367 |
+
var isStyleStriped = isStriped ? 'ff-style-striped' : '';
|
368 |
+
var isFull = width >= 95 ? 'ff-full' : '';
|
369 |
+
|
370 |
+
var renderTitle = function renderTitle(title) {
|
371 |
+
|
372 |
+
if (title) {
|
373 |
+
return wp.element.createElement(
|
374 |
+
'div',
|
375 |
+
{ className: 'ff-title' },
|
376 |
+
title
|
377 |
+
);
|
378 |
+
} else {
|
379 |
+
return null;
|
380 |
+
}
|
381 |
+
};
|
382 |
+
|
383 |
+
return wp.element.createElement(
|
384 |
+
'div',
|
385 |
+
{ className: 'fruitful_pbar' },
|
386 |
+
wp.element.createElement(
|
387 |
+
'div',
|
388 |
+
{ className: 'ff fruitful_bar ff-type-' + type + ' ' + isStyleStriped + ' ' + isFull },
|
389 |
+
wp.element.createElement('div', {
|
390 |
+
className: 'ff-bar',
|
391 |
+
'data-delay': delay,
|
392 |
+
'data-width': width + '%' }),
|
393 |
+
renderTitle(title),
|
394 |
+
wp.element.createElement(
|
395 |
+
'div',
|
396 |
+
{ className: 'ff-value' },
|
397 |
+
width + '%'
|
398 |
+
)
|
399 |
+
)
|
400 |
+
);
|
401 |
+
}
|
402 |
+
});
|
403 |
+
|
404 |
+
/***/ }),
|
405 |
+
|
406 |
+
/***/ 3:
|
407 |
+
/*!********************************************************************************************!*\
|
408 |
+
!*** multi ./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_pbar/block/block.js ***!
|
409 |
+
\********************************************************************************************/
|
410 |
+
/*! no static exports found */
|
411 |
+
/***/ (function(module, exports, __webpack_require__) {
|
412 |
+
|
413 |
+
module.exports = __webpack_require__(/*! F:/OSPanel/domains/_ff_/local/wp499.loc/wp-content/plugins/fruitful-shortcodes/fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_pbar/block/block.js */"./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_pbar/block/block.js");
|
414 |
+
|
415 |
+
|
416 |
+
/***/ })
|
417 |
+
|
418 |
+
/******/ });
|
419 |
+
//# sourceMappingURL=block.build.js.map
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_pbar/block/block.build.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_pbar/block/block.js"],"names":["wp","i18n","__","_x","_n","_nx","editor","BlockControls","InspectorControls","components","RangeControl","PanelBody","SelectControl","TextControl","ToggleControl","IconButton","registerBlockType","blocks","element","Component","Fragment","fruitfulBlocksPbar","arguments","initPbar","prevProps","jQuery","window","ff_bar_shortcode_reinit","props","attributes","title","width","delay","type","isStriped","setAttributes","focus","setFocus","className","isStyleStriped","isFull","value","label","size","state","description","icon","category","supports","anchor","align","customClassName","html","multiple","keywords","default","edit","save","renderTitle"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;;;;;;;;AClFA;;;;eAI4BA,GAAGC,I;IAAvBC,E,YAAAA,E;IAAIC,E,YAAAA,E;IAAIC,E,YAAAA,E;IAAIC,G,YAAAA,G;;AAEpB;;;;iBAMIL,GAAGM,M;IAFNC,a,cAAAA,a;IACAC,iB,cAAAA,iB;qBAUGR,GAAGS,U;IANNC,Y,kBAAAA,Y;IACAC,S,kBAAAA,S;IAC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,KANiB;AAAA,MAOjBC,KAPiB,sBAOjBA,KAPiB;AAAA,MAQjBC,KARiB,sBAQjBA,KARiB;AAAA,MASjBC,IATiB,sBASjBA,IATiB;AAAA,MAUjBa,IAViB,sBAUjBA,IAViB;AAAA,MAWjBZ,SAXiB,sBAWjBA,SAXiB;;AAclB;;;;AAGA,MAAMK,iBAAiBL,YAAY,kBAAZ,GAAiC,EAAxD;AACA,MAAMM,SAAST,SAAS,EAAT,GAAc,SAAd,GAA0B,EAAzC;;AAEA,MAAM2B,cAAc,SAAdA,WAAc,CAAE5B,KAAF,EAAa;;AAEhC,OAAIA,KAAJ,EAAY;AACX,WACC;AAAA;AAAA,OAAK,WAAU,UAAf;AAA2BA;AAA3B,KADD;AAGA,IAJD,MAIO;AACN,WAAO,IAAP;AACA;AACD,GATD;;AAWA,SACC;AAAA;AAAA,KAAK,WAAU,eAAf;AACC;AAAA;AAAA,MAAK,WAAY,6BAA6BG,IAA7B,GAAoC,GAApC,GAA0CM,cAA1C,GAA2D,GAA3D,GAAiEC,MAAlF;AAEC;AACC,gBAAU,QADX;AAEC,mBAAaR,KAFd;AAGC,mBAAaD,QAAQ,GAHtB,GAFD;AAQG2B,gBAAa5B,KAAb,CARH;AAUC;AAAA;AAAA,OAAK,WAAU,UAAf;AAA4BC,aAAQ;AAApC;AAVD;AADD,GADD;AAiBA;AAxHkD,CAApD,E","file":"fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_pbar/block/block.build.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n","/**\n * Internationalization function, can be used like we do that in WordPress, e.g.:\n * __( 'My text', 'textdomain')\n */\nconst { __, _x, _n, _nx } = wp.i18n;\n\n/**\n * Import Gutenberg Components to use\n */\nconst {\n\tBlockControls,\n\tInspectorControls,\n} = wp.editor;\n\nconst {\n\tRangeControl,\n\tPanelBody,\n\tSelectControl,\n\tTextControl,\n\tToggleControl,\n\tIconButton\n} = wp.components;\n\nconst {\n\tregisterBlockType\n} = wp.blocks;\n\nconst {\n\tComponent,\n\tFragment\n} = wp.element;\n\n/**\n * Create new react component\n */\nclass fruitfulBlocksPbar extends Component {\n\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.initPbar();\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tthis.initPbar();\n\t}\n\n\tinitPbar() {\n\n\t\tif( typeof jQuery !== 'undefined') {\n\t\t\twindow.ff_bar_shortcode_reinit();\n\t\t}\n\n\t}\n\n\trender() {\n\t\t/**\n\t\t * Properties & attributes\n\t\t */\n\t\tconst {\n\t\t\tattributes: {\n\t\t\t\ttitle,\n\t\t\t\twidth,\n\t\t\t\tdelay,\n\t\t\t\ttype,\n\t\t\t\tisStriped\n\t\t\t},\n\t\t\tsetAttributes,\n\t\t\tfocus,\n\t\t\tsetFocus,\n\t\t\tclassName\n\t\t} = this.props;\n\n\t\tconst isStyleStriped = isStriped ? 'ff-style-striped' : '';\n\t\tconst isFull = width >= 95 ? 'ff-full' : '';\n\n\n\t\t/**\n\t\t * Render component\n\t\t */\n\t\treturn (\n\t\t\t<Fragment>\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<PanelBody title={ __( 'Attributes', 'ff-shortcodes' ) } initialOpen={ true }>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\tlabel={ __('Title', 'ff-shortcodes') }\n\t\t\t\t\t\t\tvalue={ title }\n\t\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { title: value } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\tlabel={ __( 'Type', 'ff-shortcodes' ) }\n\t\t\t\t\t\t\tvalue={ type }\n\t\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t\t{ label: __( 'Success', 'ff-shortcodes' ), value: 'success' },\n\t\t\t\t\t\t\t\t{ label: __( 'Info', 'ff-shortcodes' ), value: 'info' },\n\t\t\t\t\t\t\t\t{ label: __( 'Warning', 'ff-shortcodes' ), value: 'warning' },\n\t\t\t\t\t\t\t\t{ label: __( 'Danger', 'ff-shortcodes' ), value: 'danger' },\n\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\tonChange={ ( value ) => { setAttributes( { type: value } ); } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\tlabel={ __( 'Width', 'ff-shortcodes' ) }\n\t\t\t\t\t\t\tvalue={ width }\n\t\t\t\t\t\t\tonChange={ ( size ) => setAttributes( { width: size } ) }\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\t\tbeforeIcon=\"editor-textcolor\"\n\t\t\t\t\t\t\tallowReset\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\tlabel={ __('Delay', 'ff-shortcodes') }\n\t\t\t\t\t\t\tvalue={ delay }\n\t\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { delay: value } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Stripes', 'ff-shortcodes' ) }\n\t\t\t\t\t\t\tchecked={ isStriped }\n\t\t\t\t\t\t\tonChange={ ( state ) => setAttributes( { isStriped: state } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</InspectorControls>\n\n\t\t\t\t<div className=\"fruitful_pbar\">\n\t\t\t\t\t<div className={ 'ff fruitful_bar ff-type-' + type + ' ' + isStyleStriped + ' ' + isFull }>\n\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"ff-bar\"\n\t\t\t\t\t\t\tdata-delay={ delay }\n\t\t\t\t\t\t\tdata-width={ width + '%' }>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"ff-title\">{title}</div>\n\n\t\t\t\t\t\t<div className=\"ff-value\">{ width + '%' }</div>\n\n\t\t\t\t\t</div>\t\t\t\t\n\t\t\t\t</div>\n\n\t\t\t</Fragment>\n\t\t);\n\t}\n\n}\n\n/**\n * Register block\n */\nregisterBlockType( 'fruitful-blocks/fruitful-pbar', {\n\ttitle: __( 'Fruitful Progress Bar', 'ff-shortcodes' ),\n\tdescription: __( 'Progress Bar', 'ff-shortcodes' ),\n\ticon: <svg viewBox=\"0 0 32 32\" version=\"1.1\">\n\t\t<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n\t\t\t<rect stroke=\"#4A4A4A\" x=\"0.5\" y=\"8.5\" width=\"31\" height=\"5\" rx=\"2.5\"></rect>\n\t\t\t<path d=\"M26,8.5 L22,13.5\" id=\"Line\" stroke=\"#4A4A4A\"></path>\n\t\t\t<path d=\"M22,8.5 L18,13.5\" id=\"Line\" stroke=\"#4A4A4A\"></path>\n\t\t\t<path d=\"M18,8.5 L14,13.5\" id=\"Line\" stroke=\"#4A4A4A\"></path>\n\t\t\t<path d=\"M14,8.5 L10,13.5\" id=\"Line\" stroke=\"#4A4A4A\"></path>\n\t\t\t<path d=\"M10,8.5 L6,13.5\" id=\"Line\" stroke=\"#4A4A4A\"></path>\n\t\t\t<path d=\"M6,8.5 L2,13.5\" id=\"Line\" stroke=\"#4A4A4A\"></path>\n\t\t\t<rect stroke=\"#4A4A4A\" x=\"0.5\" y=\"18.5\" width=\"31\" height=\"5\" rx=\"2.5\"></rect>\n\t\t\t<path d=\"M18,18.5 L14,23.5\" id=\"Line\" stroke=\"#4A4A4A\"></path>\n\t\t\t<path d=\"M14,18.5 L10,23.5\" id=\"Line\" stroke=\"#4A4A4A\"></path>\n\t\t\t<path d=\"M10,18.5 L6,23.5\" id=\"Line\" stroke=\"#4A4A4A\"></path>\n\t\t\t<path d=\"M6,18.5 L2,23.5\" id=\"Line\" stroke=\"#4A4A4A\"></path>\n\t\t</g>\n\t</svg>,\n\tcategory: 'fruitful-blocks',\n\n\tsupports: {\n\t\t// add a possibility to change block ID\n\t\tanchor: false,\n\t\t// Add the support for block's alignment (left, center, right, wide, full).\n\t\talign: false,\n\t\t// add a possibility to change block class name\n\t\tcustomClassName: true,\n\t\t// By default, Gutenberg will allow a block’s markup to be edited individually.\n\t\thtml: false,\n\t\t// set to false to use this block just one per post / page\n\t\tmultiple: true,\n\t},\n\t\n\tkeywords: [ __( 'pbar', 'ff-shortcodes' ), __( 'progress', 'ff-shortcodes' ), __( 'bar', 'ff-shortcodes' ) ],\n\n\tattributes: {\n title: {\n\t\t\ttype: 'string',\n\t\t\tdefault: __( 'My title', 'ff-shortcodes')\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 70,\n\t\t},\n delay: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '0.2s'\n\t\t},\n type: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'success'\n\t\t},\n icon: {\n\t\t\ttype: 'string',\n\t\t\tdefault: ''\n\t\t},\n isStriped: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false\n\t\t},\n\t},\n\n\t/**\n\t * Following function called when you edit your block\n\t * through Gutenberg Editor\n\t */\n\tedit: fruitfulBlocksPbar,\n\n\t/**\n\t * Following function saves block data into post content\n\t */\n\tsave: ( props ) => {\n\n\t\t/**\n\t\t * Get saved properties\n\t\t */\n\t\tconst {\n\t\t\ttitle,\n\t\t\twidth,\n\t\t\tdelay,\n\t\t\ttype,\n\t\t\ticon,\n\t\t\tisStriped\n\t\t} = props.attributes;\n\n\t\t/**\n\t\t * Conditional rendering functions\n\t\t */\n\t\tconst isStyleStriped = isStriped ? 'ff-style-striped' : '';\n\t\tconst isFull = width >= 95 ? 'ff-full' : '';\n\n\t\tconst renderTitle = ( title ) => {\n\n\t\t\tif( title ) {\n\t\t\t\treturn (\n\t\t\t\t\t<div className=\"ff-title\">{title}</div>\n\t\t\t\t)\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<div className=\"fruitful_pbar\">\n\t\t\t\t<div className={ 'ff fruitful_bar ff-type-' + type + ' ' + isStyleStriped + ' ' + isFull }>\n\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"ff-bar\"\n\t\t\t\t\t\tdata-delay={ delay }\n\t\t\t\t\t\tdata-width={ width + '%' }>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{ renderTitle( title ) }\n\n\t\t\t\t\t<div className=\"ff-value\">{ width + '%' }</div>\n\n\t\t\t\t</div>\t\t\t\t\n\t\t\t</div>\n\t\t);\n\t}\n});"],"sourceRoot":""}
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_pbar/block/block.js
ADDED
@@ -0,0 +1,271 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Internationalization function, can be used like we do that in WordPress, e.g.:
|
3 |
+
* __( 'My text', 'textdomain')
|
4 |
+
*/
|
5 |
+
const { __, _x, _n, _nx } = wp.i18n;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Import Gutenberg Components to use
|
9 |
+
*/
|
10 |
+
const {
|
11 |
+
BlockControls,
|
12 |
+
InspectorControls,
|
13 |
+
} = wp.editor;
|
14 |
+
|
15 |
+
const {
|
16 |
+
RangeControl,
|
17 |
+
PanelBody,
|
18 |
+
SelectControl,
|
19 |
+
TextControl,
|
20 |
+
ToggleControl,
|
21 |
+
IconButton
|
22 |
+
} = wp.components;
|
23 |
+
|
24 |
+
const {
|
25 |
+
registerBlockType
|
26 |
+
} = wp.blocks;
|
27 |
+
|
28 |
+
const {
|
29 |
+
Component,
|
30 |
+
Fragment
|
31 |
+
} = wp.element;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Create new react component
|
35 |
+
*/
|
36 |
+
class fruitfulBlocksPbar extends Component {
|
37 |
+
|
38 |
+
constructor() {
|
39 |
+
super( ...arguments );
|
40 |
+
}
|
41 |
+
|
42 |
+
componentDidMount() {
|
43 |
+
this.initPbar();
|
44 |
+
}
|
45 |
+
|
46 |
+
componentDidUpdate( prevProps ) {
|
47 |
+
this.initPbar();
|
48 |
+
}
|
49 |
+
|
50 |
+
initPbar() {
|
51 |
+
|
52 |
+
if( typeof jQuery !== 'undefined') {
|
53 |
+
window.ff_bar_shortcode_reinit();
|
54 |
+
}
|
55 |
+
|
56 |
+
}
|
57 |
+
|
58 |
+
render() {
|
59 |
+
/**
|
60 |
+
* Properties & attributes
|
61 |
+
*/
|
62 |
+
const {
|
63 |
+
attributes: {
|
64 |
+
title,
|
65 |
+
width,
|
66 |
+
delay,
|
67 |
+
type,
|
68 |
+
isStriped
|
69 |
+
},
|
70 |
+
setAttributes,
|
71 |
+
focus,
|
72 |
+
setFocus,
|
73 |
+
className
|
74 |
+
} = this.props;
|
75 |
+
|
76 |
+
const isStyleStriped = isStriped ? 'ff-style-striped' : '';
|
77 |
+
const isFull = width >= 95 ? 'ff-full' : '';
|
78 |
+
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Render component
|
82 |
+
*/
|
83 |
+
return (
|
84 |
+
<Fragment>
|
85 |
+
<InspectorControls>
|
86 |
+
<PanelBody title={ __( 'Attributes', 'ff-shortcodes' ) } initialOpen={ true }>
|
87 |
+
<TextControl
|
88 |
+
label={ __('Title', 'ff-shortcodes') }
|
89 |
+
value={ title }
|
90 |
+
onChange={ ( value ) => setAttributes( { title: value } ) }
|
91 |
+
/>
|
92 |
+
<SelectControl
|
93 |
+
label={ __( 'Type', 'ff-shortcodes' ) }
|
94 |
+
value={ type }
|
95 |
+
options={ [
|
96 |
+
{ label: __( 'Success', 'ff-shortcodes' ), value: 'success' },
|
97 |
+
{ label: __( 'Info', 'ff-shortcodes' ), value: 'info' },
|
98 |
+
{ label: __( 'Warning', 'ff-shortcodes' ), value: 'warning' },
|
99 |
+
{ label: __( 'Danger', 'ff-shortcodes' ), value: 'danger' },
|
100 |
+
] }
|
101 |
+
onChange={ ( value ) => { setAttributes( { type: value } ); } }
|
102 |
+
/>
|
103 |
+
<RangeControl
|
104 |
+
label={ __( 'Width', 'ff-shortcodes' ) }
|
105 |
+
value={ width }
|
106 |
+
onChange={ ( size ) => setAttributes( { width: size } ) }
|
107 |
+
min={ 0 }
|
108 |
+
max={ 100 }
|
109 |
+
beforeIcon="editor-textcolor"
|
110 |
+
allowReset
|
111 |
+
/>
|
112 |
+
<TextControl
|
113 |
+
label={ __('Delay', 'ff-shortcodes') }
|
114 |
+
value={ delay }
|
115 |
+
onChange={ ( value ) => setAttributes( { delay: value } ) }
|
116 |
+
/>
|
117 |
+
<ToggleControl
|
118 |
+
label={ __( 'Stripes', 'ff-shortcodes' ) }
|
119 |
+
checked={ isStriped }
|
120 |
+
onChange={ ( state ) => setAttributes( { isStriped: state } ) }
|
121 |
+
/>
|
122 |
+
</PanelBody>
|
123 |
+
</InspectorControls>
|
124 |
+
|
125 |
+
<div className="fruitful_pbar">
|
126 |
+
<div className={ 'ff fruitful_bar ff-type-' + type + ' ' + isStyleStriped + ' ' + isFull }>
|
127 |
+
|
128 |
+
<div
|
129 |
+
className="ff-bar"
|
130 |
+
data-delay={ delay }
|
131 |
+
data-width={ width + '%' }>
|
132 |
+
</div>
|
133 |
+
|
134 |
+
<div className="ff-title">{title}</div>
|
135 |
+
|
136 |
+
<div className="ff-value">{ width + '%' }</div>
|
137 |
+
|
138 |
+
</div>
|
139 |
+
</div>
|
140 |
+
|
141 |
+
</Fragment>
|
142 |
+
);
|
143 |
+
}
|
144 |
+
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Register block
|
149 |
+
*/
|
150 |
+
registerBlockType( 'fruitful-blocks/fruitful-pbar', {
|
151 |
+
title: __( 'Fruitful Progress Bar', 'ff-shortcodes' ),
|
152 |
+
description: __( 'Progress Bar', 'ff-shortcodes' ),
|
153 |
+
icon: <svg viewBox="0 0 32 32" version="1.1">
|
154 |
+
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
155 |
+
<rect stroke="#4A4A4A" x="0.5" y="8.5" width="31" height="5" rx="2.5"></rect>
|
156 |
+
<path d="M26,8.5 L22,13.5" id="Line" stroke="#4A4A4A"></path>
|
157 |
+
<path d="M22,8.5 L18,13.5" id="Line" stroke="#4A4A4A"></path>
|
158 |
+
<path d="M18,8.5 L14,13.5" id="Line" stroke="#4A4A4A"></path>
|
159 |
+
<path d="M14,8.5 L10,13.5" id="Line" stroke="#4A4A4A"></path>
|
160 |
+
<path d="M10,8.5 L6,13.5" id="Line" stroke="#4A4A4A"></path>
|
161 |
+
<path d="M6,8.5 L2,13.5" id="Line" stroke="#4A4A4A"></path>
|
162 |
+
<rect stroke="#4A4A4A" x="0.5" y="18.5" width="31" height="5" rx="2.5"></rect>
|
163 |
+
<path d="M18,18.5 L14,23.5" id="Line" stroke="#4A4A4A"></path>
|
164 |
+
<path d="M14,18.5 L10,23.5" id="Line" stroke="#4A4A4A"></path>
|
165 |
+
<path d="M10,18.5 L6,23.5" id="Line" stroke="#4A4A4A"></path>
|
166 |
+
<path d="M6,18.5 L2,23.5" id="Line" stroke="#4A4A4A"></path>
|
167 |
+
</g>
|
168 |
+
</svg>,
|
169 |
+
category: 'fruitful-blocks',
|
170 |
+
|
171 |
+
supports: {
|
172 |
+
// add a possibility to change block ID
|
173 |
+
anchor: false,
|
174 |
+
// Add the support for block's alignment (left, center, right, wide, full).
|
175 |
+
align: false,
|
176 |
+
// add a possibility to change block class name
|
177 |
+
customClassName: true,
|
178 |
+
// By default, Gutenberg will allow a block’s markup to be edited individually.
|
179 |
+
html: false,
|
180 |
+
// set to false to use this block just one per post / page
|
181 |
+
multiple: true,
|
182 |
+
},
|
183 |
+
|
184 |
+
keywords: [ __( 'pbar', 'ff-shortcodes' ), __( 'progress', 'ff-shortcodes' ), __( 'bar', 'ff-shortcodes' ) ],
|
185 |
+
|
186 |
+
attributes: {
|
187 |
+
title: {
|
188 |
+
type: 'string',
|
189 |
+
default: __( 'My title', 'ff-shortcodes')
|
190 |
+
},
|
191 |
+
width: {
|
192 |
+
type: 'number',
|
193 |
+
default: 70,
|
194 |
+
},
|
195 |
+
delay: {
|
196 |
+
type: 'string',
|
197 |
+
default: '0.2s'
|
198 |
+
},
|
199 |
+
type: {
|
200 |
+
type: 'string',
|
201 |
+
default: 'success'
|
202 |
+
},
|
203 |
+
icon: {
|
204 |
+
type: 'string',
|
205 |
+
default: ''
|
206 |
+
},
|
207 |
+
isStriped: {
|
208 |
+
type: 'boolean',
|
209 |
+
default: false
|
210 |
+
},
|
211 |
+
},
|
212 |
+
|
213 |
+
/**
|
214 |
+
* Following function called when you edit your block
|
215 |
+
* through Gutenberg Editor
|
216 |
+
*/
|
217 |
+
edit: fruitfulBlocksPbar,
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Following function saves block data into post content
|
221 |
+
*/
|
222 |
+
save: ( props ) => {
|
223 |
+
|
224 |
+
/**
|
225 |
+
* Get saved properties
|
226 |
+
*/
|
227 |
+
const {
|
228 |
+
title,
|
229 |
+
width,
|
230 |
+
delay,
|
231 |
+
type,
|
232 |
+
icon,
|
233 |
+
isStriped
|
234 |
+
} = props.attributes;
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Conditional rendering functions
|
238 |
+
*/
|
239 |
+
const isStyleStriped = isStriped ? 'ff-style-striped' : '';
|
240 |
+
const isFull = width >= 95 ? 'ff-full' : '';
|
241 |
+
|
242 |
+
const renderTitle = ( title ) => {
|
243 |
+
|
244 |
+
if( title ) {
|
245 |
+
return (
|
246 |
+
<div className="ff-title">{title}</div>
|
247 |
+
)
|
248 |
+
} else {
|
249 |
+
return null;
|
250 |
+
}
|
251 |
+
};
|
252 |
+
|
253 |
+
return (
|
254 |
+
<div className="fruitful_pbar">
|
255 |
+
<div className={ 'ff fruitful_bar ff-type-' + type + ' ' + isStyleStriped + ' ' + isFull }>
|
256 |
+
|
257 |
+
<div
|
258 |
+
className="ff-bar"
|
259 |
+
data-delay={ delay }
|
260 |
+
data-width={ width + '%' }>
|
261 |
+
</div>
|
262 |
+
|
263 |
+
{ renderTitle( title ) }
|
264 |
+
|
265 |
+
<div className="ff-value">{ width + '%' }</div>
|
266 |
+
|
267 |
+
</div>
|
268 |
+
</div>
|
269 |
+
);
|
270 |
+
}
|
271 |
+
});
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_pbar/init.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// enqueue editor styles and scripts
|
4 |
+
add_action( 'enqueue_block_editor_assets', function () {
|
5 |
+
|
6 |
+
$block_name = 'fruitful_pbar';
|
7 |
+
$block_url = FF_SHORTCODES()->plugin_url . FF_SHORTCODES()->gutenberg_blocks_dir . '/' . $block_name . '/';
|
8 |
+
$assets_url = FF_SHORTCODES()->plugin_url . FF_SHORTCODES()->assets_dir . '/' . $block_name . '/';
|
9 |
+
|
10 |
+
// Block Scripts
|
11 |
+
wp_enqueue_script( 'wow' );
|
12 |
+
wp_enqueue_script( 'ff-fruitful_pbar' );
|
13 |
+
|
14 |
+
wp_enqueue_script(
|
15 |
+
'fruitful-blocks-pbar', // Handle
|
16 |
+
$block_url . 'block/block.build.js',
|
17 |
+
[ 'wp-editor', 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components' ],
|
18 |
+
FF_SHORTCODES()->cache_time,
|
19 |
+
true
|
20 |
+
);
|
21 |
+
|
22 |
+
// Block Styles
|
23 |
+
wp_enqueue_style(
|
24 |
+
'fruitful_pbar',
|
25 |
+
null,
|
26 |
+
[ 'wp-edit-blocks' ],
|
27 |
+
'b' . FF_SHORTCODES()->cache_time
|
28 |
+
);
|
29 |
+
|
30 |
+
// Set translations ( since WP 5.0 )
|
31 |
+
if ( function_exists( 'wp_set_script_translations' ) ) {
|
32 |
+
wp_set_script_translations( 'fruitful-blocks-pbar', 'ff-shortcodes' );
|
33 |
+
}
|
34 |
+
|
35 |
+
// pre WP 5.0 with gutenberg plugin
|
36 |
+
if ( function_exists( 'gutenberg_get_jed_locale_data' ) ) {
|
37 |
+
wp_add_inline_script(
|
38 |
+
'fruitful-blocks-pbar',
|
39 |
+
sprintf(
|
40 |
+
'var fruitful_blocks_pbar = { localeData: %s };',
|
41 |
+
json_encode( gutenberg_get_jed_locale_data( 'ff-shortcodes' ) )
|
42 |
+
),
|
43 |
+
'before'
|
44 |
+
);
|
45 |
+
}
|
46 |
+
|
47 |
+
} );
|
48 |
+
|
49 |
+
|
50 |
+
// load both front-end + back-end assets
|
51 |
+
add_action( 'enqueue_block_assets', function () {
|
52 |
+
|
53 |
+
wp_enqueue_style( 'ff-fruitful_pbar' );
|
54 |
+
wp_enqueue_script( 'wow' );
|
55 |
+
wp_enqueue_script( 'ff-fruitful_pbar' );
|
56 |
+
|
57 |
+
} );
|
58 |
+
|
59 |
+
// register the block
|
60 |
+
add_action( 'admin_init', function () {
|
61 |
+
|
62 |
+
register_block_type( 'fruitful-blocks/fruitful-pbar', [
|
63 |
+
'script' => 'fruitful-blocks-p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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/******/ (function(modules) { // webpackBootstrap
|
2 |
+
/******/ // The module cache
|
3 |
+
/******/ var installedModules = {};
|
4 |
+
/******/
|
5 |
+
/******/ // The require function
|
6 |
+
/******/ function __webpack_require__(moduleId) {
|
7 |
+
/******/
|
8 |
+
/******/ // Check if module is in cache
|
9 |
+
/******/ if(installedModules[moduleId]) {
|
10 |
+
/******/ return installedModules[moduleId].exports;
|
11 |
+
/******/ }
|
12 |
+
/******/ // Create a new module (and put it into the cache)
|
13 |
+
/******/ var module = installedModules[moduleId] = {
|
14 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
17 |
+
/******/ };
|
18 |
+
/******/
|
19 |
+
/******/ // Execute the module function
|
20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
+
/******/
|
22 |
+
/******/ // Flag the module as loaded
|
23 |
+
/******/ module.l = true;
|
24 |
+
/******/
|
25 |
+
/******/ // Return the exports of the module
|
26 |
+
/******/ return module.exports;
|
27 |
+
/******/ }
|
28 |
+
/******/
|
29 |
+
/******/
|
30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
31 |
+
/******/ __webpack_require__.m = modules;
|
32 |
+
/******/
|
33 |
+
/******/ // expose the module cache
|
34 |
+
/******/ __webpack_require__.c = installedModules;
|
35 |
+
/******/
|
36 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
40 |
+
/******/ }
|
41 |
+
/******/ };
|
42 |
+
/******/
|
43 |
+
/******/ // define __esModule on exports
|
44 |
+
/******/ __webpack_require__.r = function(exports) {
|
45 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
46 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
47 |
+
/******/ }
|
48 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
49 |
+
/******/ };
|
50 |
+
/******/
|
51 |
+
/******/ // create a fake namespace object
|
52 |
+
/******/ // mode & 1: value is a module id, require it
|
53 |
+
/******/ // mode & 2: merge all properties of value into the ns
|
54 |
+
/******/ // mode & 4: return value when already ns object
|
55 |
+
/******/ // mode & 8|1: behave like require
|
56 |
+
/******/ __webpack_require__.t = function(value, mode) {
|
57 |
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
58 |
+
/******/ if(mode & 8) return value;
|
59 |
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
60 |
+
/******/ var ns = Object.create(null);
|
61 |
+
/******/ __webpack_require__.r(ns);
|
62 |
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
63 |
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
64 |
+
/******/ return ns;
|
65 |
+
/******/ };
|
66 |
+
/******/
|
67 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
68 |
+
/******/ __webpack_require__.n = function(module) {
|
69 |
+
/******/ var getter = module && module.__esModule ?
|
70 |
+
/******/ function getDefault() { return module['default']; } :
|
71 |
+
/******/ function getModuleExports() { return module; };
|
72 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
73 |
+
/******/ return getter;
|
74 |
+
/******/ };
|
75 |
+
/******/
|
76 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
77 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
78 |
+
/******/
|
79 |
+
/******/ // __webpack_public_path__
|
80 |
+
/******/ __webpack_require__.p = "";
|
81 |
+
/******/
|
82 |
+
/******/
|
83 |
+
/******/ // Load entry module and return exports
|
84 |
+
/******/ return __webpack_require__(__webpack_require__.s = 5);
|
85 |
+
/******/ })
|
86 |
+
/************************************************************************/
|
87 |
+
/******/ ({
|
88 |
+
|
89 |
+
/***/ "./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts/block/block.js":
|
90 |
+
/*!**********************************************************************************************!*\
|
91 |
+
!*** ./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts/block/block.js ***!
|
92 |
+
\**********************************************************************************************/
|
93 |
+
/*! no static exports found */
|
94 |
+
/***/ (function(module, exports) {
|
95 |
+
|
96 |
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
97 |
+
|
98 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
99 |
+
|
100 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
101 |
+
|
102 |
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
103 |
+
|
104 |
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Internationalization function, can be used like we do that in WordPress, e.g.:
|
108 |
+
* __( 'My text', 'textdomain')
|
109 |
+
*/
|
110 |
+
var _wp$i18n = wp.i18n,
|
111 |
+
__ = _wp$i18n.__,
|
112 |
+
_x = _wp$i18n._x,
|
113 |
+
_n = _wp$i18n._n,
|
114 |
+
_nx = _wp$i18n._nx;
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Import Gutenberg Components to use
|
118 |
+
*/
|
119 |
+
|
120 |
+
var _wp$element = wp.element,
|
121 |
+
Component = _wp$element.Component,
|
122 |
+
Fragment = _wp$element.Fragment;
|
123 |
+
var _wp$editor = wp.editor,
|
124 |
+
InspectorControls = _wp$editor.InspectorControls,
|
125 |
+
BlockControls = _wp$editor.BlockControls;
|
126 |
+
var _wp$components = wp.components,
|
127 |
+
RangeControl = _wp$components.RangeControl,
|
128 |
+
ToggleControl = _wp$components.ToggleControl,
|
129 |
+
SelectControl = _wp$components.SelectControl,
|
130 |
+
TextControl = _wp$components.TextControl,
|
131 |
+
PanelBody = _wp$components.PanelBody,
|
132 |
+
QueryControls = _wp$components.QueryControls,
|
133 |
+
Spinner = _wp$components.Spinner,
|
134 |
+
Placeholder = _wp$components.Placeholder,
|
135 |
+
IconButton = _wp$components.IconButton,
|
136 |
+
Toolbar = _wp$components.Toolbar,
|
137 |
+
ServerSideRender = _wp$components.ServerSideRender;
|
138 |
+
var registerBlockType = wp.blocks.registerBlockType;
|
139 |
+
var withSelect = wp.data.withSelect;
|
140 |
+
var _lodash = lodash,
|
141 |
+
pickBy = _lodash.pickBy,
|
142 |
+
isUndefined = _lodash.isUndefined;
|
143 |
+
var decodeEntities = wp.htmlEntities.decodeEntities;
|
144 |
+
var moment = wp.date.moment;
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Custom Recent Posts React Component
|
148 |
+
*/
|
149 |
+
|
150 |
+
var fruitfulRecentPosts = function (_Component) {
|
151 |
+
_inherits(fruitfulRecentPosts, _Component);
|
152 |
+
|
153 |
+
function fruitfulRecentPosts() {
|
154 |
+
_classCallCheck(this, fruitfulRecentPosts);
|
155 |
+
|
156 |
+
return _possibleConstructorReturn(this, (fruitfulRecentPosts.__proto__ || Object.getPrototypeOf(fruitfulRecentPosts)).apply(this, arguments));
|
157 |
+
}
|
158 |
+
|
159 |
+
_createClass(fruitfulRecentPosts, [{
|
160 |
+
key: 'render',
|
161 |
+
value: function render() {
|
162 |
+
var _props = this.props,
|
163 |
+
attributes = _props.attributes,
|
164 |
+
setAttributes = _props.setAttributes,
|
165 |
+
recentPosts = _props.recentPosts,
|
166 |
+
categoriesList = _props.categoriesList;
|
167 |
+
var order = attributes.order,
|
168 |
+
orderBy = attributes.orderBy,
|
169 |
+
category = attributes.category,
|
170 |
+
numberOfPosts = attributes.numberOfPosts,
|
171 |
+
style = attributes.style,
|
172 |
+
columns = attributes.columns,
|
173 |
+
displayThumb = attributes.displayThumb,
|
174 |
+
thumbWidth = attributes.thumbWidth,
|
175 |
+
thumbHeight = attributes.thumbHeight,
|
176 |
+
thumbBorderRadius = attributes.thumbBorderRadius,
|
177 |
+
displayDate = attributes.displayDate,
|
178 |
+
displayHeader = attributes.displayHeader,
|
179 |
+
displayExcerpt = attributes.displayExcerpt,
|
180 |
+
postExcerptLength = attributes.postExcerptLength,
|
181 |
+
displayMetaData = attributes.displayMetaData;
|
182 |
+
|
183 |
+
|
184 |
+
var inspectorControls = wp.element.createElement(
|
185 |
+
InspectorControls,
|
186 |
+
null,
|
187 |
+
wp.element.createElement(
|
188 |
+
PanelBody,
|
189 |
+
{ title: __('Query'), initialOpen: true },
|
190 |
+
wp.element.createElement(QueryControls, _extends({ order: order, orderBy: orderBy }, {
|
191 |
+
categoriesList: categoriesList,
|
192 |
+
selectedCategoryId: category,
|
193 |
+
numberOfItems: numberOfPosts,
|
194 |
+
onOrderChange: function onOrderChange(value) {
|
195 |
+
return setAttributes({ order: value });
|
196 |
+
},
|
197 |
+
onOrderByChange: function onOrderByChange(value) {
|
198 |
+
return setAttributes({ orderBy: value });
|
199 |
+
},
|
200 |
+
onCategoryChange: function onCategoryChange(value) {
|
201 |
+
return setAttributes({ category: value !== '' ? value : undefined });
|
202 |
+
},
|
203 |
+
onNumberOfItemsChange: function onNumberOfItemsChange(value) {
|
204 |
+
return setAttributes({ numberOfPosts: value });
|
205 |
+
}
|
206 |
+
}))
|
207 |
+
),
|
208 |
+
wp.element.createElement(
|
209 |
+
PanelBody,
|
210 |
+
{ title: __('Attributes'), initialOpen: true },
|
211 |
+
wp.element.createElement(SelectControl, {
|
212 |
+
label: __('Style'),
|
213 |
+
value: style,
|
214 |
+
options: [{ label: __('Clean'), value: 'default' }, { label: __('Bordered'), value: 'bordered' }],
|
215 |
+
onChange: function onChange(value) {
|
216 |
+
return setAttributes({ style: value });
|
217 |
+
}
|
218 |
+
}),
|
219 |
+
wp.element.createElement(RangeControl, {
|
220 |
+
label: __('Columns'),
|
221 |
+
value: columns,
|
222 |
+
min: 1,
|
223 |
+
max: 4,
|
224 |
+
onChange: function onChange(value) {
|
225 |
+
return setAttributes({ columns: value });
|
226 |
+
}
|
227 |
+
}),
|
228 |
+
wp.element.createElement(ToggleControl, {
|
229 |
+
label: __('Display thumbnail'),
|
230 |
+
checked: displayThumb,
|
231 |
+
onChange: function onChange(value) {
|
232 |
+
return setAttributes({ displayThumb: value });
|
233 |
+
}
|
234 |
+
}),
|
235 |
+
displayThumb && wp.element.createElement(TextControl, {
|
236 |
+
label: __('Thumbnail width'),
|
237 |
+
value: thumbWidth,
|
238 |
+
onChange: function onChange(value) {
|
239 |
+
return setAttributes({ thumbWidth: value });
|
240 |
+
}
|
241 |
+
}),
|
242 |
+
displayThumb && wp.element.createElement(TextControl, {
|
243 |
+
label: __('Thumbnail height'),
|
244 |
+
value: thumbHeight,
|
245 |
+
onChange: function onChange(value) {
|
246 |
+
return setAttributes({ thumbHeight: value });
|
247 |
+
}
|
248 |
+
}),
|
249 |
+
displayThumb && wp.element.createElement(RangeControl, {
|
250 |
+
label: __('Thumbnail Border Radius'),
|
251 |
+
min: 0,
|
252 |
+
max: 20,
|
253 |
+
value: thumbBorderRadius,
|
254 |
+
onChange: function onChange(value) {
|
255 |
+
return setAttributes({ thumbBorderRadius: value });
|
256 |
+
}
|
257 |
+
}),
|
258 |
+
wp.element.createElement(ToggleControl, {
|
259 |
+
label: __('Display Post Date'),
|
260 |
+
checked: displayDate,
|
261 |
+
onChange: function onChange(value) {
|
262 |
+
return setAttributes({ displayDate: value });
|
263 |
+
}
|
264 |
+
}),
|
265 |
+
wp.element.createElement(ToggleControl, {
|
266 |
+
label: __('Display Header'),
|
267 |
+
checked: displayHeader,
|
268 |
+
onChange: function onChange(value) {
|
269 |
+
return setAttributes({ displayHeader: value });
|
270 |
+
}
|
271 |
+
}),
|
272 |
+
wp.element.createElement(ToggleControl, {
|
273 |
+
label: __('Display Excerpt'),
|
274 |
+
checked: displayExcerpt,
|
275 |
+
onChange: function onChange(value) {
|
276 |
+
return setAttributes({ displayExcerpt: value });
|
277 |
+
}
|
278 |
+
}),
|
279 |
+
displayExcerpt && wp.element.createElement(RangeControl, {
|
280 |
+
label: __('Excerpt length'),
|
281 |
+
min: 0,
|
282 |
+
max: 300,
|
283 |
+
value: postExcerptLength,
|
284 |
+
onChange: function onChange(value) {
|
285 |
+
return setAttributes({ postExcerptLength: value });
|
286 |
+
}
|
287 |
+
}),
|
288 |
+
wp.element.createElement(ToggleControl, {
|
289 |
+
label: __('Display Meta Data'),
|
290 |
+
checked: displayMetaData,
|
291 |
+
onChange: function onChange(value) {
|
292 |
+
return setAttributes({ displayMetaData: value });
|
293 |
+
}
|
294 |
+
})
|
295 |
+
)
|
296 |
+
);
|
297 |
+
|
298 |
+
var hasPosts = Array.isArray(recentPosts) && recentPosts.length;
|
299 |
+
var bootstrapCols = Math.abs(12 / columns);
|
300 |
+
|
301 |
+
// display a notice if there are no posts
|
302 |
+
if (!hasPosts) {
|
303 |
+
return wp.element.createElement(
|
304 |
+
Fragment,
|
305 |
+
null,
|
306 |
+
inspectorControls,
|
307 |
+
wp.element.createElement(
|
308 |
+
Placeholder,
|
309 |
+
{ label: __('Fruitful Recent Posts') },
|
310 |
+
!Array.isArray(recentPosts) ? wp.element.createElement(Spinner, null) : __('No posts found, sorry.')
|
311 |
+
)
|
312 |
+
);
|
313 |
+
}
|
314 |
+
|
315 |
+
// else display a block
|
316 |
+
return wp.element.createElement(
|
317 |
+
Fragment,
|
318 |
+
null,
|
319 |
+
inspectorControls,
|
320 |
+
wp.element.createElement(
|
321 |
+
BlockControls,
|
322 |
+
null,
|
323 |
+
wp.element.createElement(
|
324 |
+
Toolbar,
|
325 |
+
null,
|
326 |
+
wp.element.createElement(IconButton, {
|
327 |
+
label: __('Reload'),
|
328 |
+
icon: 'update',
|
329 |
+
onClick: function onClick() {
|
330 |
+
return setAttributes({ token: Math.floor(Math.random() * Math.floor(999)) });
|
331 |
+
}
|
332 |
+
})
|
333 |
+
)
|
334 |
+
),
|
335 |
+
wp.element.createElement(ServerSideRender, {
|
336 |
+
block: 'fruitful-blocks/fruitful-recent-posts',
|
337 |
+
attributes: attributes
|
338 |
+
})
|
339 |
+
);
|
340 |
+
}
|
341 |
+
}]);
|
342 |
+
|
343 |
+
return fruitfulRecentPosts;
|
344 |
+
}(Component);
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Register block
|
348 |
+
*/
|
349 |
+
|
350 |
+
|
351 |
+
registerBlockType('fruitful-blocks/fruitful-recent-posts', {
|
352 |
+
title: __('Fruitful Recent Posts'),
|
353 |
+
description: __('Displays Recent Posts'),
|
354 |
+
icon: wp.element.createElement(
|
355 |
+
'svg',
|
356 |
+
{ viewBox: '0 0 32 32', version: '1.1' },
|
357 |
+
wp.element.createElement(
|
358 |
+
'g',
|
359 |
+
{ stroke: 'none', 'stroke-width': '1', fill: 'none', 'fill-rule': 'evenodd' },
|
360 |
+
wp.element.createElement('rect', { stroke: '#4A4A4A', x: '2.5', y: '9.5', width: '7', height: '10', rx: '1' }),
|
361 |
+
wp.element.createElement('rect', { stroke: '#4A4A4A', x: '12.5', y: '9.5', width: '7', height: '10', rx: '1' }),
|
362 |
+
wp.element.createElement('rect', { stroke: '#4A4A4A', x: '22.5', y: '9.5', width: '7', height: '10', rx: '1' }),
|
363 |
+
wp.element.createElement('rect', { fill: '#4A4A4A', x: '2', y: '23', width: '8', height: '1', rx: '0.5' }),
|
364 |
+
wp.element.createElement('rect', { fill: '#4A4A4A', x: '2', y: '26', width: '8', height: '1', rx: '0.5' }),
|
365 |
+
wp.element.createElement('rect', { fill: '#4A4A4A', x: '7', y: '5', width: '18', height: '1', rx: '0.5' }),
|
366 |
+
wp.element.createElement('rect', { fill: '#4A4A4A', x: '12', y: '23', width: '8', height: '1', rx: '0.5' }),
|
367 |
+
wp.element.createElement('rect', { fill: '#4A4A4A', x: '12', y: '26', width: '8', height: '1', rx: '0.5' }),
|
368 |
+
wp.element.createElement('rect', { fill: '#4A4A4A', x: '22', y: '23', width: '8', height: '1', rx: '0.5' }),
|
369 |
+
wp.element.createElement('rect', { fill: '#4A4A4A', x: '22', y: '26', width: '8', height: '1', rx: '0.5' })
|
370 |
+
)
|
371 |
+
),
|
372 |
+
category: 'fruitful-blocks',
|
373 |
+
|
374 |
+
supports: {
|
375 |
+
// add a possibility to change block ID
|
376 |
+
anchor: false,
|
377 |
+
// Add the support for block's alignment (left, center, right, wide, full).
|
378 |
+
align: false,
|
379 |
+
// add a possibility to change block class name
|
380 |
+
customClassName: true,
|
381 |
+
// By default, Gutenberg will allow a block’s markup to be edited individually.
|
382 |
+
html: false,
|
383 |
+
// set to false to use this block just one per post / page
|
384 |
+
multiple: true
|
385 |
+
},
|
386 |
+
|
387 |
+
attributes: {
|
388 |
+
numberOfPosts: {
|
389 |
+
type: 'number',
|
390 |
+
default: 4
|
391 |
+
},
|
392 |
+
style: {
|
393 |
+
type: 'string',
|
394 |
+
default: 'default'
|
395 |
+
},
|
396 |
+
columns: {
|
397 |
+
type: 'number',
|
398 |
+
default: 4
|
399 |
+
},
|
400 |
+
displayThumb: {
|
401 |
+
type: 'boolean',
|
402 |
+
default: true
|
403 |
+
},
|
404 |
+
thumbWidth: {
|
405 |
+
type: 'number',
|
406 |
+
default: 255
|
407 |
+
},
|
408 |
+
thumbHeight: {
|
409 |
+
type: 'number',
|
410 |
+
default: 240
|
411 |
+
},
|
412 |
+
thumbBorderRadius: {
|
413 |
+
type: 'number',
|
414 |
+
default: 4
|
415 |
+
},
|
416 |
+
displayDate: {
|
417 |
+
type: 'boolean',
|
418 |
+
default: true
|
419 |
+
},
|
420 |
+
displayHeader: {
|
421 |
+
type: 'boolean',
|
422 |
+
default: true
|
423 |
+
},
|
424 |
+
displayExcerpt: {
|
425 |
+
type: 'boolean',
|
426 |
+
default: true
|
427 |
+
},
|
428 |
+
postExcerptLength: {
|
429 |
+
type: 'number',
|
430 |
+
default: 30
|
431 |
+
},
|
432 |
+
displayMetaData: {
|
433 |
+
type: 'boolean',
|
434 |
+
default: true
|
435 |
+
}
|
436 |
+
},
|
437 |
+
|
438 |
+
/**
|
439 |
+
* Following function called when you edit your block
|
440 |
+
* through Gutenberg Editor
|
441 |
+
*/
|
442 |
+
edit: withSelect(function (select, props) {
|
443 |
+
var _select = select('core'),
|
444 |
+
getEntityRecords = _select.getEntityRecords;
|
445 |
+
|
446 |
+
var _props$attributes = props.attributes,
|
447 |
+
category = _props$attributes.category,
|
448 |
+
order = _props$attributes.order,
|
449 |
+
orderBy = _props$attributes.orderBy,
|
450 |
+
postsPerPage = _props$attributes.postsPerPage,
|
451 |
+
token = _props$attributes.token;
|
452 |
+
|
453 |
+
|
454 |
+
var recentPostsQuery = pickBy({
|
455 |
+
categories: category,
|
456 |
+
order: order,
|
457 |
+
orderby: orderBy,
|
458 |
+
per_page: postsPerPage,
|
459 |
+
token: token
|
460 |
+
}, function (value) {
|
461 |
+
return !isUndefined(value);
|
462 |
+
});
|
463 |
+
|
464 |
+
var catsQuery = {
|
465 |
+
per_page: 99
|
466 |
+
};
|
467 |
+
|
468 |
+
return {
|
469 |
+
recentPosts: getEntityRecords('postType', 'post', recentPostsQuery),
|
470 |
+
categoriesList: getEntityRecords('taxonomy', 'category', catsQuery)
|
471 |
+
};
|
472 |
+
})(fruitfulRecentPosts),
|
473 |
+
|
474 |
+
/**
|
475 |
+
* Following function saves block data into post content
|
476 |
+
*/
|
477 |
+
save: function save(props) {
|
478 |
+
// will be rendered through PHP
|
479 |
+
return null;
|
480 |
+
}
|
481 |
+
|
482 |
+
});
|
483 |
+
|
484 |
+
/***/ }),
|
485 |
+
|
486 |
+
/***/ 5:
|
487 |
+
/*!****************************************************************************************************!*\
|
488 |
+
!*** multi ./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts/block/block.js ***!
|
489 |
+
\****************************************************************************************************/
|
490 |
+
/*! no static exports found */
|
491 |
+
/***/ (function(module, exports, __webpack_require__) {
|
492 |
+
|
493 |
+
module.exports = __webpack_require__(/*! F:/OSPanel/domains/_ff_/local/wp499.loc/wp-content/plugins/fruitful-shortcodes/fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts/block/block.js */"./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts/block/block.js");
|
494 |
+
|
495 |
+
|
496 |
+
/***/ })
|
497 |
+
|
498 |
+
/******/ });
|
499 |
+
//# sourceMappingURL=block.build.js.map
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts/block/block.build.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts/block/block.js"],"names":["wp","i18n","__","_x","_n","_nx","element","Component","Fragment","editor","InspectorControls","BlockControls","components","RangeControl","ToggleControl","SelectControl","TextControl","PanelBody","QueryControls","Spinner","Placeholder","IconButton","Toolbar","ServerSideRender","registerBlockType","blocks","withSelect","data","lodash","pickBy","isUndefined","decodeEntities","htmlEntities","moment","date","fruitfulRecentPosts","arguments","props","attributes","setAttributes","recentPosts","categoriesList","order","orderBy","category","numberOfPosts","style","columns","displayThumb","thumbWidth","thumbHeight","thumbBorderRadius","displayDate","displayHeader","displayExcerpt","postExcerptLength","displayMetaData","inspectorControls","value","undefined","label","hasPosts","Array","isArray","length","bootstrapCols","Math","abs","token","floor","random","title","description","icon","supports","anchor","align","customClassName","html","multiple","type","default","edit","select","getEntityRecords","postsPerPage","recentPostsQuery","categories","orderby","per_page","catsQuery","save"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;;;;;;;;;;AClFA;;;;eAI4BA,GAAGC,I;IAAvBC,E,YAAAA,E;IAAIC,E,YAAAA,E;IAAIC,E,YAAAA,E;IAAIC,G,YAAAA,G;;AAEpB;;;;kBAOIL,GAAGM,O;IAFNC,S,eAAAA,S;IACAC,Q,eAAAA,Q;iBAMGR,GAAGS,M;IAFNC,iB,cAAAA,iB;IACAC,a,cAAAA,a;qBAeGX,GAAGY,U;IAXNC,Y,kBAAAA,Y;IACAC,a,kBAAAA,a;IACAC,a,kBAAAA,a;IACAC,W,kBAAAA,W;IACAC,S,kBAAAA,S;IACAC,a,kBAAAA,a;IACAC,O,kBAAAA,O;IACAC,W,kBA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AM,SADW;AAEjBC,YAAS;AAFQ,GArCP;AAyCT1B,qBAAmB;AACpByB,SAAM,QADc;AAEpBC,YAAS;AAFW,GAzCV;AA6CTzB,mBAAiB;AAClBwB,SAAM,SADY;AAElBC,YAAS;AAFS;AA7CR,EAhC+C;;AAmF3D;;;;AAIAC,OAAMxD,WAAW,UAAEyD,MAAF,EAAU9C,KAAV,EAAqB;AAAA,gBAER8C,OAAQ,MAAR,CAFQ;AAAA,MAE7BC,gBAF6B,WAE7BA,gBAF6B;;AAAA,0BAGqB/C,MAAMC,UAH3B;AAAA,MAG7BM,QAH6B,qBAG7BA,QAH6B;AAAA,MAGnBF,KAHmB,qBAGnBA,KAHmB;AAAA,MAGZC,OAHY,qBAGZA,OAHY;AAAA,MAGH0C,YAHG,qBAGHA,YAHG;AAAA,MAGWjB,KAHX,qBAGWA,KAHX;;;AAKrC,MAAMkB,mBAAmBzD,OAAQ;AAChC0D,eAAY3C,QADoB;AAEhCF,eAFgC;AAGhC8C,YAAS7C,OAHuB;AAIhC8C,aAAUJ,YAJsB;AAKhCjB;AALgC,GAAR,EAMtB,UAAEV,KAAF;AAAA,UAAa,CAAC5B,YAAa4B,KAAb,CAAd;AAAA,GANsB,CAAzB;;AAQA,MAAMgC,YAAY;AACjBD,aAAU;AADO,GAAlB;;AAIA,SAAO;AACNjD,gBAAa4C,iBAAkB,UAAlB,EAA8B,MAA9B,EAAsCE,gBAAtC,CADP;AAEN7C,mBAAgB2C,iBAAkB,UAAlB,EAA8B,UAA9B,EAA0CM,SAA1C;AAFV,GAAP;AAIA,EArBK,EAqBDvD,mBArBC,CAvFqD;;AA8G3D;;;AAGAwD,OAAM,cAAEtD,KAAF,EAAa;AAClB;AACA,SAAO,IAAP;AACA;;AApH0D,CAA5D,E","file":"fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts/block/block.build.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n","/**\n * Internationalization function, can be used like we do that in WordPress, e.g.:\n * __( 'My text', 'textdomain')\n */\nconst { __, _x, _n, _nx } = wp.i18n;\n\n/**\n * Import Gutenberg Components to use\n */\n\nconst {\n\tComponent,\n\tFragment\n} = wp.element;\n\nconst {\n\tInspectorControls,\n\tBlockControls\n} = wp.editor;\n\nconst {\n\tRangeControl,\n\tToggleControl,\n\tSelectControl,\n\tTextControl,\n\tPanelBody,\n\tQueryControls,\n\tSpinner,\n\tPlaceholder,\n\tIconButton,\n\tToolbar,\n\tServerSideRender\n} = wp.components;\n\nconst {\n\tregisterBlockType\n} = wp.blocks;\n\nconst {\n\twithSelect\n} = wp.data;\n\nconst {\n\tpickBy,\n\tisUndefined\n} = lodash;\n\nconst {\n\tdecodeEntities \n} = wp.htmlEntities;\n\nconst {\n\tmoment\n} = wp.date;\n\n/**\n * Custom Recent Posts React Component\n */\n\nclass fruitfulRecentPosts extends Component {\n\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t}\n\n\trender() {\n\n\t\tconst { attributes, setAttributes, recentPosts, categoriesList } = this.props;\n\n\t\tconst {\n\t\t\torder,\n\t\t\torderBy,\n\t\t\tcategory,\n\t\t\tnumberOfPosts,\n\t\t\tstyle,\n\t\t\tcolumns,\n\t\t\tdisplayThumb,\n\t\t\tthumbWidth,\n\t\t\tthumbHeight,\n\t\t\tthumbBorderRadius,\n\t\t\tdisplayDate,\n\t\t\tdisplayHeader,\n\t\t\tdisplayExcerpt,\n\t\t\tpostExcerptLength,\n\t\t\tdisplayMetaData\n\t\t} = attributes;\n\n\t\tconst inspectorControls = (\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Query' ) } initialOpen={ true }>\n\t\t\t\t<QueryControls\n\t\t\t\t\t{ ...{ order, orderBy } }\n\t\t\t\t\tcategoriesList={ categoriesList }\n\t\t\t\t\tselectedCategoryId={ category }\n\t\t\t\t\tnumberOfItems={ numberOfPosts }\n\t\t\t\t\tonOrderChange={ ( value ) => setAttributes( { order: value } ) }\n\t\t\t\t\tonOrderByChange={ ( value ) => setAttributes( { orderBy: value } ) }\n\t\t\t\t\tonCategoryChange={ ( value ) => setAttributes( { category: value !== '' ? value : undefined } ) }\n\t\t\t\t\tonNumberOfItemsChange={ (value) => setAttributes( { numberOfPosts: value } ) }\n\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t\t<PanelBody title={ __( 'Attributes' ) } initialOpen={ true }>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Style' ) }\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t{ label: __( 'Clean' ), value: 'default' },\n\t\t\t\t\t\t\t{ label: __( 'Bordered' ), value: 'bordered' },\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { style: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Columns' ) }\n\t\t\t\t\t\tvalue={ columns }\n\t\t\t\t\t\tmin={ 1 }\n\t\t\t\t\t\tmax={ 4 }\n\t\t\t\t\t\tonChange={ (value) => setAttributes( { columns: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Display thumbnail' ) }\n\t\t\t\t\t\tchecked={ displayThumb }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { displayThumb: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t{displayThumb &&\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\tlabel={ __('Thumbnail width') }\n\t\t\t\t\t\t\tvalue={ thumbWidth }\n\t\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { thumbWidth: value } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\t{displayThumb &&\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\tlabel={ __('Thumbnail height') }\n\t\t\t\t\t\t\tvalue={ thumbHeight }\n\t\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { thumbHeight: value } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\t{displayThumb &&\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\tlabel={ __( 'Thumbnail Border Radius' ) }\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 20 }\n\t\t\t\t\t\t\tvalue={ thumbBorderRadius }\n\t\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { thumbBorderRadius: value } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Display Post Date' ) }\n\t\t\t\t\t\tchecked={ displayDate }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { displayDate: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Display Header' ) }\n\t\t\t\t\t\tchecked={ displayHeader }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { displayHeader: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Display Excerpt' ) }\n\t\t\t\t\t\tchecked={ displayExcerpt }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { displayExcerpt: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t{displayExcerpt &&\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\tlabel={ __( 'Excerpt length' ) }\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 300 }\n\t\t\t\t\t\t\tvalue={ postExcerptLength }\n\t\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { postExcerptLength: value } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Display Meta Data' ) }\n\t\t\t\t\t\tchecked={ displayMetaData }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { displayMetaData: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t);\n\n\t\tconst hasPosts = Array.isArray( recentPosts ) && recentPosts.length;\n\t\tconst bootstrapCols = Math.abs( 12 / columns );\n\n\t\t// display a notice if there are no posts\n\t\tif ( ! hasPosts) {\n\t\t\treturn (\n\t\t\t\t<Fragment>\n\t\t\t\t\t{ inspectorControls }\n\t\t\t\t\t<Placeholder label={ __( 'Fruitful Recent Posts' ) }>\n\t\t\t\t\t\t{ ! Array.isArray( recentPosts ) ? <Spinner /> : __( 'No posts found, sorry.' ) }\n\t\t\t\t\t</Placeholder>\n\t\t\t\t</Fragment>\n\t\t\t)\n\t\t}\n\n\t\t// else display a block\n\t\treturn (\n\t\t\t<Fragment>\n\t\t\t\t{ inspectorControls }\n\t\t\t\t<BlockControls>\n\t\t\t\t\t<Toolbar>\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\tlabel={ __( 'Reload' ) }\n\t\t\t\t\t\t\ticon=\"update\"\n\t\t\t\t\t\t\tonClick={ () => setAttributes( { token: Math.floor(Math.random() * Math.floor(999)) } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Toolbar>\n\t\t\t\t</BlockControls>\n\t\t\t\t<ServerSideRender\n\t\t\t\t\tblock=\"fruitful-blocks/fruitful-recent-posts\"\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t/>\n\t\t\t</Fragment>\n\t\t);\n\n\t}\n\n}\n\n/**\n * Register block\n */\nregisterBlockType( 'fruitful-blocks/fruitful-recent-posts', {\n\ttitle: __( 'Fruitful Recent Posts' ),\n\tdescription: __( 'Displays Recent Posts' ),\n\ticon: <svg viewBox=\"0 0 32 32\" version=\"1.1\">\n\t\t<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n\t\t\t<rect stroke=\"#4A4A4A\" x=\"2.5\" y=\"9.5\" width=\"7\" height=\"10\" rx=\"1\"></rect>\n\t\t\t<rect stroke=\"#4A4A4A\" x=\"12.5\" y=\"9.5\" width=\"7\" height=\"10\" rx=\"1\"></rect>\n\t\t\t<rect stroke=\"#4A4A4A\" x=\"22.5\" y=\"9.5\" width=\"7\" height=\"10\" rx=\"1\"></rect>\n\t\t\t<rect fill=\"#4A4A4A\" x=\"2\" y=\"23\" width=\"8\" height=\"1\" rx=\"0.5\"></rect>\n\t\t\t<rect fill=\"#4A4A4A\" x=\"2\" y=\"26\" width=\"8\" height=\"1\" rx=\"0.5\"></rect>\n\t\t\t<rect fill=\"#4A4A4A\" x=\"7\" y=\"5\" width=\"18\" height=\"1\" rx=\"0.5\"></rect>\n\t\t\t<rect fill=\"#4A4A4A\" x=\"12\" y=\"23\" width=\"8\" height=\"1\" rx=\"0.5\"></rect>\n\t\t\t<rect fill=\"#4A4A4A\" x=\"12\" y=\"26\" width=\"8\" height=\"1\" rx=\"0.5\"></rect>\n\t\t\t<rect fill=\"#4A4A4A\" x=\"22\" y=\"23\" width=\"8\" height=\"1\" rx=\"0.5\"></rect>\n\t\t\t<rect fill=\"#4A4A4A\" x=\"22\" y=\"26\" width=\"8\" height=\"1\" rx=\"0.5\"></rect>\n\t\t</g>\n\t</svg>,\n\tcategory: 'fruitful-blocks',\n\n\tsupports: {\n\t\t// add a possibility to change block ID\n\t\tanchor: false,\n\t\t// Add the support for block's alignment (left, center, right, wide, full).\n\t\talign: false,\n\t\t// add a possibility to change block class name\n\t\tcustomClassName: true,\n\t\t// By default, Gutenberg will allow a block’s markup to be edited individually.\n\t\thtml: false,\n\t\t// set to false to use this block just one per post / page\n\t\tmultiple: true,\n\t},\n\n\tattributes: {\n numberOfPosts: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 4\n\t\t},\n style: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'default'\n\t\t},\n columns: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 4\n\t\t},\n displayThumb: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: true\n\t\t},\n thumbWidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 255\n\t\t},\n thumbHeight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 240\n\t\t},\n thumbBorderRadius: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 4\n\t\t},\n displayDate: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: true\n\t\t},\n displayHeader: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: true\n\t\t},\n displayExcerpt: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: true\n\t\t},\n postExcerptLength: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 30\n\t\t},\n displayMetaData: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: true\n\t\t},\n\t},\n\n\t/**\n\t * Following function called when you edit your block\n\t * through Gutenberg Editor\n\t */\n\tedit: withSelect(( select, props ) => {\n\n\t\tconst { getEntityRecords } = select( 'core' );\n\t\tconst { category, order, orderBy, postsPerPage, token } = props.attributes;\n\n\t\tconst recentPostsQuery = pickBy( {\n\t\t\tcategories: category,\n\t\t\torder,\n\t\t\torderby: orderBy,\n\t\t\tper_page: postsPerPage,\n\t\t\ttoken,\n\t\t}, ( value ) => !isUndefined( value ) );\n\n\t\tconst catsQuery = {\n\t\t\tper_page: 99,\n\t\t};\n\n\t\treturn {\n\t\t\trecentPosts: getEntityRecords( 'postType', 'post', recentPostsQuery ),\n\t\t\tcategoriesList: getEntityRecords( 'taxonomy', 'category', catsQuery ),\n\t\t}\n\t} )( fruitfulRecentPosts ),\n\n\t/**\n\t * Following function saves block data into post content\n\t */\n\tsave: ( props ) => {\n\t\t// will be rendered through PHP\n\t\treturn null;\n\t},\n\n} );"],"sourceRoot":""}
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts/block/block.js
ADDED
@@ -0,0 +1,340 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Internationalization function, can be used like we do that in WordPress, e.g.:
|
3 |
+
* __( 'My text', 'textdomain')
|
4 |
+
*/
|
5 |
+
const { __, _x, _n, _nx } = wp.i18n;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Import Gutenberg Components to use
|
9 |
+
*/
|
10 |
+
|
11 |
+
const {
|
12 |
+
Component,
|
13 |
+
Fragment
|
14 |
+
} = wp.element;
|
15 |
+
|
16 |
+
const {
|
17 |
+
InspectorControls,
|
18 |
+
BlockControls
|
19 |
+
} = wp.editor;
|
20 |
+
|
21 |
+
const {
|
22 |
+
RangeControl,
|
23 |
+
ToggleControl,
|
24 |
+
SelectControl,
|
25 |
+
TextControl,
|
26 |
+
PanelBody,
|
27 |
+
QueryControls,
|
28 |
+
Spinner,
|
29 |
+
Placeholder,
|
30 |
+
IconButton,
|
31 |
+
Toolbar,
|
32 |
+
ServerSideRender
|
33 |
+
} = wp.components;
|
34 |
+
|
35 |
+
const {
|
36 |
+
registerBlockType
|
37 |
+
} = wp.blocks;
|
38 |
+
|
39 |
+
const {
|
40 |
+
withSelect
|
41 |
+
} = wp.data;
|
42 |
+
|
43 |
+
const {
|
44 |
+
pickBy,
|
45 |
+
isUndefined
|
46 |
+
} = lodash;
|
47 |
+
|
48 |
+
const {
|
49 |
+
decodeEntities
|
50 |
+
} = wp.htmlEntities;
|
51 |
+
|
52 |
+
const {
|
53 |
+
moment
|
54 |
+
} = wp.date;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Custom Recent Posts React Component
|
58 |
+
*/
|
59 |
+
|
60 |
+
class fruitfulRecentPosts extends Component {
|
61 |
+
|
62 |
+
constructor() {
|
63 |
+
super( ...arguments );
|
64 |
+
}
|
65 |
+
|
66 |
+
render() {
|
67 |
+
|
68 |
+
const { attributes, setAttributes, recentPosts, categoriesList } = this.props;
|
69 |
+
|
70 |
+
const {
|
71 |
+
order,
|
72 |
+
orderBy,
|
73 |
+
category,
|
74 |
+
numberOfPosts,
|
75 |
+
style,
|
76 |
+
columns,
|
77 |
+
displayThumb,
|
78 |
+
thumbWidth,
|
79 |
+
thumbHeight,
|
80 |
+
thumbBorderRadius,
|
81 |
+
displayDate,
|
82 |
+
displayHeader,
|
83 |
+
displayExcerpt,
|
84 |
+
postExcerptLength,
|
85 |
+
displayMetaData
|
86 |
+
} = attributes;
|
87 |
+
|
88 |
+
const inspectorControls = (
|
89 |
+
<InspectorControls>
|
90 |
+
<PanelBody title={ __( 'Query' ) } initialOpen={ true }>
|
91 |
+
<QueryControls
|
92 |
+
{ ...{ order, orderBy } }
|
93 |
+
categoriesList={ categoriesList }
|
94 |
+
selectedCategoryId={ category }
|
95 |
+
numberOfItems={ numberOfPosts }
|
96 |
+
onOrderChange={ ( value ) => setAttributes( { order: value } ) }
|
97 |
+
onOrderByChange={ ( value ) => setAttributes( { orderBy: value } ) }
|
98 |
+
onCategoryChange={ ( value ) => setAttributes( { category: value !== '' ? value : undefined } ) }
|
99 |
+
onNumberOfItemsChange={ (value) => setAttributes( { numberOfPosts: value } ) }
|
100 |
+
/>
|
101 |
+
</PanelBody>
|
102 |
+
<PanelBody title={ __( 'Attributes' ) } initialOpen={ true }>
|
103 |
+
<SelectControl
|
104 |
+
label={ __( 'Style' ) }
|
105 |
+
value={ style }
|
106 |
+
options={ [
|
107 |
+
{ label: __( 'Clean' ), value: 'default' },
|
108 |
+
{ label: __( 'Bordered' ), value: 'bordered' },
|
109 |
+
] }
|
110 |
+
onChange={ ( value ) => setAttributes( { style: value } ) }
|
111 |
+
/>
|
112 |
+
<RangeControl
|
113 |
+
label={ __( 'Columns' ) }
|
114 |
+
value={ columns }
|
115 |
+
min={ 1 }
|
116 |
+
max={ 4 }
|
117 |
+
onChange={ (value) => setAttributes( { columns: value } ) }
|
118 |
+
/>
|
119 |
+
<ToggleControl
|
120 |
+
label={ __( 'Display thumbnail' ) }
|
121 |
+
checked={ displayThumb }
|
122 |
+
onChange={ ( value ) => setAttributes( { displayThumb: value } ) }
|
123 |
+
/>
|
124 |
+
{displayThumb &&
|
125 |
+
<TextControl
|
126 |
+
label={ __('Thumbnail width') }
|
127 |
+
value={ thumbWidth }
|
128 |
+
onChange={ ( value ) => setAttributes( { thumbWidth: value } ) }
|
129 |
+
/>
|
130 |
+
}
|
131 |
+
{displayThumb &&
|
132 |
+
<TextControl
|
133 |
+
label={ __('Thumbnail height') }
|
134 |
+
value={ thumbHeight }
|
135 |
+
onChange={ ( value ) => setAttributes( { thumbHeight: value } ) }
|
136 |
+
/>
|
137 |
+
}
|
138 |
+
{displayThumb &&
|
139 |
+
<RangeControl
|
140 |
+
label={ __( 'Thumbnail Border Radius' ) }
|
141 |
+
min={ 0 }
|
142 |
+
max={ 20 }
|
143 |
+
value={ thumbBorderRadius }
|
144 |
+
onChange={ ( value ) => setAttributes( { thumbBorderRadius: value } ) }
|
145 |
+
/>
|
146 |
+
}
|
147 |
+
<ToggleControl
|
148 |
+
label={ __( 'Display Post Date' ) }
|
149 |
+
checked={ displayDate }
|
150 |
+
onChange={ ( value ) => setAttributes( { displayDate: value } ) }
|
151 |
+
/>
|
152 |
+
<ToggleControl
|
153 |
+
label={ __( 'Display Header' ) }
|
154 |
+
checked={ displayHeader }
|
155 |
+
onChange={ ( value ) => setAttributes( { displayHeader: value } ) }
|
156 |
+
/>
|
157 |
+
<ToggleControl
|
158 |
+
label={ __( 'Display Excerpt' ) }
|
159 |
+
checked={ displayExcerpt }
|
160 |
+
onChange={ ( value ) => setAttributes( { displayExcerpt: value } ) }
|
161 |
+
/>
|
162 |
+
{displayExcerpt &&
|
163 |
+
<RangeControl
|
164 |
+
label={ __( 'Excerpt length' ) }
|
165 |
+
min={ 0 }
|
166 |
+
max={ 300 }
|
167 |
+
value={ postExcerptLength }
|
168 |
+
onChange={ ( value ) => setAttributes( { postExcerptLength: value } ) }
|
169 |
+
/>
|
170 |
+
}
|
171 |
+
<ToggleControl
|
172 |
+
label={ __( 'Display Meta Data' ) }
|
173 |
+
checked={ displayMetaData }
|
174 |
+
onChange={ ( value ) => setAttributes( { displayMetaData: value } ) }
|
175 |
+
/>
|
176 |
+
</PanelBody>
|
177 |
+
</InspectorControls>
|
178 |
+
);
|
179 |
+
|
180 |
+
const hasPosts = Array.isArray( recentPosts ) && recentPosts.length;
|
181 |
+
const bootstrapCols = Math.abs( 12 / columns );
|
182 |
+
|
183 |
+
// display a notice if there are no posts
|
184 |
+
if ( ! hasPosts) {
|
185 |
+
return (
|
186 |
+
<Fragment>
|
187 |
+
{ inspectorControls }
|
188 |
+
<Placeholder label={ __( 'Fruitful Recent Posts' ) }>
|
189 |
+
{ ! Array.isArray( recentPosts ) ? <Spinner /> : __( 'No posts found, sorry.' ) }
|
190 |
+
</Placeholder>
|
191 |
+
</Fragment>
|
192 |
+
)
|
193 |
+
}
|
194 |
+
|
195 |
+
// else display a block
|
196 |
+
return (
|
197 |
+
<Fragment>
|
198 |
+
{ inspectorControls }
|
199 |
+
<BlockControls>
|
200 |
+
<Toolbar>
|
201 |
+
<IconButton
|
202 |
+
label={ __( 'Reload' ) }
|
203 |
+
icon="update"
|
204 |
+
onClick={ () => setAttributes( { token: Math.floor(Math.random() * Math.floor(999)) } ) }
|
205 |
+
/>
|
206 |
+
</Toolbar>
|
207 |
+
</BlockControls>
|
208 |
+
<ServerSideRender
|
209 |
+
block="fruitful-blocks/fruitful-recent-posts"
|
210 |
+
attributes={ attributes }
|
211 |
+
/>
|
212 |
+
</Fragment>
|
213 |
+
);
|
214 |
+
|
215 |
+
}
|
216 |
+
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Register block
|
221 |
+
*/
|
222 |
+
registerBlockType( 'fruitful-blocks/fruitful-recent-posts', {
|
223 |
+
title: __( 'Fruitful Recent Posts' ),
|
224 |
+
description: __( 'Displays Recent Posts' ),
|
225 |
+
icon: <svg viewBox="0 0 32 32" version="1.1">
|
226 |
+
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
227 |
+
<rect stroke="#4A4A4A" x="2.5" y="9.5" width="7" height="10" rx="1"></rect>
|
228 |
+
<rect stroke="#4A4A4A" x="12.5" y="9.5" width="7" height="10" rx="1"></rect>
|
229 |
+
<rect stroke="#4A4A4A" x="22.5" y="9.5" width="7" height="10" rx="1"></rect>
|
230 |
+
<rect fill="#4A4A4A" x="2" y="23" width="8" height="1" rx="0.5"></rect>
|
231 |
+
<rect fill="#4A4A4A" x="2" y="26" width="8" height="1" rx="0.5"></rect>
|
232 |
+
<rect fill="#4A4A4A" x="7" y="5" width="18" height="1" rx="0.5"></rect>
|
233 |
+
<rect fill="#4A4A4A" x="12" y="23" width="8" height="1" rx="0.5"></rect>
|
234 |
+
<rect fill="#4A4A4A" x="12" y="26" width="8" height="1" rx="0.5"></rect>
|
235 |
+
<rect fill="#4A4A4A" x="22" y="23" width="8" height="1" rx="0.5"></rect>
|
236 |
+
<rect fill="#4A4A4A" x="22" y="26" width="8" height="1" rx="0.5"></rect>
|
237 |
+
</g>
|
238 |
+
</svg>,
|
239 |
+
category: 'fruitful-blocks',
|
240 |
+
|
241 |
+
supports: {
|
242 |
+
// add a possibility to change block ID
|
243 |
+
anchor: false,
|
244 |
+
// Add the support for block's alignment (left, center, right, wide, full).
|
245 |
+
align: false,
|
246 |
+
// add a possibility to change block class name
|
247 |
+
customClassName: true,
|
248 |
+
// By default, Gutenberg will allow a block’s markup to be edited individually.
|
249 |
+
html: false,
|
250 |
+
// set to false to use this block just one per post / page
|
251 |
+
multiple: true,
|
252 |
+
},
|
253 |
+
|
254 |
+
attributes: {
|
255 |
+
numberOfPosts: {
|
256 |
+
type: 'number',
|
257 |
+
default: 4
|
258 |
+
},
|
259 |
+
style: {
|
260 |
+
type: 'string',
|
261 |
+
default: 'default'
|
262 |
+
},
|
263 |
+
columns: {
|
264 |
+
type: 'number',
|
265 |
+
default: 4
|
266 |
+
},
|
267 |
+
displayThumb: {
|
268 |
+
type: 'boolean',
|
269 |
+
default: true
|
270 |
+
},
|
271 |
+
thumbWidth: {
|
272 |
+
type: 'number',
|
273 |
+
default: 255
|
274 |
+
},
|
275 |
+
thumbHeight: {
|
276 |
+
type: 'number',
|
277 |
+
default: 240
|
278 |
+
},
|
279 |
+
thumbBorderRadius: {
|
280 |
+
type: 'number',
|
281 |
+
default: 4
|
282 |
+
},
|
283 |
+
displayDate: {
|
284 |
+
type: 'boolean',
|
285 |
+
default: true
|
286 |
+
},
|
287 |
+
displayHeader: {
|
288 |
+
type: 'boolean',
|
289 |
+
default: true
|
290 |
+
},
|
291 |
+
displayExcerpt: {
|
292 |
+
type: 'boolean',
|
293 |
+
default: true
|
294 |
+
},
|
295 |
+
postExcerptLength: {
|
296 |
+
type: 'number',
|
297 |
+
default: 30
|
298 |
+
},
|
299 |
+
displayMetaData: {
|
300 |
+
type: 'boolean',
|
301 |
+
default: true
|
302 |
+
},
|
303 |
+
},
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Following function called when you edit your block
|
307 |
+
* through Gutenberg Editor
|
308 |
+
*/
|
309 |
+
edit: withSelect(( select, props ) => {
|
310 |
+
|
311 |
+
const { getEntityRecords } = select( 'core' );
|
312 |
+
const { category, order, orderBy, postsPerPage, token } = props.attributes;
|
313 |
+
|
314 |
+
const recentPostsQuery = pickBy( {
|
315 |
+
categories: category,
|
316 |
+
order,
|
317 |
+
orderby: orderBy,
|
318 |
+
per_page: postsPerPage,
|
319 |
+
token,
|
320 |
+
}, ( value ) => !isUndefined( value ) );
|
321 |
+
|
322 |
+
const catsQuery = {
|
323 |
+
per_page: 99,
|
324 |
+
};
|
325 |
+
|
326 |
+
return {
|
327 |
+
recentPosts: getEntityRecords( 'postType', 'post', recentPostsQuery ),
|
328 |
+
categoriesList: getEntityRecords( 'taxonomy', 'category', catsQuery ),
|
329 |
+
}
|
330 |
+
} )( fruitfulRecentPosts ),
|
331 |
+
|
332 |
+
/**
|
333 |
+
* Following function saves block data into post content
|
334 |
+
*/
|
335 |
+
save: ( props ) => {
|
336 |
+
// will be rendered through PHP
|
337 |
+
return null;
|
338 |
+
},
|
339 |
+
|
340 |
+
} );
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts/init.php
ADDED
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// enqueue editor styles
|
4 |
+
add_action( 'enqueue_block_editor_assets', function () {
|
5 |
+
|
6 |
+
$block_name = 'fruitful_recent_posts';
|
7 |
+
$block_url = FF_SHORTCODES()->plugin_url . FF_SHORTCODES()->gutenberg_blocks_dir . '/' . $block_name . '/';
|
8 |
+
$assets_url = FF_SHORTCODES()->plugin_url . FF_SHORTCODES()->assets_dir . '/' . $block_name . '/';
|
9 |
+
|
10 |
+
// Block Scripts
|
11 |
+
wp_enqueue_script(
|
12 |
+
'fruitful-blocks-recent-posts', // Handle
|
13 |
+
$block_url . 'block/block.build.js',
|
14 |
+
[ 'wp-editor', 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components' ],
|
15 |
+
FF_SHORTCODES()->cache_time,
|
16 |
+
true
|
17 |
+
);
|
18 |
+
|
19 |
+
// Block Styles
|
20 |
+
wp_enqueue_style(
|
21 |
+
'fruitful-blocks-recent-posts', // Handle
|
22 |
+
$assets_url . '/css/styles.css',
|
23 |
+
[ 'wp-edit-blocks', 'ff-shortcodes-grid' ],
|
24 |
+
'b' . FF_SHORTCODES()->cache_time
|
25 |
+
);
|
26 |
+
|
27 |
+
// Set translations ( since WP 5.0 )
|
28 |
+
if ( function_exists( 'wp_set_script_translations' ) ) {
|
29 |
+
wp_set_script_translations( 'fruitful-blocks-recent-posts', 'ff-shortcodes' );
|
30 |
+
}
|
31 |
+
|
32 |
+
// pre WP 5.0 with gutenberg plugin
|
33 |
+
if ( function_exists( 'gutenberg_get_jed_locale_data' ) ) {
|
34 |
+
wp_add_inline_script(
|
35 |
+
'fruitful-blocks-recent-posts',
|
36 |
+
sprintf(
|
37 |
+
'var fruitful_blocks_recent_posts = { localeData: %s };',
|
38 |
+
json_encode( gutenberg_get_jed_locale_data( 'ff-shortcodes' ) )
|
39 |
+
),
|
40 |
+
'before'
|
41 |
+
);
|
42 |
+
}
|
43 |
+
|
44 |
+
} );
|
45 |
+
|
46 |
+
// load both front-end + back-end assets
|
47 |
+
add_action( 'enqueue_block_assets', function () {
|
48 |
+
|
49 |
+
wp_enqueue_style( 'ff-shortcodes-grid' );
|
50 |
+
if ( ! is_admin() ) {
|
51 |
+
wp_enqueue_style( 'ff-fruitful_recent_posts' );
|
52 |
+
}
|
53 |
+
|
54 |
+
} );
|
55 |
+
|
56 |
+
// register and server-render the block
|
57 |
+
add_action( 'init', function () {
|
58 |
+
|
59 |
+
register_block_type( 'fruitful-blocks/fruitful-recent-posts', [
|
60 |
+
'script' => 'fruitful-blocks-recent-posts',
|
61 |
+
'attributes' => [
|
62 |
+
'order' => [
|
63 |
+
'type' => 'string',
|
64 |
+
'default' => 'desc'
|
65 |
+
],
|
66 |
+
'orderBy' => [
|
67 |
+
'type' => 'string',
|
68 |
+
'default' => 'date'
|
69 |
+
],
|
70 |
+
'category' => [
|
71 |
+
'type' => 'string',
|
72 |
+
'default' => ''
|
73 |
+
],
|
74 |
+
'numberOfPosts' => [
|
75 |
+
'type' => 'number',
|
76 |
+
'default' => 4
|
77 |
+
],
|
78 |
+
'columns' => [
|
79 |
+
'type' => 'number',
|
80 |
+
'default' => 4
|
81 |
+
],
|
82 |
+
'displayDate' => [
|
83 |
+
'type' => 'boolean',
|
84 |
+
'default' => true
|
85 |
+
],
|
86 |
+
'displayExcerpt' => [
|
87 |
+
'type' => 'boolean',
|
88 |
+
'default' => true
|
89 |
+
],
|
90 |
+
'displayHeader' => [
|
91 |
+
'type' => 'boolean',
|
92 |
+
'default' => true
|
93 |
+
],
|
94 |
+
'displayMetaData' => [
|
95 |
+
'type' => 'boolean',
|
96 |
+
'default' => true
|
97 |
+
],
|
98 |
+
'displayThumb' => [
|
99 |
+
'type' => 'boolean',
|
100 |
+
'default' => true
|
101 |
+
],
|
102 |
+
'postExcerptLength' => [
|
103 |
+
'type' => 'number',
|
104 |
+
'default' => 30
|
105 |
+
],
|
106 |
+
'style' => [
|
107 |
+
'type' => 'string',
|
108 |
+
'default' => 'default'
|
109 |
+
],
|
110 |
+
'thumbBorderRadius' => [
|
111 |
+
'type' => 'number',
|
112 |
+
'default' => 4
|
113 |
+
],
|
114 |
+
'thumbHeight' => [
|
115 |
+
'type' => 'number',
|
116 |
+
'default' => 255
|
117 |
+
],
|
118 |
+
'thumbWidth' => [
|
119 |
+
'type' => 'number',
|
120 |
+
'default' => 240
|
121 |
+
],
|
122 |
+
],
|
123 |
+
'render_callback' => function ( $attributes ) {
|
124 |
+
|
125 |
+
// we use a view file from Shortcodes, so prepare atts regarding used params
|
126 |
+
$view_atts = [
|
127 |
+
'posts' => $attributes['numberOfPosts'],
|
128 |
+
'cat' => $attributes['category'],
|
129 |
+
'style' => $attributes['style'],
|
130 |
+
'cols' => $attributes['columns'],
|
131 |
+
'show_thumbs' => $attributes['displayThumb'],
|
132 |
+
'thumb_width' => $attributes['thumbWidth'],
|
133 |
+
'thumb_height' => $attributes['thumbHeight'],
|
134 |
+
'thumb_radius' => $attributes['thumbBorderRadius'],
|
135 |
+
'show_date' => $attributes['displayDate'],
|
136 |
+
'show_header' => $attributes['displayHeader'],
|
137 |
+
'show_excerpt' => $attributes['displayExcerpt'],
|
138 |
+
'excerpt_len' => $attributes['postExcerptLength'],
|
139 |
+
'show_metadata' => $attributes['displayMetaData'],
|
140 |
+
];
|
141 |
+
|
142 |
+
$q_array = [
|
143 |
+
'post_type' => 'post',
|
144 |
+
'post_status' => 'publish',
|
145 |
+
'posts_per_page' => absint( $attributes['numberOfPosts'] ),
|
146 |
+
'ignore_sticky_posts' => true
|
147 |
+
];
|
148 |
+
|
149 |
+
if ( $view_atts['cat'] <> '' ) {
|
150 |
+
$cats_array = array_filter( explode( ',', $view_atts['cat'] ) );
|
151 |
+
$q_array['tax_query'] = [
|
152 |
+
[
|
153 |
+
'taxonomy' => 'category',
|
154 |
+
'field' => 'term_id',
|
155 |
+
'terms' => $cats_array
|
156 |
+
]
|
157 |
+
];
|
158 |
+
}
|
159 |
+
|
160 |
+
$posts = new WP_Query( $q_array );
|
161 |
+
|
162 |
+
return apply_filters( 'fruitful_recent_posts_shortcode', FF_SHORTCODES()->view->load(
|
163 |
+
FF_SHORTCODES()->shortcodes_dir . '/' . 'fruitful_recent_posts/view', [
|
164 |
+
'atts' => $view_atts,
|
165 |
+
'posts_query' => $posts
|
166 |
+
], false, true ) );
|
167 |
+
}
|
168 |
+
] );
|
169 |
+
|
170 |
+
} );
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts_slider/block/block.build.js
ADDED
@@ -0,0 +1,567 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/******/ (function(modules) { // webpackBootstrap
|
2 |
+
/******/ // The module cache
|
3 |
+
/******/ var installedModules = {};
|
4 |
+
/******/
|
5 |
+
/******/ // The require function
|
6 |
+
/******/ function __webpack_require__(moduleId) {
|
7 |
+
/******/
|
8 |
+
/******/ // Check if module is in cache
|
9 |
+
/******/ if(installedModules[moduleId]) {
|
10 |
+
/******/ return installedModules[moduleId].exports;
|
11 |
+
/******/ }
|
12 |
+
/******/ // Create a new module (and put it into the cache)
|
13 |
+
/******/ var module = installedModules[moduleId] = {
|
14 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
17 |
+
/******/ };
|
18 |
+
/******/
|
19 |
+
/******/ // Execute the module function
|
20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
+
/******/
|
22 |
+
/******/ // Flag the module as loaded
|
23 |
+
/******/ module.l = true;
|
24 |
+
/******/
|
25 |
+
/******/ // Return the exports of the module
|
26 |
+
/******/ return module.exports;
|
27 |
+
/******/ }
|
28 |
+
/******/
|
29 |
+
/******/
|
30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
31 |
+
/******/ __webpack_require__.m = modules;
|
32 |
+
/******/
|
33 |
+
/******/ // expose the module cache
|
34 |
+
/******/ __webpack_require__.c = installedModules;
|
35 |
+
/******/
|
36 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
40 |
+
/******/ }
|
41 |
+
/******/ };
|
42 |
+
/******/
|
43 |
+
/******/ // define __esModule on exports
|
44 |
+
/******/ __webpack_require__.r = function(exports) {
|
45 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
46 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
47 |
+
/******/ }
|
48 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
49 |
+
/******/ };
|
50 |
+
/******/
|
51 |
+
/******/ // create a fake namespace object
|
52 |
+
/******/ // mode & 1: value is a module id, require it
|
53 |
+
/******/ // mode & 2: merge all properties of value into the ns
|
54 |
+
/******/ // mode & 4: return value when already ns object
|
55 |
+
/******/ // mode & 8|1: behave like require
|
56 |
+
/******/ __webpack_require__.t = function(value, mode) {
|
57 |
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
58 |
+
/******/ if(mode & 8) return value;
|
59 |
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
60 |
+
/******/ var ns = Object.create(null);
|
61 |
+
/******/ __webpack_require__.r(ns);
|
62 |
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
63 |
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
64 |
+
/******/ return ns;
|
65 |
+
/******/ };
|
66 |
+
/******/
|
67 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
68 |
+
/******/ __webpack_require__.n = function(module) {
|
69 |
+
/******/ var getter = module && module.__esModule ?
|
70 |
+
/******/ function getDefault() { return module['default']; } :
|
71 |
+
/******/ function getModuleExports() { return module; };
|
72 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
73 |
+
/******/ return getter;
|
74 |
+
/******/ };
|
75 |
+
/******/
|
76 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
77 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
78 |
+
/******/
|
79 |
+
/******/ // __webpack_public_path__
|
80 |
+
/******/ __webpack_require__.p = "";
|
81 |
+
/******/
|
82 |
+
/******/
|
83 |
+
/******/ // Load entry module and return exports
|
84 |
+
/******/ return __webpack_require__(__webpack_require__.s = 4);
|
85 |
+
/******/ })
|
86 |
+
/************************************************************************/
|
87 |
+
/******/ ({
|
88 |
+
|
89 |
+
/***/ "./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts_slider/block/block.js":
|
90 |
+
/*!*****************************************************************************************************!*\
|
91 |
+
!*** ./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts_slider/block/block.js ***!
|
92 |
+
\*****************************************************************************************************/
|
93 |
+
/*! no static exports found */
|
94 |
+
/***/ (function(module, exports) {
|
95 |
+
|
96 |
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
97 |
+
|
98 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
99 |
+
|
100 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
101 |
+
|
102 |
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
103 |
+
|
104 |
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Internationalization function, can be used like we do that in WordPress, e.g.:
|
108 |
+
* __( 'My text', 'textdomain')
|
109 |
+
*/
|
110 |
+
var _wp$i18n = wp.i18n,
|
111 |
+
__ = _wp$i18n.__,
|
112 |
+
_x = _wp$i18n._x,
|
113 |
+
_n = _wp$i18n._n,
|
114 |
+
_nx = _wp$i18n._nx;
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Import Gutenberg Components to use
|
118 |
+
*/
|
119 |
+
|
120 |
+
var _wp$element = wp.element,
|
121 |
+
Component = _wp$element.Component,
|
122 |
+
Fragment = _wp$element.Fragment;
|
123 |
+
var _wp$editor = wp.editor,
|
124 |
+
InspectorControls = _wp$editor.InspectorControls,
|
125 |
+
BlockControls = _wp$editor.BlockControls;
|
126 |
+
var _wp$components = wp.components,
|
127 |
+
RangeControl = _wp$components.RangeControl,
|
128 |
+
ToggleControl = _wp$components.ToggleControl,
|
129 |
+
SelectControl = _wp$components.SelectControl,
|
130 |
+
TextControl = _wp$components.TextControl,
|
131 |
+
PanelBody = _wp$components.PanelBody,
|
132 |
+
QueryControls = _wp$components.QueryControls,
|
133 |
+
Spinner = _wp$components.Spinner,
|
134 |
+
Placeholder = _wp$components.Placeholder,
|
135 |
+
IconButton = _wp$components.IconButton,
|
136 |
+
Toolbar = _wp$components.Toolbar,
|
137 |
+
ServerSideRender = _wp$components.ServerSideRender;
|
138 |
+
var registerBlockType = wp.blocks.registerBlockType;
|
139 |
+
var withSelect = wp.data.withSelect;
|
140 |
+
var _lodash = lodash,
|
141 |
+
pickBy = _lodash.pickBy,
|
142 |
+
isUndefined = _lodash.isUndefined;
|
143 |
+
var decodeEntities = wp.htmlEntities.decodeEntities;
|
144 |
+
var moment = wp.date.moment;
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Custom Recent Posts Slider React Component
|
148 |
+
*/
|
149 |
+
|
150 |
+
var initSlider = null;
|
151 |
+
|
152 |
+
function initCarousel() {
|
153 |
+
|
154 |
+
if (window.jQuery) {
|
155 |
+
if (initSlider) {
|
156 |
+
clearTimeout(initSlider);
|
157 |
+
}
|
158 |
+
initSlider = setTimeout(window.ff_fruitful_recent_posts_slider_init, 700);
|
159 |
+
}
|
160 |
+
}
|
161 |
+
|
162 |
+
var fruitfulRecentPostsSlider = function (_Component) {
|
163 |
+
_inherits(fruitfulRecentPostsSlider, _Component);
|
164 |
+
|
165 |
+
function fruitfulRecentPostsSlider() {
|
166 |
+
_classCallCheck(this, fruitfulRecentPostsSlider);
|
167 |
+
|
168 |
+
return _possibleConstructorReturn(this, (fruitfulRecentPostsSlider.__proto__ || Object.getPrototypeOf(fruitfulRecentPostsSlider)).apply(this, arguments));
|
169 |
+
}
|
170 |
+
|
171 |
+
_createClass(fruitfulRecentPostsSlider, [{
|
172 |
+
key: 'componentDidMount',
|
173 |
+
value: function componentDidMount() {
|
174 |
+
initCarousel();
|
175 |
+
}
|
176 |
+
}, {
|
177 |
+
key: 'componentWillUpdate',
|
178 |
+
value: function componentWillUpdate(nextProps) {
|
179 |
+
if (initSlider) {
|
180 |
+
clearTimeout(initSlider);
|
181 |
+
}
|
182 |
+
}
|
183 |
+
}, {
|
184 |
+
key: 'componentDidUpdate',
|
185 |
+
value: function componentDidUpdate(prevProps) {
|
186 |
+
initCarousel();
|
187 |
+
}
|
188 |
+
}, {
|
189 |
+
key: 'render',
|
190 |
+
value: function render() {
|
191 |
+
var _props = this.props,
|
192 |
+
attributes = _props.attributes,
|
193 |
+
setAttributes = _props.setAttributes,
|
194 |
+
recentPosts = _props.recentPosts,
|
195 |
+
categoriesList = _props.categoriesList;
|
196 |
+
var order = attributes.order,
|
197 |
+
orderBy = attributes.orderBy,
|
198 |
+
category = attributes.category,
|
199 |
+
numberOfPosts = attributes.numberOfPosts,
|
200 |
+
style = attributes.style,
|
201 |
+
displayThumb = attributes.displayThumb,
|
202 |
+
thumbWidth = attributes.thumbWidth,
|
203 |
+
thumbHeight = attributes.thumbHeight,
|
204 |
+
thumbBorderRadius = attributes.thumbBorderRadius,
|
205 |
+
displayDate = attributes.displayDate,
|
206 |
+
displayHeader = attributes.displayHeader,
|
207 |
+
displayExcerpt = attributes.displayExcerpt,
|
208 |
+
postExcerptLength = attributes.postExcerptLength,
|
209 |
+
displayMetaData = attributes.displayMetaData,
|
210 |
+
title = attributes.title,
|
211 |
+
slides = attributes.slides,
|
212 |
+
slidesSmall = attributes.slidesSmall,
|
213 |
+
slidesExtraSmall = attributes.slidesExtraSmall;
|
214 |
+
|
215 |
+
|
216 |
+
var inspectorControls = wp.element.createElement(
|
217 |
+
InspectorControls,
|
218 |
+
null,
|
219 |
+
wp.element.createElement(
|
220 |
+
PanelBody,
|
221 |
+
{ title: __('Query'), initialOpen: true },
|
222 |
+
wp.element.createElement(QueryControls, _extends({ order: order, orderBy: orderBy }, {
|
223 |
+
categoriesList: categoriesList,
|
224 |
+
selectedCategoryId: category,
|
225 |
+
numberOfItems: numberOfPosts,
|
226 |
+
onOrderChange: function onOrderChange(value) {
|
227 |
+
return setAttributes({ order: value });
|
228 |
+
},
|
229 |
+
onOrderByChange: function onOrderByChange(value) {
|
230 |
+
return setAttributes({ orderBy: value });
|
231 |
+
},
|
232 |
+
onCategoryChange: function onCategoryChange(value) {
|
233 |
+
return setAttributes({ category: value !== '' ? value : undefined });
|
234 |
+
},
|
235 |
+
onNumberOfItemsChange: function onNumberOfItemsChange(value) {
|
236 |
+
return setAttributes({ numberOfPosts: value });
|
237 |
+
}
|
238 |
+
}))
|
239 |
+
),
|
240 |
+
wp.element.createElement(
|
241 |
+
PanelBody,
|
242 |
+
{ title: __('Attributes'), initialOpen: true },
|
243 |
+
wp.element.createElement(TextControl, {
|
244 |
+
label: __('Block Title (optional)'),
|
245 |
+
value: title,
|
246 |
+
onChange: function onChange(value) {
|
247 |
+
return setAttributes({ title: value });
|
248 |
+
}
|
249 |
+
}),
|
250 |
+
wp.element.createElement(SelectControl, {
|
251 |
+
label: __('Style'),
|
252 |
+
value: style,
|
253 |
+
options: [{ label: __('Clean'), value: 'default' }, { label: __('Bordered'), value: 'bordered' }],
|
254 |
+
onChange: function onChange(value) {
|
255 |
+
return setAttributes({ style: value });
|
256 |
+
}
|
257 |
+
}),
|
258 |
+
wp.element.createElement(ToggleControl, {
|
259 |
+
label: __('Display thumbnail'),
|
260 |
+
checked: displayThumb,
|
261 |
+
onChange: function onChange(value) {
|
262 |
+
return setAttributes({ displayThumb: value });
|
263 |
+
}
|
264 |
+
}),
|
265 |
+
displayThumb && wp.element.createElement(TextControl, {
|
266 |
+
label: __('Thumbnail width'),
|
267 |
+
value: thumbWidth,
|
268 |
+
onChange: function onChange(value) {
|
269 |
+
return setAttributes({ thumbWidth: value });
|
270 |
+
}
|
271 |
+
}),
|
272 |
+
displayThumb && wp.element.createElement(TextControl, {
|
273 |
+
label: __('Thumbnail height'),
|
274 |
+
value: thumbHeight,
|
275 |
+
onChange: function onChange(value) {
|
276 |
+
return setAttributes({ thumbHeight: value });
|
277 |
+
}
|
278 |
+
}),
|
279 |
+
displayThumb && wp.element.createElement(RangeControl, {
|
280 |
+
label: __('Thumbnail Border Radius'),
|
281 |
+
min: 0,
|
282 |
+
max: 20,
|
283 |
+
value: thumbBorderRadius,
|
284 |
+
onChange: function onChange(value) {
|
285 |
+
return setAttributes({ thumbBorderRadius: value });
|
286 |
+
}
|
287 |
+
}),
|
288 |
+
wp.element.createElement(ToggleControl, {
|
289 |
+
label: __('Display Post Date'),
|
290 |
+
checked: displayDate,
|
291 |
+
onChange: function onChange(value) {
|
292 |
+
return setAttributes({ displayDate: value });
|
293 |
+
}
|
294 |
+
}),
|
295 |
+
wp.element.createElement(ToggleControl, {
|
296 |
+
label: __('Display Header'),
|
297 |
+
checked: displayHeader,
|
298 |
+
onChange: function onChange(value) {
|
299 |
+
return setAttributes({ displayHeader: value });
|
300 |
+
}
|
301 |
+
}),
|
302 |
+
wp.element.createElement(ToggleControl, {
|
303 |
+
label: __('Display Excerpt'),
|
304 |
+
checked: displayExcerpt,
|
305 |
+
onChange: function onChange(value) {
|
306 |
+
return setAttributes({ displayExcerpt: value });
|
307 |
+
}
|
308 |
+
}),
|
309 |
+
displayExcerpt && wp.element.createElement(RangeControl, {
|
310 |
+
label: __('Excerpt length'),
|
311 |
+
min: 0,
|
312 |
+
max: 300,
|
313 |
+
value: postExcerptLength,
|
314 |
+
onChange: function onChange(value) {
|
315 |
+
return setAttributes({ postExcerptLength: value });
|
316 |
+
}
|
317 |
+
}),
|
318 |
+
wp.element.createElement(ToggleControl, {
|
319 |
+
label: __('Display Meta Data'),
|
320 |
+
checked: displayMetaData,
|
321 |
+
onChange: function onChange(value) {
|
322 |
+
return setAttributes({ displayMetaData: value });
|
323 |
+
}
|
324 |
+
})
|
325 |
+
),
|
326 |
+
wp.element.createElement(
|
327 |
+
PanelBody,
|
328 |
+
{ title: __('Responsiveness'), initialOpen: true },
|
329 |
+
wp.element.createElement(RangeControl, {
|
330 |
+
label: __('Visible slides'),
|
331 |
+
min: 1,
|
332 |
+
max: 5,
|
333 |
+
value: slides,
|
334 |
+
onChange: function onChange(value) {
|
335 |
+
return setAttributes({ slides: value });
|
336 |
+
}
|
337 |
+
}),
|
338 |
+
wp.element.createElement(RangeControl, {
|
339 |
+
label: __('Visible slides on small screen'),
|
340 |
+
min: 1,
|
341 |
+
max: 5,
|
342 |
+
value: slidesSmall,
|
343 |
+
onChange: function onChange(value) {
|
344 |
+
return setAttributes({ slidesSmall: value });
|
345 |
+
}
|
346 |
+
}),
|
347 |
+
wp.element.createElement(RangeControl, {
|
348 |
+
label: __('Visible slides on extra small screen'),
|
349 |
+
min: 1,
|
350 |
+
max: 5,
|
351 |
+
value: slidesExtraSmall,
|
352 |
+
onChange: function onChange(value) {
|
353 |
+
return setAttributes({ slidesExtraSmall: value });
|
354 |
+
}
|
355 |
+
})
|
356 |
+
)
|
357 |
+
);
|
358 |
+
|
359 |
+
var hasPosts = Array.isArray(recentPosts) && recentPosts.length;
|
360 |
+
|
361 |
+
// display a notice if there are no posts
|
362 |
+
if (!hasPosts) {
|
363 |
+
return wp.element.createElement(
|
364 |
+
Fragment,
|
365 |
+
null,
|
366 |
+
inspectorControls,
|
367 |
+
wp.element.createElement(
|
368 |
+
Placeholder,
|
369 |
+
{ label: __('Fruitful Recent Posts') },
|
370 |
+
!Array.isArray(recentPosts) ? wp.element.createElement(Spinner, null) : __('No posts found, sorry.')
|
371 |
+
)
|
372 |
+
);
|
373 |
+
}
|
374 |
+
|
375 |
+
// else display a block
|
376 |
+
return wp.element.createElement(
|
377 |
+
Fragment,
|
378 |
+
null,
|
379 |
+
inspectorControls,
|
380 |
+
wp.element.createElement(
|
381 |
+
BlockControls,
|
382 |
+
null,
|
383 |
+
wp.element.createElement(
|
384 |
+
Toolbar,
|
385 |
+
null,
|
386 |
+
wp.element.createElement(IconButton, {
|
387 |
+
label: __('Reload'),
|
388 |
+
icon: 'update',
|
389 |
+
onClick: function onClick() {
|
390 |
+
return setAttributes({ token: Math.floor(Math.random() * Math.floor(999)) });
|
391 |
+
}
|
392 |
+
})
|
393 |
+
)
|
394 |
+
),
|
395 |
+
wp.element.createElement(ServerSideRender, {
|
396 |
+
block: 'fruitful-blocks/fruitful-posts-slider',
|
397 |
+
attributes: attributes
|
398 |
+
})
|
399 |
+
);
|
400 |
+
}
|
401 |
+
}]);
|
402 |
+
|
403 |
+
return fruitfulRecentPostsSlider;
|
404 |
+
}(Component);
|
405 |
+
|
406 |
+
/**
|
407 |
+
* Register block
|
408 |
+
*/
|
409 |
+
|
410 |
+
|
411 |
+
registerBlockType('fruitful-blocks/fruitful-posts-slider', {
|
412 |
+
title: __('Fruitful Posts Slider'),
|
413 |
+
description: __('Displays Recent Posts Slider'),
|
414 |
+
icon: wp.element.createElement(
|
415 |
+
'svg',
|
416 |
+
{ viewBox: '0 0 32 32', version: '1.1' },
|
417 |
+
wp.element.createElement(
|
418 |
+
'g',
|
419 |
+
{ stroke: 'none', 'stroke-width': '1', fill: 'none', 'fill-rule': 'evenodd' },
|
420 |
+
wp.element.createElement('path', { d: 'M4.5,27.5 L30,27.5 C30.8284271,27.5 31.5,26.8284271 31.5,26 L31.5,6 C31.5,5.17157288 30.8284271,4.5 30,4.5 L6,4.5 C5.17157288,4.5 4.5,5.17157288 4.5,6 L4.5,27.5 Z', stroke: '#4A4A4A' }),
|
421 |
+
wp.element.createElement('path', { d: 'M0.5,8.5 L0.5,24 C0.5,25.9329966 2.06700338,27.5 4,27.5 L4.5,27.5 L4.5,8.5 L0.5,8.5 Z', stroke: '#4A4A4A' }),
|
422 |
+
wp.element.createElement('polyline', { stroke: '#4A4A4A', points: '16 12 12 16 16 20' }),
|
423 |
+
wp.element.createElement('polyline', { stroke: '#4A4A4A', transform: 'translate(23.000000, 16.000000) scale(-1, 1) translate(-23.000000, -16.000000) ', points: '25 12 21 16 25 20' })
|
424 |
+
)
|
425 |
+
),
|
426 |
+
category: 'fruitful-blocks',
|
427 |
+
|
428 |
+
supports: {
|
429 |
+
// add a possibility to change block ID
|
430 |
+
anchor: false,
|
431 |
+
// Add the support for block's alignment (left, center, right, wide, full).
|
432 |
+
align: false,
|
433 |
+
// add a possibility to change block class name
|
434 |
+
customClassName: true,
|
435 |
+
// By default, Gutenberg will allow a block’s markup to be edited individually.
|
436 |
+
html: false,
|
437 |
+
// set to false to use this block just one per post / page
|
438 |
+
multiple: true
|
439 |
+
},
|
440 |
+
|
441 |
+
attributes: {
|
442 |
+
numberOfPosts: {
|
443 |
+
type: 'number',
|
444 |
+
default: 4
|
445 |
+
},
|
446 |
+
style: {
|
447 |
+
type: 'string',
|
448 |
+
default: 'default'
|
449 |
+
},
|
450 |
+
displayThumb: {
|
451 |
+
type: 'boolean',
|
452 |
+
default: true
|
453 |
+
},
|
454 |
+
thumbWidth: {
|
455 |
+
type: 'number',
|
456 |
+
default: 255
|
457 |
+
},
|
458 |
+
thumbHeight: {
|
459 |
+
type: 'number',
|
460 |
+
default: 240
|
461 |
+
},
|
462 |
+
thumbBorderRadius: {
|
463 |
+
type: 'number',
|
464 |
+
default: 4
|
465 |
+
},
|
466 |
+
displayDate: {
|
467 |
+
type: 'boolean',
|
468 |
+
default: true
|
469 |
+
},
|
470 |
+
displayHeader: {
|
471 |
+
type: 'boolean',
|
472 |
+
default: true
|
473 |
+
},
|
474 |
+
displayExcerpt: {
|
475 |
+
type: 'boolean',
|
476 |
+
default: true
|
477 |
+
},
|
478 |
+
postExcerptLength: {
|
479 |
+
type: 'number',
|
480 |
+
default: 30
|
481 |
+
},
|
482 |
+
displayMetaData: {
|
483 |
+
type: 'boolean',
|
484 |
+
default: true
|
485 |
+
},
|
486 |
+
title: {
|
487 |
+
type: 'string',
|
488 |
+
default: ''
|
489 |
+
},
|
490 |
+
slides: {
|
491 |
+
type: 'number',
|
492 |
+
default: 4
|
493 |
+
},
|
494 |
+
slidesSmall: {
|
495 |
+
type: 'number',
|
496 |
+
default: 3
|
497 |
+
},
|
498 |
+
slidesExtraSmall: {
|
499 |
+
type: 'number',
|
500 |
+
default: 2
|
501 |
+
}
|
502 |
+
},
|
503 |
+
|
504 |
+
/**
|
505 |
+
* Following function called when you edit your block
|
506 |
+
* through Gutenberg Editor
|
507 |
+
*/
|
508 |
+
edit: withSelect(function (select, props) {
|
509 |
+
var _select = select('core'),
|
510 |
+
getEntityRecords = _select.getEntityRecords;
|
511 |
+
|
512 |
+
var _props$attributes = props.attributes,
|
513 |
+
category = _props$attributes.category,
|
514 |
+
order = _props$attributes.order,
|
515 |
+
orderBy = _props$attributes.orderBy,
|
516 |
+
postsPerPage = _props$attributes.postsPerPage,
|
517 |
+
token = _props$attributes.token;
|
518 |
+
|
519 |
+
|
520 |
+
var recentPostsQuery = pickBy({
|
521 |
+
categories: category,
|
522 |
+
order: order,
|
523 |
+
orderby: orderBy,
|
524 |
+
per_page: postsPerPage,
|
525 |
+
token: token
|
526 |
+
}, function (value) {
|
527 |
+
return !isUndefined(value);
|
528 |
+
});
|
529 |
+
|
530 |
+
var catsQuery = {
|
531 |
+
per_page: 99
|
532 |
+
};
|
533 |
+
|
534 |
+
initCarousel();
|
535 |
+
|
536 |
+
return {
|
537 |
+
recentPosts: getEntityRecords('postType', 'post', recentPostsQuery),
|
538 |
+
categoriesList: getEntityRecords('taxonomy', 'category', catsQuery)
|
539 |
+
};
|
540 |
+
})(fruitfulRecentPostsSlider),
|
541 |
+
|
542 |
+
/**
|
543 |
+
* Following function saves block data into post content
|
544 |
+
*/
|
545 |
+
save: function save(props) {
|
546 |
+
// will be rendered through PHP
|
547 |
+
return null;
|
548 |
+
}
|
549 |
+
|
550 |
+
});
|
551 |
+
|
552 |
+
/***/ }),
|
553 |
+
|
554 |
+
/***/ 4:
|
555 |
+
/*!***********************************************************************************************************!*\
|
556 |
+
!*** multi ./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts_slider/block/block.js ***!
|
557 |
+
\***********************************************************************************************************/
|
558 |
+
/*! no static exports found */
|
559 |
+
/***/ (function(module, exports, __webpack_require__) {
|
560 |
+
|
561 |
+
module.exports = __webpack_require__(/*! F:/OSPanel/domains/_ff_/local/wp499.loc/wp-content/plugins/fruitful-shortcodes/fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts_slider/block/block.js */"./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts_slider/block/block.js");
|
562 |
+
|
563 |
+
|
564 |
+
/***/ })
|
565 |
+
|
566 |
+
/******/ });
|
567 |
+
//# sourceMappingURL=block.build.js.map
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts_slider/block/block.build.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts_slider/block/block.js"],"names":["wp","i18n","__","_x","_n","_nx","element","Component","Fragment","editor","InspectorControls","BlockControls","components","RangeControl","ToggleControl","SelectControl","TextControl","PanelBody","QueryControls","Spinner","Placeholder","IconButton","Toolbar","ServerSideRender","registerBlockType","blocks","withSelect","data","lodash","pickBy","isUndefined","decodeEntities","htmlEntities","moment","date","initSlider","initCarousel","window","jQuery","clearTimeout","setTimeout","ff_fruitful_recent_posts_slider_init","fruitfulRecentPostsSlider","arguments","nextProps","prevProps","props","attributes","setAttributes","recentPosts","categoriesList","order","orderBy","category","numberOfPosts","style","displayThumb","thumbWidth","thumbHeight","thumbBorderRadius","displayDate","displayHeader","displayExcerpt","postExcerptLength","displayMetaData","title","slides","slidesSmall","slidesExtraSmall","inspectorControls","value","undefined","label","hasPosts","Array","isArray","length","token","Math","floor","random","description","icon","supports","anchor","align","customClassName","html","multiple","type","default","edit","select","getEntityRecords","postsPerPage","recentPostsQuery","categories","orderby","per_page","catsQuery","save"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;;;;;;;;;;AClFA;;;;eAI4BA,GAAGC,I;IAAvBC,E,YAAAA,E;IAAIC,E,YAAAA,E;IAAIC,E,YAAAA,E;IAAIC,G,YAAAA,G;;AAEpB;;;;kBAOIL,GAAGM,O;IAFNC,S,eAAAA,S;IACAC,Q,eAAAA,Q;iBAMGR,GAAGS,M;IAFNC,iB,cAAAA,iB;IACAC,a,cAAAA,a;qBAeGX,GAAGY,U;IAXNC,Y,kBAAAA,Y;IACAC,a,kBAAAA,a;IACAC,a,kBAAAA,a;IACAC,W,kBAAAA,W;IACAC,S,kBAAAA,S;IACAC,a,kBAAAA,a;IACAC,O,kBAAAA,O;IACAC,W,kBAAAA,W;IACAC,U,kBAAAA,U;IACAC,O,kBAAAA,O;IACAC,gB,kBAAAA,gB;IAIAC,iB,GACGxB,GAAGyB,M,CADND,iB;IAIAE,U,GACG1B,GAAG2B,I,CADND,U;cAMGE,M;IAFHC,M,WAAAA,M;IACAC,W,WAAAA,W;IAIAC,c,GACG/B,GAAGgC,Y,C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xB,UAAQ;AACTuB,SAAM,QADG;AAETC,YAAS;AAFA,GAjDC;AAqDTvB,eAAa;AACdsB,SAAM,QADQ;AAEdC,YAAS;AAFK,GArDJ;AAyDTtB,oBAAkB;AACnBqB,SAAM,QADa;AAEnBC,YAAS;AAFU;AAzDT,EA1B+C;;AAyF3D;;;;AAIAC,OAAMjE,WAAW,UAAEkE,MAAF,EAAU9C,KAAV,EAAqB;AAAA,gBAER8C,OAAQ,MAAR,CAFQ;AAAA,MAE7BC,gBAF6B,WAE7BA,gBAF6B;;AAAA,0BAGqB/C,MAAMC,UAH3B;AAAA,MAG7BM,QAH6B,qBAG7BA,QAH6B;AAAA,MAGnBF,KAHmB,qBAGnBA,KAHmB;AAAA,MAGZC,OAHY,qBAGZA,OAHY;AAAA,MAGH0C,YAHG,qBAGHA,YAHG;AAAA,MAGWjB,KAHX,qBAGWA,KAHX;;;AAKrC,MAAMkB,mBAAmBlE,OAAQ;AAChCmE,eAAY3C,QADoB;AAEhCF,eAFgC;AAGhC8C,YAAS7C,OAHuB;AAIhC8C,aAAUJ,YAJsB;AAKhCjB;AALgC,GAAR,EAMtB,UAAEP,KAAF;AAAA,UAAa,CAACxC,YAAawC,KAAb,CAAd;AAAA,GANsB,CAAzB;;AAQA,MAAM6B,YAAY;AACjBD,aAAU;AADO,GAAlB;;AAKA9D;;AAEA,SAAO;AACNa,gBAAa4C,iBAAkB,UAAlB,EAA8B,MAA9B,EAAsCE,gBAAtC,CADP;AAEN7C,mBAAgB2C,iBAAkB,UAAlB,EAA8B,UAA9B,EAA0CM,SAA1C;AAFV,GAAP;AAIA,EAxBK,EAwBDzD,yBAxBC,CA7FqD;;AAuH3D;;;AAGA0D,OAAM,cAAEtD,KAAF,EAAa;AAClB;AACA,SAAO,IAAP;AACA;;AA7H0D,CAA5D,E","file":"fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts_slider/block/block.build.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","/**\n * Internationalization function, can be used like we do that in WordPress, e.g.:\n * __( 'My text', 'textdomain')\n */\nconst { __, _x, _n, _nx } = wp.i18n;\n\n/**\n * Import Gutenberg Components to use\n */\n\nconst {\n\tComponent,\n\tFragment\n} = wp.element;\n\nconst {\n\tInspectorControls,\n\tBlockControls\n} = wp.editor;\n\nconst {\n\tRangeControl,\n\tToggleControl,\n\tSelectControl,\n\tTextControl,\n\tPanelBody,\n\tQueryControls,\n\tSpinner,\n\tPlaceholder,\n\tIconButton,\n\tToolbar,\n\tServerSideRender\n} = wp.components;\n\nconst {\n\tregisterBlockType\n} = wp.blocks;\n\nconst {\n\twithSelect\n} = wp.data;\n\nconst {\n\tpickBy,\n\tisUndefined\n} = lodash;\n\nconst {\n\tdecodeEntities \n} = wp.htmlEntities;\n\nconst {\n\tmoment\n} = wp.date;\n\n/**\n * Custom Recent Posts Slider React Component\n */\n\nlet initSlider = null;\n\nfunction initCarousel() {\n\t\n\tif (window.jQuery) {\n\t\tif( initSlider ) {\n\t\t\tclearTimeout(initSlider);\n\t\t}\n\t\tinitSlider = setTimeout(window.ff_fruitful_recent_posts_slider_init, 700);\n\t}\n\t\n}\n\nclass fruitfulRecentPostsSlider extends Component {\n\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t}\n\n\tcomponentDidMount() {\n\t\tinitCarousel();\n\t}\n\n\tcomponentWillUpdate( nextProps ) {\n\t\tif( initSlider ) {\n\t\t\tclearTimeout(initSlider);\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tinitCarousel();\n\t}\n\t\n\t\n\trender() {\n\n\t\tconst { attributes, setAttributes, recentPosts, categoriesList } = this.props;\n\n\t\tconst {\n\t\t\torder,\n\t\t\torderBy,\n\t\t\tcategory,\n\t\t\tnumberOfPosts,\n\t\t\tstyle,\n\t\t\tdisplayThumb,\n\t\t\tthumbWidth,\n\t\t\tthumbHeight,\n\t\t\tthumbBorderRadius,\n\t\t\tdisplayDate,\n\t\t\tdisplayHeader,\n\t\t\tdisplayExcerpt,\n\t\t\tpostExcerptLength,\n\t\t\tdisplayMetaData,\n\t\t\ttitle,\n\t\t\tslides,\n\t\t\tslidesSmall,\n\t\t\tslidesExtraSmall\n\t\t} = attributes;\n\n\t\tconst inspectorControls = (\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Query' ) } initialOpen={ true }>\n\t\t\t\t\t<QueryControls\n\t\t\t\t\t\t{ ...{ order, orderBy } }\n\t\t\t\t\t\tcategoriesList={ categoriesList }\n\t\t\t\t\t\tselectedCategoryId={ category }\n\t\t\t\t\t\tnumberOfItems={ numberOfPosts }\n\t\t\t\t\t\tonOrderChange={ ( value ) => setAttributes( { order: value } ) }\n\t\t\t\t\t\tonOrderByChange={ ( value ) => setAttributes( { orderBy: value } ) }\n\t\t\t\t\t\tonCategoryChange={ ( value ) => setAttributes( { category: value !== '' ? value : undefined } ) }\n\t\t\t\t\t\tonNumberOfItemsChange={ (value) => setAttributes( { numberOfPosts: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t\t<PanelBody title={ __( 'Attributes' ) } initialOpen={ true }>\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tlabel={ __('Block Title (optional)') }\n\t\t\t\t\t\tvalue={ title }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { title: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Style' ) }\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t{ label: __( 'Clean' ), value: 'default' },\n\t\t\t\t\t\t\t{ label: __( 'Bordered' ), value: 'bordered' },\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { style: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Display thumbnail' ) }\n\t\t\t\t\t\tchecked={ displayThumb }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { displayThumb: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t{displayThumb &&\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\tlabel={ __('Thumbnail width') }\n\t\t\t\t\t\t\tvalue={ thumbWidth }\n\t\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { thumbWidth: value } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\t{displayThumb &&\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\tlabel={ __('Thumbnail height') }\n\t\t\t\t\t\t\tvalue={ thumbHeight }\n\t\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { thumbHeight: value } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\t{displayThumb &&\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\tlabel={ __( 'Thumbnail Border Radius' ) }\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 20 }\n\t\t\t\t\t\t\tvalue={ thumbBorderRadius }\n\t\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { thumbBorderRadius: value } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Display Post Date' ) }\n\t\t\t\t\t\tchecked={ displayDate }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { displayDate: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Display Header' ) }\n\t\t\t\t\t\tchecked={ displayHeader }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { displayHeader: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Display Excerpt' ) }\n\t\t\t\t\t\tchecked={ displayExcerpt }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { displayExcerpt: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t{displayExcerpt &&\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\tlabel={ __( 'Excerpt length' ) }\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 300 }\n\t\t\t\t\t\t\tvalue={ postExcerptLength }\n\t\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { postExcerptLength: value } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Display Meta Data' ) }\n\t\t\t\t\t\tchecked={ displayMetaData }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { displayMetaData: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t\t<PanelBody title={ __( 'Responsiveness' ) } initialOpen={ true }>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Visible slides' ) }\n\t\t\t\t\t\tmin={ 1 }\n\t\t\t\t\t\tmax={ 5 }\n\t\t\t\t\t\tvalue={ slides }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { slides: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Visible slides on small screen' ) }\n\t\t\t\t\t\tmin={ 1 }\n\t\t\t\t\t\tmax={ 5 }\n\t\t\t\t\t\tvalue={ slidesSmall }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { slidesSmall: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Visible slides on extra small screen' ) }\n\t\t\t\t\t\tmin={ 1 }\n\t\t\t\t\t\tmax={ 5 }\n\t\t\t\t\t\tvalue={ slidesExtraSmall }\n\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { slidesExtraSmall: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t);\n\n\t\tconst hasPosts = Array.isArray( recentPosts ) && recentPosts.length;\n\n\t\t// display a notice if there are no posts\n\t\tif ( ! hasPosts) {\n\t\t\treturn (\n\t\t\t\t<Fragment>\n\t\t\t\t\t{ inspectorControls }\n\t\t\t\t\t<Placeholder label={ __( 'Fruitful Recent Posts' ) }>\n\t\t\t\t\t\t{ ! Array.isArray( recentPosts ) ? <Spinner /> : __( 'No posts found, sorry.' ) }\n\t\t\t\t\t</Placeholder>\n\t\t\t\t</Fragment>\n\t\t\t)\n\t\t}\n\n\t\t// else display a block\n\t\treturn (\n\t\t\t<Fragment>\n\t\t\t\t{ inspectorControls }\n\t\t\t\t<BlockControls>\n\t\t\t\t\t<Toolbar>\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\tlabel={ __( 'Reload' ) }\n\t\t\t\t\t\t\ticon=\"update\"\n\t\t\t\t\t\t\tonClick={ () => setAttributes( { token: Math.floor(Math.random() * Math.floor(999)) } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Toolbar>\n\t\t\t\t</BlockControls>\n\t\t\t\t<ServerSideRender\n\t\t\t\t\tblock=\"fruitful-blocks/fruitful-posts-slider\"\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t/>\n\t\t\t</Fragment>\n\t\t);\n\n\t}\n\n}\n\n/**\n * Register block\n */\nregisterBlockType( 'fruitful-blocks/fruitful-posts-slider', {\n\ttitle: __( 'Fruitful Posts Slider' ),\n\tdescription: __( 'Displays Recent Posts Slider' ),\n\ticon: <svg viewBox=\"0 0 32 32\" version=\"1.1\">\n\t\t<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n\t\t\t<path d=\"M4.5,27.5 L30,27.5 C30.8284271,27.5 31.5,26.8284271 31.5,26 L31.5,6 C31.5,5.17157288 30.8284271,4.5 30,4.5 L6,4.5 C5.17157288,4.5 4.5,5.17157288 4.5,6 L4.5,27.5 Z\" stroke=\"#4A4A4A\"></path>\n\t\t\t<path d=\"M0.5,8.5 L0.5,24 C0.5,25.9329966 2.06700338,27.5 4,27.5 L4.5,27.5 L4.5,8.5 L0.5,8.5 Z\" stroke=\"#4A4A4A\"></path>\n\t\t\t<polyline stroke=\"#4A4A4A\" points=\"16 12 12 16 16 20\"></polyline>\n\t\t\t<polyline stroke=\"#4A4A4A\" transform=\"translate(23.000000, 16.000000) scale(-1, 1) translate(-23.000000, -16.000000) \" points=\"25 12 21 16 25 20\"></polyline>\n\t\t</g>\n\t</svg>,\n\tcategory: 'fruitful-blocks',\n\n\tsupports: {\n\t\t// add a possibility to change block ID\n\t\tanchor: false,\n\t\t// Add the support for block's alignment (left, center, right, wide, full).\n\t\talign: false,\n\t\t// add a possibility to change block class name\n\t\tcustomClassName: true,\n\t\t// By default, Gutenberg will allow a block’s markup to be edited individually.\n\t\thtml: false,\n\t\t// set to false to use this block just one per post / page\n\t\tmultiple: true,\n\t},\n\n\tattributes: {\n numberOfPosts: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 4\n\t\t},\n style: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'default'\n\t\t},\n displayThumb: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: true\n\t\t},\n thumbWidth: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 255\n\t\t},\n thumbHeight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 240\n\t\t},\n thumbBorderRadius: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 4\n\t\t},\n displayDate: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: true\n\t\t},\n displayHeader: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: true\n\t\t},\n displayExcerpt: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: true\n\t\t},\n postExcerptLength: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 30\n\t\t},\n displayMetaData: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: true\n\t\t},\n title: {\n\t\t\ttype: 'string',\n\t\t\tdefault: ''\n\t\t},\n slides: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 4\n\t\t},\n slidesSmall: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 3\n\t\t},\n slidesExtraSmall: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 2\n\t\t},\n\t},\n\n\t/**\n\t * Following function called when you edit your block\n\t * through Gutenberg Editor\n\t */\n\tedit: withSelect(( select, props ) => {\n\n\t\tconst { getEntityRecords } = select( 'core' );\n\t\tconst { category, order, orderBy, postsPerPage, token } = props.attributes;\n\n\t\tconst recentPostsQuery = pickBy( {\n\t\t\tcategories: category,\n\t\t\torder,\n\t\t\torderby: orderBy,\n\t\t\tper_page: postsPerPage,\n\t\t\ttoken,\n\t\t}, ( value ) => !isUndefined( value ) );\n\n\t\tconst catsQuery = {\n\t\t\tper_page: 99,\n\t\t};\n\t\t\n\t\t\t\t\n\t\tinitCarousel();\n\n\t\treturn {\n\t\t\trecentPosts: getEntityRecords( 'postType', 'post', recentPostsQuery ),\n\t\t\tcategoriesList: getEntityRecords( 'taxonomy', 'category', catsQuery ),\n\t\t}\n\t} )( fruitfulRecentPostsSlider ),\n\n\t/**\n\t * Following function saves block data into post content\n\t */\n\tsave: ( props ) => {\n\t\t// will be rendered through PHP\n\t\treturn null;\n\t},\n\n} );"],"sourceRoot":""}
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts_slider/block/block.js
ADDED
@@ -0,0 +1,400 @@
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Internationalization function, can be used like we do that in WordPress, e.g.:
|
3 |
+
* __( 'My text', 'textdomain')
|
4 |
+
*/
|
5 |
+
const { __, _x, _n, _nx } = wp.i18n;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Import Gutenberg Components to use
|
9 |
+
*/
|
10 |
+
|
11 |
+
const {
|
12 |
+
Component,
|
13 |
+
Fragment
|
14 |
+
} = wp.element;
|
15 |
+
|
16 |
+
const {
|
17 |
+
InspectorControls,
|
18 |
+
BlockControls
|
19 |
+
} = wp.editor;
|
20 |
+
|
21 |
+
const {
|
22 |
+
RangeControl,
|
23 |
+
ToggleControl,
|
24 |
+
SelectControl,
|
25 |
+
TextControl,
|
26 |
+
PanelBody,
|
27 |
+
QueryControls,
|
28 |
+
Spinner,
|
29 |
+
Placeholder,
|
30 |
+
IconButton,
|
31 |
+
Toolbar,
|
32 |
+
ServerSideRender
|
33 |
+
} = wp.components;
|
34 |
+
|
35 |
+
const {
|
36 |
+
registerBlockType
|
37 |
+
} = wp.blocks;
|
38 |
+
|
39 |
+
const {
|
40 |
+
withSelect
|
41 |
+
} = wp.data;
|
42 |
+
|
43 |
+
const {
|
44 |
+
pickBy,
|
45 |
+
isUndefined
|
46 |
+
} = lodash;
|
47 |
+
|
48 |
+
const {
|
49 |
+
decodeEntities
|
50 |
+
} = wp.htmlEntities;
|
51 |
+
|
52 |
+
const {
|
53 |
+
moment
|
54 |
+
} = wp.date;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Custom Recent Posts Slider React Component
|
58 |
+
*/
|
59 |
+
|
60 |
+
let initSlider = null;
|
61 |
+
|
62 |
+
function initCarousel() {
|
63 |
+
|
64 |
+
if (window.jQuery) {
|
65 |
+
if( initSlider ) {
|
66 |
+
clearTimeout(initSlider);
|
67 |
+
}
|
68 |
+
initSlider = setTimeout(window.ff_fruitful_recent_posts_slider_init, 700);
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
72 |
+
|
73 |
+
class fruitfulRecentPostsSlider extends Component {
|
74 |
+
|
75 |
+
constructor() {
|
76 |
+
super( ...arguments );
|
77 |
+
}
|
78 |
+
|
79 |
+
componentDidMount() {
|
80 |
+
initCarousel();
|
81 |
+
}
|
82 |
+
|
83 |
+
componentWillUpdate( nextProps ) {
|
84 |
+
if( initSlider ) {
|
85 |
+
clearTimeout(initSlider);
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
componentDidUpdate( prevProps ) {
|
90 |
+
initCarousel();
|
91 |
+
}
|
92 |
+
|
93 |
+
|
94 |
+
render() {
|
95 |
+
|
96 |
+
const { attributes, setAttributes, recentPosts, categoriesList } = this.props;
|
97 |
+
|
98 |
+
const {
|
99 |
+
order,
|
100 |
+
orderBy,
|
101 |
+
category,
|
102 |
+
numberOfPosts,
|
103 |
+
style,
|
104 |
+
displayThumb,
|
105 |
+
thumbWidth,
|
106 |
+
thumbHeight,
|
107 |
+
thumbBorderRadius,
|
108 |
+
displayDate,
|
109 |
+
displayHeader,
|
110 |
+
displayExcerpt,
|
111 |
+
postExcerptLength,
|
112 |
+
displayMetaData,
|
113 |
+
title,
|
114 |
+
slides,
|
115 |
+
slidesSmall,
|
116 |
+
slidesExtraSmall
|
117 |
+
} = attributes;
|
118 |
+
|
119 |
+
const inspectorControls = (
|
120 |
+
<InspectorControls>
|
121 |
+
<PanelBody title={ __( 'Query' ) } initialOpen={ true }>
|
122 |
+
<QueryControls
|
123 |
+
{ ...{ order, orderBy } }
|
124 |
+
categoriesList={ categoriesList }
|
125 |
+
selectedCategoryId={ category }
|
126 |
+
numberOfItems={ numberOfPosts }
|
127 |
+
onOrderChange={ ( value ) => setAttributes( { order: value } ) }
|
128 |
+
onOrderByChange={ ( value ) => setAttributes( { orderBy: value } ) }
|
129 |
+
onCategoryChange={ ( value ) => setAttributes( { category: value !== '' ? value : undefined } ) }
|
130 |
+
onNumberOfItemsChange={ (value) => setAttributes( { numberOfPosts: value } ) }
|
131 |
+
/>
|
132 |
+
</PanelBody>
|
133 |
+
<PanelBody title={ __( 'Attributes' ) } initialOpen={ true }>
|
134 |
+
<TextControl
|
135 |
+
label={ __('Block Title (optional)') }
|
136 |
+
value={ title }
|
137 |
+
onChange={ ( value ) => setAttributes( { title: value } ) }
|
138 |
+
/>
|
139 |
+
<SelectControl
|
140 |
+
label={ __( 'Style' ) }
|
141 |
+
value={ style }
|
142 |
+
options={ [
|
143 |
+
{ label: __( 'Clean' ), value: 'default' },
|
144 |
+
{ label: __( 'Bordered' ), value: 'bordered' },
|
145 |
+
] }
|
146 |
+
onChange={ ( value ) => setAttributes( { style: value } ) }
|
147 |
+
/>
|
148 |
+
<ToggleControl
|
149 |
+
label={ __( 'Display thumbnail' ) }
|
150 |
+
checked={ displayThumb }
|
151 |
+
onChange={ ( value ) => setAttributes( { displayThumb: value } ) }
|
152 |
+
/>
|
153 |
+
{displayThumb &&
|
154 |
+
<TextControl
|
155 |
+
label={ __('Thumbnail width') }
|
156 |
+
value={ thumbWidth }
|
157 |
+
onChange={ ( value ) => setAttributes( { thumbWidth: value } ) }
|
158 |
+
/>
|
159 |
+
}
|
160 |
+
{displayThumb &&
|
161 |
+
<TextControl
|
162 |
+
label={ __('Thumbnail height') }
|
163 |
+
value={ thumbHeight }
|
164 |
+
onChange={ ( value ) => setAttributes( { thumbHeight: value } ) }
|
165 |
+
/>
|
166 |
+
}
|
167 |
+
{displayThumb &&
|
168 |
+
<RangeControl
|
169 |
+
label={ __( 'Thumbnail Border Radius' ) }
|
170 |
+
min={ 0 }
|
171 |
+
max={ 20 }
|
172 |
+
value={ thumbBorderRadius }
|
173 |
+
onChange={ ( value ) => setAttributes( { thumbBorderRadius: value } ) }
|
174 |
+
/>
|
175 |
+
}
|
176 |
+
<ToggleControl
|
177 |
+
label={ __( 'Display Post Date' ) }
|
178 |
+
checked={ displayDate }
|
179 |
+
onChange={ ( value ) => setAttributes( { displayDate: value } ) }
|
180 |
+
/>
|
181 |
+
<ToggleControl
|
182 |
+
label={ __( 'Display Header' ) }
|
183 |
+
checked={ displayHeader }
|
184 |
+
onChange={ ( value ) => setAttributes( { displayHeader: value } ) }
|
185 |
+
/>
|
186 |
+
<ToggleControl
|
187 |
+
label={ __( 'Display Excerpt' ) }
|
188 |
+
checked={ displayExcerpt }
|
189 |
+
onChange={ ( value ) => setAttributes( { displayExcerpt: value } ) }
|
190 |
+
/>
|
191 |
+
{displayExcerpt &&
|
192 |
+
<RangeControl
|
193 |
+
label={ __( 'Excerpt length' ) }
|
194 |
+
min={ 0 }
|
195 |
+
max={ 300 }
|
196 |
+
value={ postExcerptLength }
|
197 |
+
onChange={ ( value ) => setAttributes( { postExcerptLength: value } ) }
|
198 |
+
/>
|
199 |
+
}
|
200 |
+
<ToggleControl
|
201 |
+
label={ __( 'Display Meta Data' ) }
|
202 |
+
checked={ displayMetaData }
|
203 |
+
onChange={ ( value ) => setAttributes( { displayMetaData: value } ) }
|
204 |
+
/>
|
205 |
+
</PanelBody>
|
206 |
+
<PanelBody title={ __( 'Responsiveness' ) } initialOpen={ true }>
|
207 |
+
<RangeControl
|
208 |
+
label={ __( 'Visible slides' ) }
|
209 |
+
min={ 1 }
|
210 |
+
max={ 5 }
|
211 |
+
value={ slides }
|
212 |
+
onChange={ ( value ) => setAttributes( { slides: value } ) }
|
213 |
+
/>
|
214 |
+
<RangeControl
|
215 |
+
label={ __( 'Visible slides on small screen' ) }
|
216 |
+
min={ 1 }
|
217 |
+
max={ 5 }
|
218 |
+
value={ slidesSmall }
|
219 |
+
onChange={ ( value ) => setAttributes( { slidesSmall: value } ) }
|
220 |
+
/>
|
221 |
+
<RangeControl
|
222 |
+
label={ __( 'Visible slides on extra small screen' ) }
|
223 |
+
min={ 1 }
|
224 |
+
max={ 5 }
|
225 |
+
value={ slidesExtraSmall }
|
226 |
+
onChange={ ( value ) => setAttributes( { slidesExtraSmall: value } ) }
|
227 |
+
/>
|
228 |
+
</PanelBody>
|
229 |
+
</InspectorControls>
|
230 |
+
);
|
231 |
+
|
232 |
+
const hasPosts = Array.isArray( recentPosts ) && recentPosts.length;
|
233 |
+
|
234 |
+
// display a notice if there are no posts
|
235 |
+
if ( ! hasPosts) {
|
236 |
+
return (
|
237 |
+
<Fragment>
|
238 |
+
{ inspectorControls }
|
239 |
+
<Placeholder label={ __( 'Fruitful Recent Posts' ) }>
|
240 |
+
{ ! Array.isArray( recentPosts ) ? <Spinner /> : __( 'No posts found, sorry.' ) }
|
241 |
+
</Placeholder>
|
242 |
+
</Fragment>
|
243 |
+
)
|
244 |
+
}
|
245 |
+
|
246 |
+
// else display a block
|
247 |
+
return (
|
248 |
+
<Fragment>
|
249 |
+
{ inspectorControls }
|
250 |
+
<BlockControls>
|
251 |
+
<Toolbar>
|
252 |
+
<IconButton
|
253 |
+
label={ __( 'Reload' ) }
|
254 |
+
icon="update"
|
255 |
+
onClick={ () => setAttributes( { token: Math.floor(Math.random() * Math.floor(999)) } ) }
|
256 |
+
/>
|
257 |
+
</Toolbar>
|
258 |
+
</BlockControls>
|
259 |
+
<ServerSideRender
|
260 |
+
block="fruitful-blocks/fruitful-posts-slider"
|
261 |
+
attributes={ attributes }
|
262 |
+
/>
|
263 |
+
</Fragment>
|
264 |
+
);
|
265 |
+
|
266 |
+
}
|
267 |
+
|
268 |
+
}
|
269 |
+
|
270 |
+
/**
|
271 |
+
* Register block
|
272 |
+
*/
|
273 |
+
registerBlockType( 'fruitful-blocks/fruitful-posts-slider', {
|
274 |
+
title: __( 'Fruitful Posts Slider' ),
|
275 |
+
description: __( 'Displays Recent Posts Slider' ),
|
276 |
+
icon: <svg viewBox="0 0 32 32" version="1.1">
|
277 |
+
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
278 |
+
<path d="M4.5,27.5 L30,27.5 C30.8284271,27.5 31.5,26.8284271 31.5,26 L31.5,6 C31.5,5.17157288 30.8284271,4.5 30,4.5 L6,4.5 C5.17157288,4.5 4.5,5.17157288 4.5,6 L4.5,27.5 Z" stroke="#4A4A4A"></path>
|
279 |
+
<path d="M0.5,8.5 L0.5,24 C0.5,25.9329966 2.06700338,27.5 4,27.5 L4.5,27.5 L4.5,8.5 L0.5,8.5 Z" stroke="#4A4A4A"></path>
|
280 |
+
<polyline stroke="#4A4A4A" points="16 12 12 16 16 20"></polyline>
|
281 |
+
<polyline stroke="#4A4A4A" transform="translate(23.000000, 16.000000) scale(-1, 1) translate(-23.000000, -16.000000) " points="25 12 21 16 25 20"></polyline>
|
282 |
+
</g>
|
283 |
+
</svg>,
|
284 |
+
category: 'fruitful-blocks',
|
285 |
+
|
286 |
+
supports: {
|
287 |
+
// add a possibility to change block ID
|
288 |
+
anchor: false,
|
289 |
+
// Add the support for block's alignment (left, center, right, wide, full).
|
290 |
+
align: false,
|
291 |
+
// add a possibility to change block class name
|
292 |
+
customClassName: true,
|
293 |
+
// By default, Gutenberg will allow a block’s markup to be edited individually.
|
294 |
+
html: false,
|
295 |
+
// set to false to use this block just one per post / page
|
296 |
+
multiple: true,
|
297 |
+
},
|
298 |
+
|
299 |
+
attributes: {
|
300 |
+
numberOfPosts: {
|
301 |
+
type: 'number',
|
302 |
+
default: 4
|
303 |
+
},
|
304 |
+
style: {
|
305 |
+
type: 'string',
|
306 |
+
default: 'default'
|
307 |
+
},
|
308 |
+
displayThumb: {
|
309 |
+
type: 'boolean',
|
310 |
+
default: true
|
311 |
+
},
|
312 |
+
thumbWidth: {
|
313 |
+
type: 'number',
|
314 |
+
default: 255
|
315 |
+
},
|
316 |
+
thumbHeight: {
|
317 |
+
type: 'number',
|
318 |
+
default: 240
|
319 |
+
},
|
320 |
+
thumbBorderRadius: {
|
321 |
+
type: 'number',
|
322 |
+
default: 4
|
323 |
+
},
|
324 |
+
displayDate: {
|
325 |
+
type: 'boolean',
|
326 |
+
default: true
|
327 |
+
},
|
328 |
+
displayHeader: {
|
329 |
+
type: 'boolean',
|
330 |
+
default: true
|
331 |
+
},
|
332 |
+
displayExcerpt: {
|
333 |
+
type: 'boolean',
|
334 |
+
default: true
|
335 |
+
},
|
336 |
+
postExcerptLength: {
|
337 |
+
type: 'number',
|
338 |
+
default: 30
|
339 |
+
},
|
340 |
+
displayMetaData: {
|
341 |
+
type: 'boolean',
|
342 |
+
default: true
|
343 |
+
},
|
344 |
+
title: {
|
345 |
+
type: 'string',
|
346 |
+
default: ''
|
347 |
+
},
|
348 |
+
slides: {
|
349 |
+
type: 'number',
|
350 |
+
default: 4
|
351 |
+
},
|
352 |
+
slidesSmall: {
|
353 |
+
type: 'number',
|
354 |
+
default: 3
|
355 |
+
},
|
356 |
+
slidesExtraSmall: {
|
357 |
+
type: 'number',
|
358 |
+
default: 2
|
359 |
+
},
|
360 |
+
},
|
361 |
+
|
362 |
+
/**
|
363 |
+
* Following function called when you edit your block
|
364 |
+
* through Gutenberg Editor
|
365 |
+
*/
|
366 |
+
edit: withSelect(( select, props ) => {
|
367 |
+
|
368 |
+
const { getEntityRecords } = select( 'core' );
|
369 |
+
const { category, order, orderBy, postsPerPage, token } = props.attributes;
|
370 |
+
|
371 |
+
const recentPostsQuery = pickBy( {
|
372 |
+
categories: category,
|
373 |
+
order,
|
374 |
+
orderby: orderBy,
|
375 |
+
per_page: postsPerPage,
|
376 |
+
token,
|
377 |
+
}, ( value ) => !isUndefined( value ) );
|
378 |
+
|
379 |
+
const catsQuery = {
|
380 |
+
per_page: 99,
|
381 |
+
};
|
382 |
+
|
383 |
+
|
384 |
+
initCarousel();
|
385 |
+
|
386 |
+
return {
|
387 |
+
recentPosts: getEntityRecords( 'postType', 'post', recentPostsQuery ),
|
388 |
+
categoriesList: getEntityRecords( 'taxonomy', 'category', catsQuery ),
|
389 |
+
}
|
390 |
+
} )( fruitfulRecentPostsSlider ),
|
391 |
+
|
392 |
+
/**
|
393 |
+
* Following function saves block data into post content
|
394 |
+
*/
|
395 |
+
save: ( props ) => {
|
396 |
+
// will be rendered through PHP
|
397 |
+
return null;
|
398 |
+
},
|
399 |
+
|
400 |
+
} );
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_recent_posts_slider/init.php
ADDED
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// enqueue editor styles
|
4 |
+
add_action( 'enqueue_block_editor_assets', function () {
|
5 |
+
|
6 |
+
$block_name = 'fruitful_recent_posts_slider';
|
7 |
+
$block_url = FF_SHORTCODES()->plugin_url . FF_SHORTCODES()->gutenberg_blocks_dir . '/' . $block_name . '/';
|
8 |
+
$assets_url = FF_SHORTCODES()->plugin_url . FF_SHORTCODES()->assets_dir . '/' . $block_name . '/';
|
9 |
+
|
10 |
+
wp_enqueue_style( 'slick' );
|
11 |
+
wp_enqueue_style( 'ff-fruitful_recent_posts' );
|
12 |
+
wp_enqueue_script( 'jquery' );
|
13 |
+
wp_enqueue_script( 'slick' );
|
14 |
+
wp_enqueue_script( 'ff-fruitful_recent_posts_slider' );
|
15 |
+
|
16 |
+
// Block Scripts
|
17 |
+
wp_enqueue_script(
|
18 |
+
'fruitful-blocks-posts-slider', // Handle
|
19 |
+
$block_url . 'block/block.build.js',
|
20 |
+
[ 'wp-editor', 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components' ],
|
21 |
+
FF_SHORTCODES()->cache_time,
|
22 |
+
true
|
23 |
+
);
|
24 |
+
|
25 |
+
// Block Styles
|
26 |
+
wp_enqueue_style(
|
27 |
+
'fruitful-blocks-posts-slider', // Handle
|
28 |
+
$assets_url . '/css/styles.css',
|
29 |
+
[ 'wp-edit-blocks', 'ff-shortcodes-grid' ],
|
30 |
+
'b' . FF_SHORTCODES()->cache_time
|
31 |
+
);
|
32 |
+
|
33 |
+
// Set translations ( since WP 5.0 )
|
34 |
+
if ( function_exists( 'wp_set_script_translations' ) ) {
|
35 |
+
wp_set_script_translations( 'fruitful-blocks-posts-slider', 'ff-shortcodes' );
|
36 |
+
}
|
37 |
+
|
38 |
+
// pre WP 5.0 with gutenberg plugin
|
39 |
+
if ( function_exists( 'gutenberg_get_jed_locale_data' ) ) {
|
40 |
+
wp_add_inline_script(
|
41 |
+
'fruitful-posts-slider',
|
42 |
+
sprintf(
|
43 |
+
'var fruitful_blocks_posts_slider = { localeData: %s };',
|
44 |
+
json_encode( gutenberg_get_jed_locale_data( 'ff-shortcodes' ) )
|
45 |
+
),
|
46 |
+
'before'
|
47 |
+
);
|
48 |
+
}
|
49 |
+
|
50 |
+
} );
|
51 |
+
|
52 |
+
// load both front-end + back-end assets
|
53 |
+
add_action( 'enqueue_block_assets', function () {
|
54 |
+
|
55 |
+
if ( ! is_admin() ) {
|
56 |
+
wp_enqueue_style( 'slick' );
|
57 |
+
wp_enqueue_style( 'ff-fruitful_recent_posts' );
|
58 |
+
wp_enqueue_style( 'ff-fruitful_recent_posts_slider' );
|
59 |
+
wp_enqueue_script( 'jquery' );
|
60 |
+
wp_enqueue_script( 'slick' );
|
61 |
+
wp_enqueue_script( 'ff-fruitful_recent_posts_slider' );
|
62 |
+
}
|
63 |
+
|
64 |
+
} );
|
65 |
+
|
66 |
+
// register and server-render the block
|
67 |
+
add_action( 'init', function () {
|
68 |
+
|
69 |
+
register_block_type( 'fruitful-blocks/fruitful-posts-slider', [
|
70 |
+
'script' => 'fruitful-blocks-posts-slider',
|
71 |
+
'attributes' => [
|
72 |
+
'order' => [
|
73 |
+
'type' => 'string',
|
74 |
+
'default' => 'desc'
|
75 |
+
],
|
76 |
+
'orderBy' => [
|
77 |
+
'type' => 'string',
|
78 |
+
'default' => 'date'
|
79 |
+
],
|
80 |
+
'category' => [
|
81 |
+
'type' => 'string',
|
82 |
+
'default' => ''
|
83 |
+
],
|
84 |
+
'numberOfPosts' => [
|
85 |
+
'type' => 'number',
|
86 |
+
'default' => 4
|
87 |
+
],
|
88 |
+
'displayDate' => [
|
89 |
+
'type' => 'boolean',
|
90 |
+
'default' => true
|
91 |
+
],
|
92 |
+
'displayExcerpt' => [
|
93 |
+
'type' => 'boolean',
|
94 |
+
'default' => true
|
95 |
+
],
|
96 |
+
'displayHeader' => [
|
97 |
+
'type' => 'boolean',
|
98 |
+
'default' => true
|
99 |
+
],
|
100 |
+
'displayMetaData' => [
|
101 |
+
'type' => 'boolean',
|
102 |
+
'default' => true
|
103 |
+
],
|
104 |
+
'displayThumb' => [
|
105 |
+
'type' => 'boolean',
|
106 |
+
'default' => true
|
107 |
+
],
|
108 |
+
'postExcerptLength' => [
|
109 |
+
'type' => 'number',
|
110 |
+
'default' => 30
|
111 |
+
],
|
112 |
+
'style' => [
|
113 |
+
'type' => 'string',
|
114 |
+
'default' => 'default'
|
115 |
+
],
|
116 |
+
'thumbBorderRadius' => [
|
117 |
+
'type' => 'number',
|
118 |
+
'default' => 4
|
119 |
+
],
|
120 |
+
'thumbHeight' => [
|
121 |
+
'type' => 'number',
|
122 |
+
'default' => 255
|
123 |
+
],
|
124 |
+
'thumbWidth' => [
|
125 |
+
'type' => 'number',
|
126 |
+
'default' => 240
|
127 |
+
],
|
128 |
+
'title' => [
|
129 |
+
'type' => 'string',
|
130 |
+
'default' => ''
|
131 |
+
],
|
132 |
+
/*
|
133 |
+
'showNav' => [
|
134 |
+
'type' => 'boolean',
|
135 |
+
'default' => true
|
136 |
+
],
|
137 |
+
*/
|
138 |
+
'slides' => [
|
139 |
+
'type' => 'number',
|
140 |
+
'default' => 4
|
141 |
+
],
|
142 |
+
'slidesSmall' => [
|
143 |
+
'type' => 'number',
|
144 |
+
'default' => 3
|
145 |
+
],
|
146 |
+
'slidesExtraSmall' => [
|
147 |
+
'type' => 'number',
|
148 |
+
'default' => 2
|
149 |
+
],
|
150 |
+
],
|
151 |
+
'render_callback' => function ( $attributes ) {
|
152 |
+
|
153 |
+
// we use a view file from Shortcodes, so prepare atts regarding used params
|
154 |
+
$view_atts = [
|
155 |
+
'posts' => $attributes['numberOfPosts'],
|
156 |
+
'cat' => $attributes['category'],
|
157 |
+
'style' => $attributes['style'],
|
158 |
+
'show_thumbs' => $attributes['displayThumb'],
|
159 |
+
'thumb_width' => $attributes['thumbWidth'],
|
160 |
+
'thumb_height' => $attributes['thumbHeight'],
|
161 |
+
'thumb_radius' => $attributes['thumbBorderRadius'],
|
162 |
+
'show_date' => $attributes['displayDate'],
|
163 |
+
'show_header' => $attributes['displayHeader'],
|
164 |
+
'show_excerpt' => $attributes['displayExcerpt'],
|
165 |
+
'excerpt_len' => $attributes['postExcerptLength'],
|
166 |
+
'show_metadata' => $attributes['displayMetaData'],
|
167 |
+
'title' => $attributes['title'],
|
168 |
+
'slides' => $attributes['slides'],
|
169 |
+
'slides_small' => $attributes['slidesSmall'],
|
170 |
+
'slides_extra_small' => $attributes['slidesExtraSmall'],
|
171 |
+
];
|
172 |
+
|
173 |
+
$q_array = [
|
174 |
+
'post_type' => 'post',
|
175 |
+
'post_status' => 'publish',
|
176 |
+
'posts_per_page' => absint( $attributes['numberOfPosts'] ),
|
177 |
+
'ignore_sticky_posts' => true
|
178 |
+
];
|
179 |
+
|
180 |
+
if ( $view_atts['cat'] <> '' ) {
|
181 |
+
$cats_array = array_filter( explode( ',', $view_atts['cat'] ) );
|
182 |
+
$q_array['tax_query'] = [
|
183 |
+
[
|
184 |
+
'taxonomy' => 'category',
|
185 |
+
'field' => 'term_id',
|
186 |
+
'terms' => $cats_array
|
187 |
+
]
|
188 |
+
];
|
189 |
+
}
|
190 |
+
|
191 |
+
$posts = new WP_Query( $q_array );
|
192 |
+
|
193 |
+
return apply_filters( 'fruitful_posts_slider_shortcode', FF_SHORTCODES()->view->load(
|
194 |
+
FF_SHORTCODES()->shortcodes_dir . '/' . 'fruitful_recent_posts_slider/view', [
|
195 |
+
'atts' => $view_atts,
|
196 |
+
'posts_query' => $posts
|
197 |
+
], false, true ) );
|
198 |
+
}
|
199 |
+
] );
|
200 |
+
|
201 |
+
} );
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_sep/block/block.build.js
ADDED
@@ -0,0 +1,273 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/******/ (function(modules) { // webpackBootstrap
|
2 |
+
/******/ // The module cache
|
3 |
+
/******/ var installedModules = {};
|
4 |
+
/******/
|
5 |
+
/******/ // The require function
|
6 |
+
/******/ function __webpack_require__(moduleId) {
|
7 |
+
/******/
|
8 |
+
/******/ // Check if module is in cache
|
9 |
+
/******/ if(installedModules[moduleId]) {
|
10 |
+
/******/ return installedModules[moduleId].exports;
|
11 |
+
/******/ }
|
12 |
+
/******/ // Create a new module (and put it into the cache)
|
13 |
+
/******/ var module = installedModules[moduleId] = {
|
14 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
17 |
+
/******/ };
|
18 |
+
/******/
|
19 |
+
/******/ // Execute the module function
|
20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
+
/******/
|
22 |
+
/******/ // Flag the module as loaded
|
23 |
+
/******/ module.l = true;
|
24 |
+
/******/
|
25 |
+
/******/ // Return the exports of the module
|
26 |
+
/******/ return module.exports;
|
27 |
+
/******/ }
|
28 |
+
/******/
|
29 |
+
/******/
|
30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
31 |
+
/******/ __webpack_require__.m = modules;
|
32 |
+
/******/
|
33 |
+
/******/ // expose the module cache
|
34 |
+
/******/ __webpack_require__.c = installedModules;
|
35 |
+
/******/
|
36 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
40 |
+
/******/ }
|
41 |
+
/******/ };
|
42 |
+
/******/
|
43 |
+
/******/ // define __esModule on exports
|
44 |
+
/******/ __webpack_require__.r = function(exports) {
|
45 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
46 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
47 |
+
/******/ }
|
48 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
49 |
+
/******/ };
|
50 |
+
/******/
|
51 |
+
/******/ // create a fake namespace object
|
52 |
+
/******/ // mode & 1: value is a module id, require it
|
53 |
+
/******/ // mode & 2: merge all properties of value into the ns
|
54 |
+
/******/ // mode & 4: return value when already ns object
|
55 |
+
/******/ // mode & 8|1: behave like require
|
56 |
+
/******/ __webpack_require__.t = function(value, mode) {
|
57 |
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
58 |
+
/******/ if(mode & 8) return value;
|
59 |
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
60 |
+
/******/ var ns = Object.create(null);
|
61 |
+
/******/ __webpack_require__.r(ns);
|
62 |
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
63 |
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
64 |
+
/******/ return ns;
|
65 |
+
/******/ };
|
66 |
+
/******/
|
67 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
68 |
+
/******/ __webpack_require__.n = function(module) {
|
69 |
+
/******/ var getter = module && module.__esModule ?
|
70 |
+
/******/ function getDefault() { return module['default']; } :
|
71 |
+
/******/ function getModuleExports() { return module; };
|
72 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
73 |
+
/******/ return getter;
|
74 |
+
/******/ };
|
75 |
+
/******/
|
76 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
77 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
78 |
+
/******/
|
79 |
+
/******/ // __webpack_public_path__
|
80 |
+
/******/ __webpack_require__.p = "";
|
81 |
+
/******/
|
82 |
+
/******/
|
83 |
+
/******/ // Load entry module and return exports
|
84 |
+
/******/ return __webpack_require__(__webpack_require__.s = 6);
|
85 |
+
/******/ })
|
86 |
+
/************************************************************************/
|
87 |
+
/******/ ({
|
88 |
+
|
89 |
+
/***/ "./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_sep/block/block.js":
|
90 |
+
/*!*************************************************************************************!*\
|
91 |
+
!*** ./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_sep/block/block.js ***!
|
92 |
+
\*************************************************************************************/
|
93 |
+
/*! no static exports found */
|
94 |
+
/***/ (function(module, exports) {
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Internationalization function, can be used like we do that in WordPress, e.g.:
|
98 |
+
* __( 'My text', 'textdomain')
|
99 |
+
*/
|
100 |
+
var _wp$i18n = wp.i18n,
|
101 |
+
__ = _wp$i18n.__,
|
102 |
+
_x = _wp$i18n._x,
|
103 |
+
_n = _wp$i18n._n,
|
104 |
+
_nx = _wp$i18n._nx;
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Import Gutenberg Components to use
|
108 |
+
*/
|
109 |
+
|
110 |
+
var _wp$editor = wp.editor,
|
111 |
+
InspectorControls = _wp$editor.InspectorControls,
|
112 |
+
BlockControls = _wp$editor.BlockControls,
|
113 |
+
PanelColorSettings = _wp$editor.PanelColorSettings,
|
114 |
+
ColorPalette = _wp$editor.ColorPalette;
|
115 |
+
var _wp$components = wp.components,
|
116 |
+
PanelBody = _wp$components.PanelBody,
|
117 |
+
RangeControl = _wp$components.RangeControl;
|
118 |
+
var registerBlockType = wp.blocks.registerBlockType;
|
119 |
+
|
120 |
+
|
121 |
+
registerBlockType('fruitful-blocks/fruitful-sep', {
|
122 |
+
title: __('Fruitful Separator', 'ff-shortcodes'),
|
123 |
+
description: __('Customizable Separator', 'ff-shortcodes'),
|
124 |
+
icon: wp.element.createElement(
|
125 |
+
'svg',
|
126 |
+
{ viewBox: '0 0 32 32', version: '1.1' },
|
127 |
+
wp.element.createElement(
|
128 |
+
'defs',
|
129 |
+
null,
|
130 |
+
wp.element.createElement('circle', { cx: '2.5', cy: '16.5', r: '2.5' }),
|
131 |
+
wp.element.createElement('circle', { cx: '29.5', cy: '16.5', r: '2.5' })
|
132 |
+
),
|
133 |
+
wp.element.createElement(
|
134 |
+
'g',
|
135 |
+
{ stroke: 'none', 'stroke-width': '1', fill: 'none', 'fill-rule': 'evenodd' },
|
136 |
+
wp.element.createElement(
|
137 |
+
'g',
|
138 |
+
null,
|
139 |
+
wp.element.createElement('use', { fill: '#FFFFFF', 'fill-rule': 'evenodd' }),
|
140 |
+
wp.element.createElement('circle', { stroke: '#4A4A4A', 'stroke-width': '1', cx: '2.5', cy: '16.5', r: '2' })
|
141 |
+
),
|
142 |
+
wp.element.createElement(
|
143 |
+
'g',
|
144 |
+
null,
|
145 |
+
wp.element.createElement('use', { fill: '#FFFFFF', 'fill-rule': 'evenodd' }),
|
146 |
+
wp.element.createElement('circle', { stroke: '#4A4A4A', 'stroke-width': '1', cx: '29.5', cy: '16.5', r: '2' })
|
147 |
+
),
|
148 |
+
wp.element.createElement('rect', { fill: '#4A4A4A', x: '4', y: '16', width: '24', height: '1' })
|
149 |
+
)
|
150 |
+
),
|
151 |
+
category: 'fruitful-blocks',
|
152 |
+
|
153 |
+
supports: {
|
154 |
+
// add a possibility to change block ID
|
155 |
+
anchor: false,
|
156 |
+
// Add the support for block's alignment (left, center, right, wide, full).
|
157 |
+
align: false,
|
158 |
+
// add a possibility to change block class name
|
159 |
+
customClassName: true,
|
160 |
+
// By default, Gutenberg will allow a block’s markup to be edited individually.
|
161 |
+
html: false,
|
162 |
+
// set to false to use this block just one per post / page
|
163 |
+
multiple: true
|
164 |
+
},
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Declare changeable block attributes
|
168 |
+
*/
|
169 |
+
attributes: {
|
170 |
+
height: {
|
171 |
+
type: 'number',
|
172 |
+
default: 10
|
173 |
+
},
|
174 |
+
color: {
|
175 |
+
type: 'string',
|
176 |
+
default: '#e0e0e0'
|
177 |
+
}
|
178 |
+
},
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Following function called when you edit your block
|
182 |
+
* through Gutenberg Editor
|
183 |
+
*/
|
184 |
+
edit: function edit(props) {
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Properties & attributes
|
188 |
+
*/
|
189 |
+
var _props$attributes = props.attributes,
|
190 |
+
height = _props$attributes.height,
|
191 |
+
color = _props$attributes.color,
|
192 |
+
setAttributes = props.setAttributes,
|
193 |
+
className = props.className;
|
194 |
+
|
195 |
+
|
196 |
+
return [
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Inspector controls items will be rendered in sidebar when you click on component
|
200 |
+
*/
|
201 |
+
wp.element.createElement(
|
202 |
+
InspectorControls,
|
203 |
+
null,
|
204 |
+
wp.element.createElement(
|
205 |
+
PanelBody,
|
206 |
+
{ title: __('Attributes', 'ff-shortcodes'), initialOpen: true },
|
207 |
+
wp.element.createElement(PanelColorSettings, {
|
208 |
+
title: __('Color', 'ff-shortcodes'),
|
209 |
+
initialOpen: false,
|
210 |
+
colorSettings: [{
|
211 |
+
value: color,
|
212 |
+
onChange: function onChange(colorValue) {
|
213 |
+
return setAttributes({ color: colorValue });
|
214 |
+
},
|
215 |
+
label: __('Text color', 'ff-shortcodes')
|
216 |
+
}]
|
217 |
+
}),
|
218 |
+
wp.element.createElement(RangeControl, {
|
219 |
+
label: __('Height', 'ff-shortcodes'),
|
220 |
+
value: height,
|
221 |
+
onChange: function onChange(size) {
|
222 |
+
return setAttributes({ height: size });
|
223 |
+
},
|
224 |
+
min: 0,
|
225 |
+
max: 500,
|
226 |
+
beforeIcon: 'editor-textcolor',
|
227 |
+
allowReset: true
|
228 |
+
})
|
229 |
+
)
|
230 |
+
),
|
231 |
+
|
232 |
+
/**
|
233 |
+
* This element will be rendered directly in content editor
|
234 |
+
*/
|
235 |
+
wp.element.createElement('div', {
|
236 |
+
className: className + ' ff fruitful_sep',
|
237 |
+
style: { backgroundColor: color, height: height }
|
238 |
+
})];
|
239 |
+
},
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Following function saves block data into post content
|
243 |
+
*/
|
244 |
+
save: function save(props) {
|
245 |
+
var _props$attributes2 = props.attributes,
|
246 |
+
height = _props$attributes2.height,
|
247 |
+
color = _props$attributes2.color,
|
248 |
+
className = _props$attributes2.className;
|
249 |
+
|
250 |
+
|
251 |
+
return wp.element.createElement('div', {
|
252 |
+
className: className + ' ff fruitful_sep',
|
253 |
+
style: { backgroundColor: color, height: height }
|
254 |
+
});
|
255 |
+
}
|
256 |
+
});
|
257 |
+
|
258 |
+
/***/ }),
|
259 |
+
|
260 |
+
/***/ 6:
|
261 |
+
/*!*******************************************************************************************!*\
|
262 |
+
!*** multi ./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_sep/block/block.js ***!
|
263 |
+
\*******************************************************************************************/
|
264 |
+
/*! no static exports found */
|
265 |
+
/***/ (function(module, exports, __webpack_require__) {
|
266 |
+
|
267 |
+
module.exports = __webpack_require__(/*! F:/OSPanel/domains/_ff_/local/wp499.loc/wp-content/plugins/fruitful-shortcodes/fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_sep/block/block.js */"./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_sep/block/block.js");
|
268 |
+
|
269 |
+
|
270 |
+
/***/ })
|
271 |
+
|
272 |
+
/******/ });
|
273 |
+
//# sourceMappingURL=block.build.js.map
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_sep/block/block.build.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_sep/block/block.js"],"names":["wp","i18n","__","_x","_n","_nx","editor","InspectorControls","BlockControls","PanelColorSettings","ColorPalette","components","PanelBody","RangeControl","registerBlockType","blocks","title","description","icon","category","supports","anchor","align","customClassName","html","multiple","attributes","height","type","default","color","edit","props","setAttributes","className","value","onChange","colorValue","label","size","backgroundColor","save"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;AClFA;;;;eAI4BA,GAAGC,I;IAAvBC,E,YAAAA,E;IAAIC,E,YAAAA,E;IAAIC,E,YAAAA,E;IAAIC,G,YAAAA,G;;AAEpB;;;;iBAQIL,GAAGM,M;IAJNC,iB,cAAAA,iB;IACAC,a,cAAAA,a;IACAC,kB,cAAAA,kB;IACAC,Y,cAAAA,Y;qBAMGV,GAAGW,U;IAFNC,S,kBAAAA,S;IACAC,Y,kBAAAA,Y;IAKAC,iB,GACGd,GAAGe,M,CADND,iB;;;AAGDA,kBAAkB,8BAAlB,EAAkD;AACjDE,QAAOd,GAAG,oBAAH,EAAyB,eAA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AEC,UAAQ,EAAEM,iBAAiBV,KAAnB,EAA0BH,QAAQA,MAAlC;AAFT,IADD;AAMA;AA7HgD,CAAlD,E","file":"fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_sep/block/block.build.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","/**\n * Internationalization function, can be used like we do that in WordPress, e.g.:\n * __( 'My text', 'textdomain')\n */\nconst { __, _x, _n, _nx } = wp.i18n;\n\n/**\n * Import Gutenberg Components to use\n */\nconst {\n\tInspectorControls,\n\tBlockControls,\n\tPanelColorSettings,\n\tColorPalette\n} = wp.editor;\n\nconst {\n\tPanelBody,\n\tRangeControl\n} = wp.components;\n\n\nconst {\n\tregisterBlockType\n} = wp.blocks;\n\nregisterBlockType('fruitful-blocks/fruitful-sep', {\n\ttitle: __('Fruitful Separator', 'ff-shortcodes'),\n\tdescription: __('Customizable Separator', 'ff-shortcodes'),\n\ticon: <svg viewBox=\"0 0 32 32\" version=\"1.1\">\n\t\t<defs>\n\t\t\t\t<circle cx=\"2.5\" cy=\"16.5\" r=\"2.5\"></circle>\n\t\t\t\t<circle cx=\"29.5\" cy=\"16.5\" r=\"2.5\"></circle>\n\t\t</defs>\n\t\t<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n\t\t\t<g>\n\t\t\t\t<use fill=\"#FFFFFF\" fill-rule=\"evenodd\"></use>\n\t\t\t\t<circle stroke=\"#4A4A4A\" stroke-width=\"1\" cx=\"2.5\" cy=\"16.5\" r=\"2\"></circle>\n\t\t\t</g>\n\t\t\t<g>\n\t\t\t\t<use fill=\"#FFFFFF\" fill-rule=\"evenodd\"></use>\n\t\t\t\t<circle stroke=\"#4A4A4A\" stroke-width=\"1\" cx=\"29.5\" cy=\"16.5\" r=\"2\"></circle>\n\t\t\t</g>\n\t\t\t<rect fill=\"#4A4A4A\" x=\"4\" y=\"16\" width=\"24\" height=\"1\"></rect>\n\t\t</g>\n\t</svg>,\n\tcategory: 'fruitful-blocks',\n\n\tsupports: {\n\t\t// add a possibility to change block ID\n\t\tanchor: false,\n\t\t// Add the support for block's alignment (left, center, right, wide, full).\n\t\talign: false,\n\t\t// add a possibility to change block class name\n\t\tcustomClassName: true,\n\t\t// By default, Gutenberg will allow a block’s markup to be edited individually.\n\t\thtml: false,\n\t\t// set to false to use this block just one per post / page\n\t\tmultiple: true,\n\t},\n\n\t/**\n\t * Declare changeable block attributes\n\t */\n\tattributes: {\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 10,\n\t\t},\n\t\tcolor: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '#e0e0e0'\n\t\t},\n\t},\n\n\t/**\n\t * Following function called when you edit your block\n\t * through Gutenberg Editor\n\t */\n\tedit: (props) => {\n\n\t\t/**\n\t\t * Properties & attributes\n\t\t */\n\t\tconst {\n\t\t\tattributes: {\n\t\t\t\theight,\n\t\t\t\tcolor\n\t\t\t},\n\t\t\tsetAttributes,\n\t\t\tclassName\n\t\t} = props;\n\n\t\treturn ([\n\n\t\t\t/**\n\t\t\t * Inspector controls items will be rendered in sidebar when you click on component\n\t\t\t */\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={__('Attributes', 'ff-shortcodes')} initialOpen={true}>\n\t\t\t\t\t<PanelColorSettings\n\t\t\t\t\t\ttitle={ __( 'Color', 'ff-shortcodes' ) }\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\tcolorSettings={[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: color,\n\t\t\t\t\t\t\t\tonChange: (colorValue) => setAttributes({color: colorValue}),\n\t\t\t\t\t\t\t\tlabel: __('Text color', 'ff-shortcodes')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]}\n\t\t\t\t\t>\n\t\t\t\t\t</PanelColorSettings>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Height', 'ff-shortcodes' ) }\n\t\t\t\t\t\tvalue={ height }\n\t\t\t\t\t\tonChange={ ( size ) => setAttributes( { height: size } ) }\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tmax={ 500 }\n\t\t\t\t\t\tbeforeIcon=\"editor-textcolor\"\n\t\t\t\t\t\tallowReset\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>,\n\n\t\t\t/**\n\t\t\t * This element will be rendered directly in content editor\n\t\t\t */\n\t\t\t<div\n\t\t\t\tclassName={ className + ' ff fruitful_sep' } \n\t\t\t\tstyle={ { backgroundColor: color, height: height } } \n\t\t\t></div>\n\t\t]);\n\t},\n\n\t/**\n\t * Following function saves block data into post content\n\t */\n\tsave: (props) => {\n\n\t\tconst {\n\t\t\theight,\n\t\t\tcolor,\n\t\t\tclassName\n\t\t} = props.attributes;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={ className + ' ff fruitful_sep' } \n\t\t\t\tstyle={ { backgroundColor: color, height: height } } \n\t\t\t></div>\n\t\t);\n\t},\n});\n"],"sourceRoot":""}
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_sep/block/block.js
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Internationalization function, can be used like we do that in WordPress, e.g.:
|
3 |
+
* __( 'My text', 'textdomain')
|
4 |
+
*/
|
5 |
+
const { __, _x, _n, _nx } = wp.i18n;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Import Gutenberg Components to use
|
9 |
+
*/
|
10 |
+
const {
|
11 |
+
InspectorControls,
|
12 |
+
BlockControls,
|
13 |
+
PanelColorSettings,
|
14 |
+
ColorPalette
|
15 |
+
} = wp.editor;
|
16 |
+
|
17 |
+
const {
|
18 |
+
PanelBody,
|
19 |
+
RangeControl
|
20 |
+
} = wp.components;
|
21 |
+
|
22 |
+
|
23 |
+
const {
|
24 |
+
registerBlockType
|
25 |
+
} = wp.blocks;
|
26 |
+
|
27 |
+
registerBlockType('fruitful-blocks/fruitful-sep', {
|
28 |
+
title: __('Fruitful Separator', 'ff-shortcodes'),
|
29 |
+
description: __('Customizable Separator', 'ff-shortcodes'),
|
30 |
+
icon: <svg viewBox="0 0 32 32" version="1.1">
|
31 |
+
<defs>
|
32 |
+
<circle cx="2.5" cy="16.5" r="2.5"></circle>
|
33 |
+
<circle cx="29.5" cy="16.5" r="2.5"></circle>
|
34 |
+
</defs>
|
35 |
+
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
36 |
+
<g>
|
37 |
+
<use fill="#FFFFFF" fill-rule="evenodd"></use>
|
38 |
+
<circle stroke="#4A4A4A" stroke-width="1" cx="2.5" cy="16.5" r="2"></circle>
|
39 |
+
</g>
|
40 |
+
<g>
|
41 |
+
<use fill="#FFFFFF" fill-rule="evenodd"></use>
|
42 |
+
<circle stroke="#4A4A4A" stroke-width="1" cx="29.5" cy="16.5" r="2"></circle>
|
43 |
+
</g>
|
44 |
+
<rect fill="#4A4A4A" x="4" y="16" width="24" height="1"></rect>
|
45 |
+
</g>
|
46 |
+
</svg>,
|
47 |
+
category: 'fruitful-blocks',
|
48 |
+
|
49 |
+
supports: {
|
50 |
+
// add a possibility to change block ID
|
51 |
+
anchor: false,
|
52 |
+
// Add the support for block's alignment (left, center, right, wide, full).
|
53 |
+
align: false,
|
54 |
+
// add a possibility to change block class name
|
55 |
+
customClassName: true,
|
56 |
+
// By default, Gutenberg will allow a block’s markup to be edited individually.
|
57 |
+
html: false,
|
58 |
+
// set to false to use this block just one per post / page
|
59 |
+
multiple: true,
|
60 |
+
},
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Declare changeable block attributes
|
64 |
+
*/
|
65 |
+
attributes: {
|
66 |
+
height: {
|
67 |
+
type: 'number',
|
68 |
+
default: 10,
|
69 |
+
},
|
70 |
+
color: {
|
71 |
+
type: 'string',
|
72 |
+
default: '#e0e0e0'
|
73 |
+
},
|
74 |
+
},
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Following function called when you edit your block
|
78 |
+
* through Gutenberg Editor
|
79 |
+
*/
|
80 |
+
edit: (props) => {
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Properties & attributes
|
84 |
+
*/
|
85 |
+
const {
|
86 |
+
attributes: {
|
87 |
+
height,
|
88 |
+
color
|
89 |
+
},
|
90 |
+
setAttributes,
|
91 |
+
className
|
92 |
+
} = props;
|
93 |
+
|
94 |
+
return ([
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Inspector controls items will be rendered in sidebar when you click on component
|
98 |
+
*/
|
99 |
+
<InspectorControls>
|
100 |
+
<PanelBody title={__('Attributes', 'ff-shortcodes')} initialOpen={true}>
|
101 |
+
<PanelColorSettings
|
102 |
+
title={ __( 'Color', 'ff-shortcodes' ) }
|
103 |
+
initialOpen={ false }
|
104 |
+
colorSettings={[
|
105 |
+
{
|
106 |
+
value: color,
|
107 |
+
onChange: (colorValue) => setAttributes({color: colorValue}),
|
108 |
+
label: __('Text color', 'ff-shortcodes')
|
109 |
+
}
|
110 |
+
]}
|
111 |
+
>
|
112 |
+
</PanelColorSettings>
|
113 |
+
<RangeControl
|
114 |
+
label={ __( 'Height', 'ff-shortcodes' ) }
|
115 |
+
value={ height }
|
116 |
+
onChange={ ( size ) => setAttributes( { height: size } ) }
|
117 |
+
min={ 0 }
|
118 |
+
max={ 500 }
|
119 |
+
beforeIcon="editor-textcolor"
|
120 |
+
allowReset
|
121 |
+
/>
|
122 |
+
</PanelBody>
|
123 |
+
</InspectorControls>,
|
124 |
+
|
125 |
+
/**
|
126 |
+
* This element will be rendered directly in content editor
|
127 |
+
*/
|
128 |
+
<div
|
129 |
+
className={ className + ' ff fruitful_sep' }
|
130 |
+
style={ { backgroundColor: color, height: height } }
|
131 |
+
></div>
|
132 |
+
]);
|
133 |
+
},
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Following function saves block data into post content
|
137 |
+
*/
|
138 |
+
save: (props) => {
|
139 |
+
|
140 |
+
const {
|
141 |
+
height,
|
142 |
+
color,
|
143 |
+
className
|
144 |
+
} = props.attributes;
|
145 |
+
|
146 |
+
return (
|
147 |
+
<div
|
148 |
+
className={ className + ' ff fruitful_sep' }
|
149 |
+
style={ { backgroundColor: color, height: height } }
|
150 |
+
></div>
|
151 |
+
);
|
152 |
+
},
|
153 |
+
});
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_sep/init.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// enqueue editor styles
|
4 |
+
add_action( 'enqueue_block_editor_assets', function () {
|
5 |
+
|
6 |
+
$block_name = 'fruitful_sep';
|
7 |
+
$block_url = FF_SHORTCODES()->plugin_url . FF_SHORTCODES()->gutenberg_blocks_dir . '/' . $block_name . '/';
|
8 |
+
$assets_url = FF_SHORTCODES()->plugin_url . FF_SHORTCODES()->assets_dir . '/' . $block_name . '/';
|
9 |
+
|
10 |
+
// Block Scripts
|
11 |
+
wp_enqueue_script(
|
12 |
+
'fruitful-blocks-sep', // Handle
|
13 |
+
$block_url . 'block/block.build.js',
|
14 |
+
[ 'wp-editor', 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components' ],
|
15 |
+
FF_SHORTCODES()->cache_time,
|
16 |
+
true
|
17 |
+
);
|
18 |
+
|
19 |
+
// Set translations ( since WP 5.0 )
|
20 |
+
if ( function_exists( 'wp_set_script_translations' ) ) {
|
21 |
+
wp_set_script_translations( 'fruitful-blocks-sep', 'ff-shortcodes' );
|
22 |
+
}
|
23 |
+
|
24 |
+
// pre WP 5.0 with gutenberg plugin
|
25 |
+
if ( function_exists( 'gutenberg_get_jed_locale_data' ) ) {
|
26 |
+
wp_add_inline_script(
|
27 |
+
'fruitful-blocks-sep',
|
28 |
+
sprintf(
|
29 |
+
'var fruitful_blocks_sep = { localeData: %s };',
|
30 |
+
json_encode( gutenberg_get_jed_locale_data( 'ff-shortcodes' ) )
|
31 |
+
),
|
32 |
+
'before'
|
33 |
+
);
|
34 |
+
}
|
35 |
+
|
36 |
+
|
37 |
+
} );
|
38 |
+
|
39 |
+
// register the block
|
40 |
+
add_action( 'admin_init', function () {
|
41 |
+
|
42 |
+
register_block_type( 'fruitful-blocks/fruitful-sep', [
|
43 |
+
'script' => 'fruitful-blocks-sep',
|
44 |
+
] );
|
45 |
+
|
46 |
+
} );
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_tabs/block/block.build.js
ADDED
@@ -0,0 +1,505 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/******/ (function(modules) { // webpackBootstrap
|
2 |
+
/******/ // The module cache
|
3 |
+
/******/ var installedModules = {};
|
4 |
+
/******/
|
5 |
+
/******/ // The require function
|
6 |
+
/******/ function __webpack_require__(moduleId) {
|
7 |
+
/******/
|
8 |
+
/******/ // Check if module is in cache
|
9 |
+
/******/ if(installedModules[moduleId]) {
|
10 |
+
/******/ return installedModules[moduleId].exports;
|
11 |
+
/******/ }
|
12 |
+
/******/ // Create a new module (and put it into the cache)
|
13 |
+
/******/ var module = installedModules[moduleId] = {
|
14 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
17 |
+
/******/ };
|
18 |
+
/******/
|
19 |
+
/******/ // Execute the module function
|
20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
+
/******/
|
22 |
+
/******/ // Flag the module as loaded
|
23 |
+
/******/ module.l = true;
|
24 |
+
/******/
|
25 |
+
/******/ // Return the exports of the module
|
26 |
+
/******/ return module.exports;
|
27 |
+
/******/ }
|
28 |
+
/******/
|
29 |
+
/******/
|
30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
31 |
+
/******/ __webpack_require__.m = modules;
|
32 |
+
/******/
|
33 |
+
/******/ // expose the module cache
|
34 |
+
/******/ __webpack_require__.c = installedModules;
|
35 |
+
/******/
|
36 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
40 |
+
/******/ }
|
41 |
+
/******/ };
|
42 |
+
/******/
|
43 |
+
/******/ // define __esModule on exports
|
44 |
+
/******/ __webpack_require__.r = function(exports) {
|
45 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
46 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
47 |
+
/******/ }
|
48 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
49 |
+
/******/ };
|
50 |
+
/******/
|
51 |
+
/******/ // create a fake namespace object
|
52 |
+
/******/ // mode & 1: value is a module id, require it
|
53 |
+
/******/ // mode & 2: merge all properties of value into the ns
|
54 |
+
/******/ // mode & 4: return value when already ns object
|
55 |
+
/******/ // mode & 8|1: behave like require
|
56 |
+
/******/ __webpack_require__.t = function(value, mode) {
|
57 |
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
58 |
+
/******/ if(mode & 8) return value;
|
59 |
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
60 |
+
/******/ var ns = Object.create(null);
|
61 |
+
/******/ __webpack_require__.r(ns);
|
62 |
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
63 |
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
64 |
+
/******/ return ns;
|
65 |
+
/******/ };
|
66 |
+
/******/
|
67 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
68 |
+
/******/ __webpack_require__.n = function(module) {
|
69 |
+
/******/ var getter = module && module.__esModule ?
|
70 |
+
/******/ function getDefault() { return module['default']; } :
|
71 |
+
/******/ function getModuleExports() { return module; };
|
72 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
73 |
+
/******/ return getter;
|
74 |
+
/******/ };
|
75 |
+
/******/
|
76 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
77 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
78 |
+
/******/
|
79 |
+
/******/ // __webpack_public_path__
|
80 |
+
/******/ __webpack_require__.p = "";
|
81 |
+
/******/
|
82 |
+
/******/
|
83 |
+
/******/ // Load entry module and return exports
|
84 |
+
/******/ return __webpack_require__(__webpack_require__.s = 7);
|
85 |
+
/******/ })
|
86 |
+
/************************************************************************/
|
87 |
+
/******/ ({
|
88 |
+
|
89 |
+
/***/ "./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_tabs/block/block.js":
|
90 |
+
/*!**************************************************************************************!*\
|
91 |
+
!*** ./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_tabs/block/block.js ***!
|
92 |
+
\**************************************************************************************/
|
93 |
+
/*! no static exports found */
|
94 |
+
/***/ (function(module, exports) {
|
95 |
+
|
96 |
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
97 |
+
|
98 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
99 |
+
|
100 |
+
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
101 |
+
|
102 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
103 |
+
|
104 |
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
105 |
+
|
106 |
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Internationalization function, can be used like we do that in WordPress, e.g.:
|
110 |
+
* __( 'My text', 'textdomain')
|
111 |
+
*/
|
112 |
+
var _wp$i18n = wp.i18n,
|
113 |
+
__ = _wp$i18n.__,
|
114 |
+
_x = _wp$i18n._x,
|
115 |
+
_n = _wp$i18n._n,
|
116 |
+
_nx = _wp$i18n._nx;
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Import Gutenberg Components to use
|
120 |
+
*/
|
121 |
+
|
122 |
+
var _wp$editor = wp.editor,
|
123 |
+
RichText = _wp$editor.RichText,
|
124 |
+
InspectorControls = _wp$editor.InspectorControls,
|
125 |
+
BlockControls = _wp$editor.BlockControls;
|
126 |
+
var _wp$components = wp.components,
|
127 |
+
PanelBody = _wp$components.PanelBody,
|
128 |
+
SelectControl = _wp$components.SelectControl,
|
129 |
+
TextControl = _wp$components.TextControl,
|
130 |
+
Dashicon = _wp$components.Dashicon,
|
131 |
+
Tooltip = _wp$components.Tooltip;
|
132 |
+
var registerBlockType = wp.blocks.registerBlockType;
|
133 |
+
var _wp$element = wp.element,
|
134 |
+
Component = _wp$element.Component,
|
135 |
+
Fragment = _wp$element.Fragment;
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Create new react component
|
139 |
+
*/
|
140 |
+
|
141 |
+
var fruitfulBlocksTabs = function (_Component) {
|
142 |
+
_inherits(fruitfulBlocksTabs, _Component);
|
143 |
+
|
144 |
+
function fruitfulBlocksTabs() {
|
145 |
+
_classCallCheck(this, fruitfulBlocksTabs);
|
146 |
+
|
147 |
+
return _possibleConstructorReturn(this, (fruitfulBlocksTabs.__proto__ || Object.getPrototypeOf(fruitfulBlocksTabs)).apply(this, arguments));
|
148 |
+
}
|
149 |
+
|
150 |
+
_createClass(fruitfulBlocksTabs, [{
|
151 |
+
key: 'componentDidMount',
|
152 |
+
value: function componentDidMount() {
|
153 |
+
this.initTabs();
|
154 |
+
}
|
155 |
+
}, {
|
156 |
+
key: 'componentDidUpdate',
|
157 |
+
value: function componentDidUpdate(prevProps) {
|
158 |
+
var prevItems = prevProps.attributes.tabItems;
|
159 |
+
var tabItems = this.props.attributes.tabItems;
|
160 |
+
|
161 |
+
|
162 |
+
if (tabItems.length === 0) {
|
163 |
+
this.props.setAttributes({
|
164 |
+
tabItems: [{
|
165 |
+
title: __('Tab 1', 'ff-shortcodes'),
|
166 |
+
text: __('At least one tab must remaining, to remove the whole block use "Remove Block" button from right menu.', 'ff-shortcodes')
|
167 |
+
}]
|
168 |
+
});
|
169 |
+
}
|
170 |
+
|
171 |
+
if (prevItems !== tabItems) {
|
172 |
+
this.refreshTabs();
|
173 |
+
} else {
|
174 |
+
this.refreshTabs(true);
|
175 |
+
}
|
176 |
+
}
|
177 |
+
}, {
|
178 |
+
key: 'initTabs',
|
179 |
+
value: function initTabs() {
|
180 |
+
|
181 |
+
if (typeof jQuery !== 'undefined') {
|
182 |
+
|
183 |
+
window.ff_fruitful_tabs_shortcode();
|
184 |
+
window.ff_fruitful_tabs_nav_shortcode();
|
185 |
+
}
|
186 |
+
}
|
187 |
+
}, {
|
188 |
+
key: 'refreshTabs',
|
189 |
+
value: function refreshTabs() {
|
190 |
+
var hard = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
191 |
+
|
192 |
+
|
193 |
+
if (typeof jQuery !== 'undefined') {
|
194 |
+
|
195 |
+
window.ff_fruitful_tabs_nav_shortcode();
|
196 |
+
|
197 |
+
if (hard) {
|
198 |
+
window.ff_fruitful_tabs_refresh();
|
199 |
+
}
|
200 |
+
}
|
201 |
+
}
|
202 |
+
}, {
|
203 |
+
key: 'updateTabsContent',
|
204 |
+
value: function updateTabsContent(value, index) {
|
205 |
+
var _props = this.props,
|
206 |
+
attributes = _props.attributes,
|
207 |
+
setAttributes = _props.setAttributes;
|
208 |
+
var tabItems = attributes.tabItems;
|
209 |
+
|
210 |
+
|
211 |
+
var newItems = tabItems.map(function (item, thisIndex) {
|
212 |
+
if (index === thisIndex) {
|
213 |
+
item = _extends({}, item, value);
|
214 |
+
}
|
215 |
+
return item;
|
216 |
+
});
|
217 |
+
|
218 |
+
setAttributes({ tabItems: newItems });
|
219 |
+
}
|
220 |
+
}, {
|
221 |
+
key: 'render',
|
222 |
+
value: function render() {
|
223 |
+
var _this2 = this;
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Properties & attributes
|
227 |
+
*/
|
228 |
+
var _props2 = this.props,
|
229 |
+
_props2$attributes = _props2.attributes,
|
230 |
+
type = _props2$attributes.type,
|
231 |
+
tabItems = _props2$attributes.tabItems,
|
232 |
+
respBreak = _props2$attributes.respBreak,
|
233 |
+
setAttributes = _props2.setAttributes,
|
234 |
+
focus = _props2.focus,
|
235 |
+
setFocus = _props2.setFocus,
|
236 |
+
className = _props2.className;
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Render component
|
240 |
+
*/
|
241 |
+
|
242 |
+
return wp.element.createElement(
|
243 |
+
Fragment,
|
244 |
+
null,
|
245 |
+
wp.element.createElement(
|
246 |
+
InspectorControls,
|
247 |
+
null,
|
248 |
+
wp.element.createElement(
|
249 |
+
PanelBody,
|
250 |
+
{ title: __('Predefined styles', 'ff-shortcodes'), initialOpen: true },
|
251 |
+
wp.element.createElement(SelectControl, {
|
252 |
+
label: __('Type', 'ff-shortcodes'),
|
253 |
+
value: type,
|
254 |
+
options: [{ label: __('Horizontal', 'ff-shortcodes'), value: 'default' }, { label: __('Vertical', 'ff-shortcodes'), value: 'vertical' }, { label: __('Accordion', 'ff-shortcodes'), value: 'accordion' }],
|
255 |
+
onChange: function onChange(value) {
|
256 |
+
setAttributes({ type: value });
|
257 |
+
}
|
258 |
+
})
|
259 |
+
),
|
260 |
+
wp.element.createElement(
|
261 |
+
PanelBody,
|
262 |
+
{ title: __('Responsive attributes', 'ff-shortcodes'), initialOpen: true },
|
263 |
+
wp.element.createElement(TextControl, {
|
264 |
+
label: __('Responsive break', 'ff-shortcodes'),
|
265 |
+
value: respBreak,
|
266 |
+
onChange: function onChange(value) {
|
267 |
+
return setAttributes({ respBreak: value });
|
268 |
+
}
|
269 |
+
})
|
270 |
+
)
|
271 |
+
),
|
272 |
+
wp.element.createElement(
|
273 |
+
'div',
|
274 |
+
{
|
275 |
+
className: 'fruitful_tabs type-' + type,
|
276 |
+
'data-type': type,
|
277 |
+
'data-break': respBreak
|
278 |
+
},
|
279 |
+
wp.element.createElement(
|
280 |
+
'nav',
|
281 |
+
null,
|
282 |
+
tabItems.map(function (item, index) {
|
283 |
+
return wp.element.createElement(
|
284 |
+
'a',
|
285 |
+
{ href: 'javascript:;' },
|
286 |
+
wp.element.createElement(RichText, {
|
287 |
+
tagName: 'span',
|
288 |
+
value: item.title,
|
289 |
+
focus: focus,
|
290 |
+
onFocus: setFocus,
|
291 |
+
onChange: function onChange(value) {
|
292 |
+
return _this2.updateTabsContent({ title: value || '' }, index);
|
293 |
+
}
|
294 |
+
}),
|
295 |
+
wp.element.createElement(
|
296 |
+
Tooltip,
|
297 |
+
{ text: __('Remove tab', 'ff-shortcodes') },
|
298 |
+
wp.element.createElement(
|
299 |
+
'span',
|
300 |
+
{
|
301 |
+
className: 'ff-tab-control',
|
302 |
+
onClick: function onClick() {
|
303 |
+
return setAttributes({
|
304 |
+
tabItems: tabItems.filter(function (vl, idx) {
|
305 |
+
return idx !== index;
|
306 |
+
})
|
307 |
+
});
|
308 |
+
}
|
309 |
+
},
|
310 |
+
wp.element.createElement(Dashicon, { icon: 'no' })
|
311 |
+
)
|
312 |
+
)
|
313 |
+
);
|
314 |
+
}),
|
315 |
+
wp.element.createElement(
|
316 |
+
Tooltip,
|
317 |
+
{ text: __('Add tab') },
|
318 |
+
wp.element.createElement(
|
319 |
+
'span',
|
320 |
+
{ className: 'ff-tab-control ff-add-tab-control', onClick: function onClick() {
|
321 |
+
return setAttributes({ tabItems: [].concat(_toConsumableArray(tabItems), [{ title: __('New Tab', 'ff-shortcodes'), text: __('Enter your content.', 'ff-shortcodes') }]) });
|
322 |
+
} },
|
323 |
+
wp.element.createElement(Dashicon, { icon: 'plus' })
|
324 |
+
)
|
325 |
+
)
|
326 |
+
),
|
327 |
+
tabItems.map(function (item, index) {
|
328 |
+
return wp.element.createElement(
|
329 |
+
'div',
|
330 |
+
{ key: index, className: index == 0 ? 'fruitful_tabs_tab current active' : 'fruitful_tabs_tab' },
|
331 |
+
wp.element.createElement(
|
332 |
+
'div',
|
333 |
+
{ className: 'ff-inside' },
|
334 |
+
wp.element.createElement(RichText, {
|
335 |
+
tagName: 'h4',
|
336 |
+
className: 'ff-title',
|
337 |
+
value: item.title,
|
338 |
+
focus: focus,
|
339 |
+
onFocus: setFocus,
|
340 |
+
onChange: function onChange(value) {
|
341 |
+
return _this2.updateTabsContent({ title: value || '' }, index);
|
342 |
+
}
|
343 |
+
}),
|
344 |
+
wp.element.createElement(
|
345 |
+
'div',
|
346 |
+
{ className: 'ff-tab-content' },
|
347 |
+
wp.element.createElement(RichText, {
|
348 |
+
tagName: 'div',
|
349 |
+
value: item.text,
|
350 |
+
focus: focus,
|
351 |
+
onFocus: setFocus,
|
352 |
+
onChange: function onChange(value) {
|
353 |
+
return _this2.updateTabsContent({ text: value || '' }, index);
|
354 |
+
}
|
355 |
+
})
|
356 |
+
)
|
357 |
+
)
|
358 |
+
);
|
359 |
+
})
|
360 |
+
)
|
361 |
+
);
|
362 |
+
}
|
363 |
+
}]);
|
364 |
+
|
365 |
+
return fruitfulBlocksTabs;
|
366 |
+
}(Component);
|
367 |
+
|
368 |
+
/**
|
369 |
+
* Register block
|
370 |
+
*/
|
371 |
+
|
372 |
+
|
373 |
+
registerBlockType('fruitful-blocks/fruitful-tabs', {
|
374 |
+
title: __('Fruitful Tabs', 'ff-shortcodes'),
|
375 |
+
description: __('Horizontal / Vertical / Accordion', 'ff-shortcodes'),
|
376 |
+
icon: wp.element.createElement(
|
377 |
+
'svg',
|
378 |
+
{ viewBox: '0 0 32 32', version: '1.1' },
|
379 |
+
wp.element.createElement(
|
380 |
+
'g',
|
381 |
+
{ stroke: 'none', 'stroke-width': '1', fill: 'none', 'fill-rule': 'evenodd' },
|
382 |
+
wp.element.createElement('path', { d: 'M31.5,10.5 L14,10.5 C12.6192881,10.5 11.5,9.38071187 11.5,8 L11.5,4.5 L2,4.5 C1.17157288,4.5 0.5,5.17157288 0.5,6 L0.5,26 C0.5,26.8284271 1.17157288,27.5 2,27.5 L30,27.5 C30.8284271,27.5 31.5,26.8284271 31.5,26 L31.5,10.5 Z', stroke: '#4A4A4A' }),
|
383 |
+
wp.element.createElement('path', { d: 'M11.5,4.5 L11.5,8 C11.5,9.38071187 12.6192881,10.5 14,10.5 L31.5,10.5 L31.5,6 C31.5,5.17157288 30.8284271,4.5 30,4.5 L11.5,4.5 Z', stroke: '#4A4A4A' }),
|
384 |
+
wp.element.createElement('rect', { fill: '#4A4A4A', x: '21', y: '5', width: '1', height: '5' })
|
385 |
+
)
|
386 |
+
),
|
387 |
+
category: 'fruitful-blocks',
|
388 |
+
|
389 |
+
supports: {
|
390 |
+
// add a possibility to change block ID
|
391 |
+
anchor: false,
|
392 |
+
// Add the support for block's alignment (left, center, right, wide, full).
|
393 |
+
align: false,
|
394 |
+
// add a possibility to change block class name
|
395 |
+
customClassName: true,
|
396 |
+
// By default, Gutenberg will allow a block’s markup to be edited individually.
|
397 |
+
html: false,
|
398 |
+
// set to false to use this block just one per post / page
|
399 |
+
multiple: true
|
400 |
+
},
|
401 |
+
|
402 |
+
keywords: [__('tabs', 'ff-shortcodes'), __('accordion', 'ff-shortcodes'), __('tour', 'ff-shortcodes')],
|
403 |
+
|
404 |
+
attributes: {
|
405 |
+
type: {
|
406 |
+
type: 'string',
|
407 |
+
default: 'default'
|
408 |
+
},
|
409 |
+
tabItems: {
|
410 |
+
type: "array",
|
411 |
+
default: [{
|
412 |
+
title: __('Tab 1', 'ff-shortcodes'),
|
413 |
+
text: __('Type here your text inside tab', 'ff-shortcodes')
|
414 |
+
}, {
|
415 |
+
title: __('Tab 2', 'ff-shortcodes'),
|
416 |
+
text: __('Type here your text inside tab', 'ff-shortcodes')
|
417 |
+
}, {
|
418 |
+
title: __('Tab 3', 'ff-shortcodes'),
|
419 |
+
text: __('Type here your text inside tab', 'ff-shortcodes')
|
420 |
+
}]
|
421 |
+
},
|
422 |
+
respBreak: {
|
423 |
+
type: 'number',
|
424 |
+
default: 767
|
425 |
+
}
|
426 |
+
},
|
427 |
+
|
428 |
+
/**
|
429 |
+
* Following function called when you edit your block
|
430 |
+
* through Gutenberg Editor
|
431 |
+
*/
|
432 |
+
edit: fruitfulBlocksTabs,
|
433 |
+
|
434 |
+
/**
|
435 |
+
* Following function saves block data into post content
|
436 |
+
*/
|
437 |
+
save: function save(props) {
|
438 |
+
|
439 |
+
/**
|
440 |
+
* Get saved properties
|
441 |
+
*/
|
442 |
+
var _props$attributes = props.attributes,
|
443 |
+
type = _props$attributes.type,
|
444 |
+
tabItems = _props$attributes.tabItems,
|
445 |
+
respBreak = _props$attributes.respBreak;
|
446 |
+
|
447 |
+
|
448 |
+
return wp.element.createElement(
|
449 |
+
'div',
|
450 |
+
{
|
451 |
+
className: 'fruitful_tabs type-' + type,
|
452 |
+
'data-type': type,
|
453 |
+
'data-break': respBreak
|
454 |
+
},
|
455 |
+
wp.element.createElement(
|
456 |
+
'nav',
|
457 |
+
null,
|
458 |
+
tabItems.map(function (item, index) {
|
459 |
+
return wp.element.createElement(
|
460 |
+
'a',
|
461 |
+
{ href: 'javascript:;' },
|
462 |
+
wp.element.createElement(RichText.Content, { tagName: 'span', value: item.title })
|
463 |
+
);
|
464 |
+
})
|
465 |
+
),
|
466 |
+
tabItems.map(function (item, index) {
|
467 |
+
return wp.element.createElement(
|
468 |
+
'div',
|
469 |
+
{ key: index, className: index == 0 ? 'fruitful_tabs_tab current active' : 'fruitful_tabs_tab' },
|
470 |
+
wp.element.createElement(
|
471 |
+
'div',
|
472 |
+
{ className: 'ff-inside' },
|
473 |
+
wp.element.createElement(
|
474 |
+
'h4',
|
475 |
+
{ className: 'ff-title' },
|
476 |
+
wp.element.createElement(RichText.Content, { tagName: 'span', value: item.title })
|
477 |
+
),
|
478 |
+
wp.element.createElement(
|
479 |
+
'div',
|
480 |
+
{ className: 'ff-tab-content' },
|
481 |
+
wp.element.createElement(RichText.Content, { tagName: 'div', value: item.text })
|
482 |
+
)
|
483 |
+
)
|
484 |
+
);
|
485 |
+
})
|
486 |
+
);
|
487 |
+
}
|
488 |
+
});
|
489 |
+
|
490 |
+
/***/ }),
|
491 |
+
|
492 |
+
/***/ 7:
|
493 |
+
/*!********************************************************************************************!*\
|
494 |
+
!*** multi ./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_tabs/block/block.js ***!
|
495 |
+
\********************************************************************************************/
|
496 |
+
/*! no static exports found */
|
497 |
+
/***/ (function(module, exports, __webpack_require__) {
|
498 |
+
|
499 |
+
module.exports = __webpack_require__(/*! F:/OSPanel/domains/_ff_/local/wp499.loc/wp-content/plugins/fruitful-shortcodes/fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_tabs/block/block.js */"./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_tabs/block/block.js");
|
500 |
+
|
501 |
+
|
502 |
+
/***/ })
|
503 |
+
|
504 |
+
/******/ });
|
505 |
+
//# sourceMappingURL=block.build.js.map
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_tabs/block/block.build.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_tabs/block/block.js"],"names":["wp","i18n","__","_x","_n","_nx","editor","RichText","InspectorControls","BlockControls","components","PanelBody","SelectControl","TextControl","Dashicon","Tooltip","registerBlockType","blocks","element","Component","Fragment","fruitfulBlocksTabs","arguments","initTabs","prevProps","prevItems","attributes","tabItems","props","length","setAttributes","title","text","refreshTabs","jQuery","window","ff_fruitful_tabs_shortcode","ff_fruitful_tabs_nav_shortcode","hard","ff_fruitful_tabs_refresh","value","index","newItems","map","item","thisIndex","type","respBreak","focus","setFocus","className","label","updateTabsContent","filter","vl","idx","description","icon","category","supports","anchor","align","customClassName","html","multiple","keywords","default","edit","save"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AClFA;;;;eAI4BA,GAAGC,I;IAAvBC,E,YAAAA,E;IAAIC,E,YAAAA,E;IAAIC,E,YAAAA,E;IAAIC,G,YAAAA,G;;AAEpB;;;;iBAOIL,GAAGM,M;IAHNC,Q,cAAAA,Q;IACAC,iB,cAAAA,iB;IACAC,a,cAAAA,a;qBASGT,GAAGU,U;IALNC,S,kBAAAA,S;IACAC,a,kBAAAA,a;IACAC,W,kB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B;AAAA,MAQjBoB,SARiB,qBAQjBA,SARiB;;;AAWlB,SACC;AAAA;AAAA;AACC,eAAY,wBAAwBD,IADrC;AAEC,iBAAYA,IAFb;AAGC,kBAAaC;AAHd;AAKC;AAAA;AAAA;AACCpB,aAASgB,GAAT,CAAc,UAAEC,IAAF,EAAQH,KAAR;AAAA,YACd;AAAA;AAAA,QAAG,MAAK,cAAR;AAAuB,+BAAC,QAAD,CAAU,OAAV,IAAkB,SAAQ,MAA1B,EAAiC,OAAQG,KAAKb,KAA9C;AAAvB,MADc;AAAA,KAAd;AADD,IALD;AAUEJ,YAASgB,GAAT,CAAc,UAAEC,IAAF,EAAQH,KAAR;AAAA,WACd;AAAA;AAAA,OAAK,KAAMA,KAAX,EAAmB,WAAYA,SAAS,CAAT,GAAa,kCAAb,GAAkD,mBAAjF;AACA;AAAA;AAAA,QAAK,WAAU,WAAf;AACC;AAAA;AAAA,SAAI,WAAU,UAAd;AAAyB,gCAAC,QAAD,CAAU,OAAV,IAAkB,SAAQ,MAA1B,EAAiC,OAAQG,KAAKb,KAA9C;AAAzB,OADD;AAEC;AAAA;AAAA,SAAK,WAAU,gBAAf;AAAgC,gCAAC,QAAD,CAAU,OAAV,IAAkB,SAAQ,KAA1B,EAAgC,OAAQa,KAAKZ,IAA7C;AAAhC;AAFD;AADA,KADc;AAAA,IAAd;AAVF,GADD;AAqBA;AA1FkD,CAApD,E","file":"fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_tabs/block/block.build.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n","/**\n * Internationalization function, can be used like we do that in WordPress, e.g.:\n * __( 'My text', 'textdomain')\n */\nconst { __, _x, _n, _nx } = wp.i18n;\n\n/**\n * Import Gutenberg Components to use\n */\nconst {\n\tRichText,\n\tInspectorControls,\n\tBlockControls\n} = wp.editor;\n\nconst {\n\tPanelBody,\n\tSelectControl,\n\tTextControl,\n\tDashicon,\n\tTooltip\n} = wp.components;\n\nconst {\n\tregisterBlockType\n} = wp.blocks;\n\nconst {\n\tComponent,\n\tFragment\n} = wp.element;\n\n/**\n * Create new react component\n */\nclass fruitfulBlocksTabs extends Component {\n\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.initTabs();\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tconst { tabItems: prevItems } = prevProps.attributes;\n\t\tconst { tabItems } = this.props.attributes;\n\n\t\tif (tabItems.length === 0) {\n\t\t\tthis.props.setAttributes( {\n\t\t\t\ttabItems: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttitle: __('Tab 1', 'ff-shortcodes'),\n\t\t\t\t\t\ttext: __('At least one tab must remaining, to remove the whole block use \"Remove Block\" button from right menu.', 'ff-shortcodes'),\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t} );\n\t\t}\n\n\t\tif (prevItems !== tabItems) {\n\t\t\tthis.refreshTabs();\n\t\t} else {\n\t\t\tthis.refreshTabs( true );\n\t\t}\n\n\t}\n\n\tinitTabs() {\n\n\t\tif( typeof jQuery !== 'undefined') {\n\n\t\t\twindow.ff_fruitful_tabs_shortcode();\n\t\t\twindow.ff_fruitful_tabs_nav_shortcode();\n\n\t\t}\n\n\t}\n\n\trefreshTabs( hard = false ) {\n\n\t\tif( typeof jQuery !== 'undefined') {\n\n\t\t\twindow.ff_fruitful_tabs_nav_shortcode();\n\n\t\t\tif( hard ) {\n\t\t\t\twindow.ff_fruitful_tabs_refresh();\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tupdateTabsContent( value, index ) {\n\t\tconst { attributes, setAttributes } = this.props;\n\t\tconst { tabItems } = attributes;\n\n\t\tlet newItems = tabItems.map( ( item, thisIndex ) => {\n\t\t\tif ( index === thisIndex ) {\n\t\t\t\titem = { ...item, ...value };\n\t\t\t}\n\t\t\treturn item;\n\t\t} );\n\n\t\tsetAttributes( { tabItems: newItems } );\n\t}\n\n\trender() {\n\t\t/**\n\t\t * Properties & attributes\n\t\t */\n\t\tconst {\n\t\t\tattributes: {\n\t\t\t\ttype,\n\t\t\t\ttabItems,\n\t\t\t\trespBreak\n\t\t\t},\n\t\t\tsetAttributes,\n\t\t\tfocus,\n\t\t\tsetFocus,\n\t\t\tclassName\n\t\t} = this.props;\n\n\t\t/**\n\t\t * Render component\n\t\t */\n\t\treturn (\n\t\t\t<Fragment>\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<PanelBody title={ __( 'Predefined styles', 'ff-shortcodes' ) } initialOpen={ true }>\n\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\tlabel={ __( 'Type', 'ff-shortcodes' ) }\n\t\t\t\t\t\t\tvalue={ type }\n\t\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t\t{ label: __( 'Horizontal', 'ff-shortcodes' ), value: 'default' },\n\t\t\t\t\t\t\t\t{ label: __( 'Vertical', 'ff-shortcodes' ), value: 'vertical' },\n\t\t\t\t\t\t\t\t{ label: __( 'Accordion', 'ff-shortcodes' ), value: 'accordion' },\n\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\tonChange={ ( value ) => { setAttributes( { type: value } ); } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t\t<PanelBody title={ __( 'Responsive attributes', 'ff-shortcodes' ) } initialOpen={ true }>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\tlabel={ __('Responsive break', 'ff-shortcodes') }\n\t\t\t\t\t\t\tvalue={ respBreak }\n\t\t\t\t\t\t\tonChange={ ( value ) => setAttributes( { respBreak: value } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</InspectorControls>\n\n\t\t\t\t<div\n\t\t\t\t\tclassName={ 'fruitful_tabs type-' + type }\n\t\t\t\t\tdata-type={ type }\n\t\t\t\t\tdata-break={ respBreak }\n\t\t\t\t\t>\n\t\t\t\t\t<nav>\n\t\t\t\t\t\t{tabItems.map( ( item, index ) => (\n\t\t\t\t\t\t\t<a href=\"javascript:;\">\n\t\t\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\t\t\t\t\tvalue={ item.title }\n\t\t\t\t\t\t\t\t\tfocus={ focus }\n\t\t\t\t\t\t\t\t\tonFocus={ setFocus }\n\t\t\t\t\t\t\t\t\tonChange={ ( value ) => this.updateTabsContent( { title: value || '' }, index ) } \n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Tooltip text={ __( 'Remove tab', 'ff-shortcodes' ) }>\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\tclassName=\"ff-tab-control\"\n\t\t\t\t\t\t\t\t\t\tonClick={ () => setAttributes( {\n\t\t\t\t\t\t\t\t\t\t\ttabItems: tabItems.filter( (vl, idx) => idx !== index )\n\t\t\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Dashicon icon=\"no\"/>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t) ) }\n\n\t\t\t\t\t\t<Tooltip text={ __( 'Add tab' ) }>\n\t\t\t\t\t\t\t<span className=\"ff-tab-control ff-add-tab-control\" onClick={ () => setAttributes( { tabItems: [ ...tabItems, { title: __( 'New Tab', 'ff-shortcodes' ), text: __( 'Enter your content.', 'ff-shortcodes' ) } ] } ) }>\n\t\t\t\t\t\t\t\t<Dashicon icon=\"plus\"/>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</Tooltip>\n\n\t\t\t\t\t</nav>\n\t\t\t\t\t{tabItems.map( ( item, index ) => (\n\t\t\t\t\t\t<div key={ index } className={ index == 0 ? 'fruitful_tabs_tab current active' : 'fruitful_tabs_tab' }>\n\t\t\t\t\t\t<div className=\"ff-inside\">\n\t\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\t\ttagName=\"h4\"\n\t\t\t\t\t\t\t\tclassName=\"ff-title\"\n\t\t\t\t\t\t\t\tvalue={ item.title }\n\t\t\t\t\t\t\t\tfocus={ focus }\n\t\t\t\t\t\t\t\tonFocus={ setFocus }\n\t\t\t\t\t\t\t\tonChange={ ( value ) => this.updateTabsContent( { title: value || '' }, index ) } \n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<div className=\"ff-tab-content\">\n\t\t\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\t\t\ttagName=\"div\"\n\t\t\t\t\t\t\t\t\tvalue={ item.text } \n\t\t\t\t\t\t\t\t\tfocus={ focus }\n\t\t\t\t\t\t\t\t\tonFocus={ setFocus }\n\t\t\t\t\t\t\t\t\tonChange={ ( value ) => this.updateTabsContent( { text: value || '' }, index ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t) ) }\n\t\t\t\t</div>\n\t\t\t</Fragment>\n\t\t);\n\t}\n\n}\n\n/**\n * Register block\n */\nregisterBlockType( 'fruitful-blocks/fruitful-tabs', {\n\ttitle: __( 'Fruitful Tabs', 'ff-shortcodes' ),\n\tdescription: __( 'Horizontal / Vertical / Accordion', 'ff-shortcodes' ),\n\ticon: <svg viewBox=\"0 0 32 32\" version=\"1.1\"><g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"><path d=\"M31.5,10.5 L14,10.5 C12.6192881,10.5 11.5,9.38071187 11.5,8 L11.5,4.5 L2,4.5 C1.17157288,4.5 0.5,5.17157288 0.5,6 L0.5,26 C0.5,26.8284271 1.17157288,27.5 2,27.5 L30,27.5 C30.8284271,27.5 31.5,26.8284271 31.5,26 L31.5,10.5 Z\" stroke=\"#4A4A4A\"></path><path d=\"M11.5,4.5 L11.5,8 C11.5,9.38071187 12.6192881,10.5 14,10.5 L31.5,10.5 L31.5,6 C31.5,5.17157288 30.8284271,4.5 30,4.5 L11.5,4.5 Z\" stroke=\"#4A4A4A\"></path><rect fill=\"#4A4A4A\" x=\"21\" y=\"5\" width=\"1\" height=\"5\"></rect></g></svg>,\n\tcategory: 'fruitful-blocks',\n\n\tsupports: {\n\t\t// add a possibility to change block ID\n\t\tanchor: false,\n\t\t// Add the support for block's alignment (left, center, right, wide, full).\n\t\talign: false,\n\t\t// add a possibility to change block class name\n\t\tcustomClassName: true,\n\t\t// By default, Gutenberg will allow a block’s markup to be edited individually.\n\t\thtml: false,\n\t\t// set to false to use this block just one per post / page\n\t\tmultiple: true,\n\t},\n\t\n\tkeywords: [ __( 'tabs', 'ff-shortcodes' ), __( 'accordion', 'ff-shortcodes' ), __( 'tour', 'ff-shortcodes' ) ],\n\n\tattributes: {\n type: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'default'\n\t\t},\n\t\ttabItems: {\n\t\t\ttype: \"array\",\n\t\t\tdefault: [\n\t\t\t\t{\n\t\t\t\t\ttitle: __( 'Tab 1', 'ff-shortcodes' ),\n\t\t\t\t\ttext: __( 'Type here your text inside tab', 'ff-shortcodes' )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: __( 'Tab 2', 'ff-shortcodes' ),\n\t\t\t\t\ttext: __( 'Type here your text inside tab', 'ff-shortcodes' )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: __( 'Tab 3', 'ff-shortcodes' ),\n\t\t\t\t\ttext: __( 'Type here your text inside tab', 'ff-shortcodes' )\n\t\t\t\t},\n\t\t\t]\n\t\t},\n\t\trespBreak: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 767,\n\t\t},\n\t},\n\n\t/**\n\t * Following function called when you edit your block\n\t * through Gutenberg Editor\n\t */\n\tedit: fruitfulBlocksTabs,\n\n\t/**\n\t * Following function saves block data into post content\n\t */\n\tsave: ( props ) => {\n\n\t\t/**\n\t\t * Get saved properties\n\t\t */\n\t\tconst {\n\t\t\ttype,\n\t\t\ttabItems,\n\t\t\trespBreak\n\t\t} = props.attributes;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={ 'fruitful_tabs type-' + type }\n\t\t\t\tdata-type={ type }\n\t\t\t\tdata-break={ respBreak }\n\t\t\t\t>\n\t\t\t\t<nav>\n\t\t\t\t{tabItems.map( ( item, index ) => (\n\t\t\t\t\t<a href=\"javascript:;\"><RichText.Content tagName=\"span\" value={ item.title }/></a>\n\t\t\t\t) ) }\n\t\t\t\t</nav>\n\t\t\t\t{tabItems.map( ( item, index ) => (\n\t\t\t\t\t<div key={ index } className={ index == 0 ? 'fruitful_tabs_tab current active' : 'fruitful_tabs_tab' }>\n\t\t\t\t\t<div className=\"ff-inside\">\n\t\t\t\t\t\t<h4 className=\"ff-title\"><RichText.Content tagName=\"span\" value={ item.title }/></h4>\n\t\t\t\t\t\t<div className=\"ff-tab-content\"><RichText.Content tagName=\"div\" value={ item.text }/></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t);\n\t}\n});"],"sourceRoot":""}
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_tabs/block/block.js
ADDED
@@ -0,0 +1,310 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Internationalization function, can be used like we do that in WordPress, e.g.:
|
3 |
+
* __( 'My text', 'textdomain')
|
4 |
+
*/
|
5 |
+
const { __, _x, _n, _nx } = wp.i18n;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Import Gutenberg Components to use
|
9 |
+
*/
|
10 |
+
const {
|
11 |
+
RichText,
|
12 |
+
InspectorControls,
|
13 |
+
BlockControls
|
14 |
+
} = wp.editor;
|
15 |
+
|
16 |
+
const {
|
17 |
+
PanelBody,
|
18 |
+
SelectControl,
|
19 |
+
TextControl,
|
20 |
+
Dashicon,
|
21 |
+
Tooltip
|
22 |
+
} = wp.components;
|
23 |
+
|
24 |
+
const {
|
25 |
+
registerBlockType
|
26 |
+
} = wp.blocks;
|
27 |
+
|
28 |
+
const {
|
29 |
+
Component,
|
30 |
+
Fragment
|
31 |
+
} = wp.element;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Create new react component
|
35 |
+
*/
|
36 |
+
class fruitfulBlocksTabs extends Component {
|
37 |
+
|
38 |
+
constructor() {
|
39 |
+
super( ...arguments );
|
40 |
+
}
|
41 |
+
|
42 |
+
componentDidMount() {
|
43 |
+
this.initTabs();
|
44 |
+
}
|
45 |
+
|
46 |
+
componentDidUpdate( prevProps ) {
|
47 |
+
const { tabItems: prevItems } = prevProps.attributes;
|
48 |
+
const { tabItems } = this.props.attributes;
|
49 |
+
|
50 |
+
if (tabItems.length === 0) {
|
51 |
+
this.props.setAttributes( {
|
52 |
+
tabItems: [
|
53 |
+
{
|
54 |
+
title: __('Tab 1', 'ff-shortcodes'),
|
55 |
+
text: __('At least one tab must remaining, to remove the whole block use "Remove Block" button from right menu.', 'ff-shortcodes'),
|
56 |
+
},
|
57 |
+
],
|
58 |
+
} );
|
59 |
+
}
|
60 |
+
|
61 |
+
if (prevItems !== tabItems) {
|
62 |
+
this.refreshTabs();
|
63 |
+
} else {
|
64 |
+
this.refreshTabs( true );
|
65 |
+
}
|
66 |
+
|
67 |
+
}
|
68 |
+
|
69 |
+
initTabs() {
|
70 |
+
|
71 |
+
if( typeof jQuery !== 'undefined') {
|
72 |
+
|
73 |
+
window.ff_fruitful_tabs_shortcode();
|
74 |
+
window.ff_fruitful_tabs_nav_shortcode();
|
75 |
+
|
76 |
+
}
|
77 |
+
|
78 |
+
}
|
79 |
+
|
80 |
+
refreshTabs( hard = false ) {
|
81 |
+
|
82 |
+
if( typeof jQuery !== 'undefined') {
|
83 |
+
|
84 |
+
window.ff_fruitful_tabs_nav_shortcode();
|
85 |
+
|
86 |
+
if( hard ) {
|
87 |
+
window.ff_fruitful_tabs_refresh();
|
88 |
+
}
|
89 |
+
|
90 |
+
}
|
91 |
+
|
92 |
+
}
|
93 |
+
|
94 |
+
updateTabsContent( value, index ) {
|
95 |
+
const { attributes, setAttributes } = this.props;
|
96 |
+
const { tabItems } = attributes;
|
97 |
+
|
98 |
+
let newItems = tabItems.map( ( item, thisIndex ) => {
|
99 |
+
if ( index === thisIndex ) {
|
100 |
+
item = { ...item, ...value };
|
101 |
+
}
|
102 |
+
return item;
|
103 |
+
} );
|
104 |
+
|
105 |
+
setAttributes( { tabItems: newItems } );
|
106 |
+
}
|
107 |
+
|
108 |
+
render() {
|
109 |
+
/**
|
110 |
+
* Properties & attributes
|
111 |
+
*/
|
112 |
+
const {
|
113 |
+
attributes: {
|
114 |
+
type,
|
115 |
+
tabItems,
|
116 |
+
respBreak
|
117 |
+
},
|
118 |
+
setAttributes,
|
119 |
+
focus,
|
120 |
+
setFocus,
|
121 |
+
className
|
122 |
+
} = this.props;
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Render component
|
126 |
+
*/
|
127 |
+
return (
|
128 |
+
<Fragment>
|
129 |
+
<InspectorControls>
|
130 |
+
<PanelBody title={ __( 'Predefined styles', 'ff-shortcodes' ) } initialOpen={ true }>
|
131 |
+
<SelectControl
|
132 |
+
label={ __( 'Type', 'ff-shortcodes' ) }
|
133 |
+
value={ type }
|
134 |
+
options={ [
|
135 |
+
{ label: __( 'Horizontal', 'ff-shortcodes' ), value: 'default' },
|
136 |
+
{ label: __( 'Vertical', 'ff-shortcodes' ), value: 'vertical' },
|
137 |
+
{ label: __( 'Accordion', 'ff-shortcodes' ), value: 'accordion' },
|
138 |
+
] }
|
139 |
+
onChange={ ( value ) => { setAttributes( { type: value } ); } }
|
140 |
+
/>
|
141 |
+
</PanelBody>
|
142 |
+
<PanelBody title={ __( 'Responsive attributes', 'ff-shortcodes' ) } initialOpen={ true }>
|
143 |
+
<TextControl
|
144 |
+
label={ __('Responsive break', 'ff-shortcodes') }
|
145 |
+
value={ respBreak }
|
146 |
+
onChange={ ( value ) => setAttributes( { respBreak: value } ) }
|
147 |
+
/>
|
148 |
+
</PanelBody>
|
149 |
+
</InspectorControls>
|
150 |
+
|
151 |
+
<div
|
152 |
+
className={ 'fruitful_tabs type-' + type }
|
153 |
+
data-type={ type }
|
154 |
+
data-break={ respBreak }
|
155 |
+
>
|
156 |
+
<nav>
|
157 |
+
{tabItems.map( ( item, index ) => (
|
158 |
+
<a href="javascript:;">
|
159 |
+
<RichText
|
160 |
+
tagName="span"
|
161 |
+
value={ item.title }
|
162 |
+
focus={ focus }
|
163 |
+
onFocus={ setFocus }
|
164 |
+
onChange={ ( value ) => this.updateTabsContent( { title: value || '' }, index ) }
|
165 |
+
/>
|
166 |
+
<Tooltip text={ __( 'Remove tab', 'ff-shortcodes' ) }>
|
167 |
+
<span
|
168 |
+
className="ff-tab-control"
|
169 |
+
onClick={ () => setAttributes( {
|
170 |
+
tabItems: tabItems.filter( (vl, idx) => idx !== index )
|
171 |
+
} ) }
|
172 |
+
>
|
173 |
+
<Dashicon icon="no"/>
|
174 |
+
</span>
|
175 |
+
</Tooltip>
|
176 |
+
</a>
|
177 |
+
) ) }
|
178 |
+
|
179 |
+
<Tooltip text={ __( 'Add tab' ) }>
|
180 |
+
<span className="ff-tab-control ff-add-tab-control" onClick={ () => setAttributes( { tabItems: [ ...tabItems, { title: __( 'New Tab', 'ff-shortcodes' ), text: __( 'Enter your content.', 'ff-shortcodes' ) } ] } ) }>
|
181 |
+
<Dashicon icon="plus"/>
|
182 |
+
</span>
|
183 |
+
</Tooltip>
|
184 |
+
|
185 |
+
</nav>
|
186 |
+
{tabItems.map( ( item, index ) => (
|
187 |
+
<div key={ index } className={ index == 0 ? 'fruitful_tabs_tab current active' : 'fruitful_tabs_tab' }>
|
188 |
+
<div className="ff-inside">
|
189 |
+
<RichText
|
190 |
+
tagName="h4"
|
191 |
+
className="ff-title"
|
192 |
+
value={ item.title }
|
193 |
+
focus={ focus }
|
194 |
+
onFocus={ setFocus }
|
195 |
+
onChange={ ( value ) => this.updateTabsContent( { title: value || '' }, index ) }
|
196 |
+
/>
|
197 |
+
<div className="ff-tab-content">
|
198 |
+
<RichText
|
199 |
+
tagName="div"
|
200 |
+
value={ item.text }
|
201 |
+
focus={ focus }
|
202 |
+
onFocus={ setFocus }
|
203 |
+
onChange={ ( value ) => this.updateTabsContent( { text: value || '' }, index ) }
|
204 |
+
/>
|
205 |
+
</div>
|
206 |
+
</div>
|
207 |
+
</div>
|
208 |
+
) ) }
|
209 |
+
</div>
|
210 |
+
</Fragment>
|
211 |
+
);
|
212 |
+
}
|
213 |
+
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Register block
|
218 |
+
*/
|
219 |
+
registerBlockType( 'fruitful-blocks/fruitful-tabs', {
|
220 |
+
title: __( 'Fruitful Tabs', 'ff-shortcodes' ),
|
221 |
+
description: __( 'Horizontal / Vertical / Accordion', 'ff-shortcodes' ),
|
222 |
+
icon: <svg viewBox="0 0 32 32" version="1.1"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M31.5,10.5 L14,10.5 C12.6192881,10.5 11.5,9.38071187 11.5,8 L11.5,4.5 L2,4.5 C1.17157288,4.5 0.5,5.17157288 0.5,6 L0.5,26 C0.5,26.8284271 1.17157288,27.5 2,27.5 L30,27.5 C30.8284271,27.5 31.5,26.8284271 31.5,26 L31.5,10.5 Z" stroke="#4A4A4A"></path><path d="M11.5,4.5 L11.5,8 C11.5,9.38071187 12.6192881,10.5 14,10.5 L31.5,10.5 L31.5,6 C31.5,5.17157288 30.8284271,4.5 30,4.5 L11.5,4.5 Z" stroke="#4A4A4A"></path><rect fill="#4A4A4A" x="21" y="5" width="1" height="5"></rect></g></svg>,
|
223 |
+
category: 'fruitful-blocks',
|
224 |
+
|
225 |
+
supports: {
|
226 |
+
// add a possibility to change block ID
|
227 |
+
anchor: false,
|
228 |
+
// Add the support for block's alignment (left, center, right, wide, full).
|
229 |
+
align: false,
|
230 |
+
// add a possibility to change block class name
|
231 |
+
customClassName: true,
|
232 |
+
// By default, Gutenberg will allow a block’s markup to be edited individually.
|
233 |
+
html: false,
|
234 |
+
// set to false to use this block just one per post / page
|
235 |
+
multiple: true,
|
236 |
+
},
|
237 |
+
|
238 |
+
keywords: [ __( 'tabs', 'ff-shortcodes' ), __( 'accordion', 'ff-shortcodes' ), __( 'tour', 'ff-shortcodes' ) ],
|
239 |
+
|
240 |
+
attributes: {
|
241 |
+
type: {
|
242 |
+
type: 'string',
|
243 |
+
default: 'default'
|
244 |
+
},
|
245 |
+
tabItems: {
|
246 |
+
type: "array",
|
247 |
+
default: [
|
248 |
+
{
|
249 |
+
title: __( 'Tab 1', 'ff-shortcodes' ),
|
250 |
+
text: __( 'Type here your text inside tab', 'ff-shortcodes' )
|
251 |
+
},
|
252 |
+
{
|
253 |
+
title: __( 'Tab 2', 'ff-shortcodes' ),
|
254 |
+
text: __( 'Type here your text inside tab', 'ff-shortcodes' )
|
255 |
+
},
|
256 |
+
{
|
257 |
+
title: __( 'Tab 3', 'ff-shortcodes' ),
|
258 |
+
text: __( 'Type here your text inside tab', 'ff-shortcodes' )
|
259 |
+
},
|
260 |
+
]
|
261 |
+
},
|
262 |
+
respBreak: {
|
263 |
+
type: 'number',
|
264 |
+
default: 767,
|
265 |
+
},
|
266 |
+
},
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Following function called when you edit your block
|
270 |
+
* through Gutenberg Editor
|
271 |
+
*/
|
272 |
+
edit: fruitfulBlocksTabs,
|
273 |
+
|
274 |
+
/**
|
275 |
+
* Following function saves block data into post content
|
276 |
+
*/
|
277 |
+
save: ( props ) => {
|
278 |
+
|
279 |
+
/**
|
280 |
+
* Get saved properties
|
281 |
+
*/
|
282 |
+
const {
|
283 |
+
type,
|
284 |
+
tabItems,
|
285 |
+
respBreak
|
286 |
+
} = props.attributes;
|
287 |
+
|
288 |
+
return (
|
289 |
+
<div
|
290 |
+
className={ 'fruitful_tabs type-' + type }
|
291 |
+
data-type={ type }
|
292 |
+
data-break={ respBreak }
|
293 |
+
>
|
294 |
+
<nav>
|
295 |
+
{tabItems.map( ( item, index ) => (
|
296 |
+
<a href="javascript:;"><RichText.Content tagName="span" value={ item.title }/></a>
|
297 |
+
) ) }
|
298 |
+
</nav>
|
299 |
+
{tabItems.map( ( item, index ) => (
|
300 |
+
<div key={ index } className={ index == 0 ? 'fruitful_tabs_tab current active' : 'fruitful_tabs_tab' }>
|
301 |
+
<div className="ff-inside">
|
302 |
+
<h4 className="ff-title"><RichText.Content tagName="span" value={ item.title }/></h4>
|
303 |
+
<div className="ff-tab-content"><RichText.Content tagName="div" value={ item.text }/></div>
|
304 |
+
</div>
|
305 |
+
</div>
|
306 |
+
) ) }
|
307 |
+
</div>
|
308 |
+
);
|
309 |
+
}
|
310 |
+
});
|
fruitful-shortcodes-2.0.0/core/gutenberg_blocks/fruitful_tabs/init.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// enqueue editor styles
|
4 |
+
add_action( 'enqueue_block_editor_assets', function () {
|
5 |
+
|
6 |
+
$block_name = 'fruitful_tabs';
|
7 |
+
$block_url = FF_SHORTCODES()->plugin_url . FF_SHORTCODES()->gutenberg_blocks_dir . '/' . $block_name . '/';
|
8 |
+
$assets_url = FF_SHORTCODES()->plugin_url . FF_SHORTCODES()->assets_dir . '/' . $block_name . '/';
|
9 |
+
|
10 |
+
// Block Scripts
|
11 |
+
wp_enqueue_script( 'ff-fruitful_tabs' );
|
12 |
+
|
13 |
+
wp_enqueue_script(
|
14 |
+
'fruitful-blocks-tabs', // Handle
|
15 |
+
$block_url . 'block/block.build.js',
|
16 |
+
[ 'wp-editor', 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components' ],
|
17 |
+
FF_SHORTCODES()->cache_time,
|
18 |
+
true
|
19 |
+
);
|
20 |
+
|
21 |
+
// Block Styles
|
22 |
+
wp_enqueue_style(
|
23 |
+
'fruitful_tabs',
|
24 |
+
null,
|
25 |
+
[ 'wp-edit-blocks' ],
|
26 |
+
'b' . FF_SHORTCODES()->cache_time
|
27 |
+
);
|
28 |
+
|
29 |
+
// Set translations ( since WP 5.0 )
|
30 |
+
if ( function_exists( 'wp_set_script_translations' ) ) {
|
31 |
+
wp_set_script_translations( 'fruitful-blocks-tabs', 'ff-shortcodes' );
|
32 |
+
}
|
33 |
+
|
34 |
+
// pre WP 5.0 with gutenberg plugin
|
35 |
+
if ( function_exists( 'gutenberg_get_jed_locale_data' ) ) {
|
36 |
+
wp_add_inline_script(
|
37 |
+
'fruitful-blocks-tabs',
|
38 |
+
sprintf(
|
39 |
+
'var fruitful_blocks_tabs = { localeData: %s };',
|
40 |
+
json_encode( gutenberg_get_jed_locale_data( 'ff-shortcodes' ) )
|
41 |
+
),
|
42 |
+
'before'
|
43 |
+
);
|
44 |
+
}
|
45 |
+
|
46 |
+
} );
|
47 |
+
|
48 |
+
// load both front-end + back-end assets
|
49 |
+
add_action( 'enqueue_block_assets', function () {
|
50 |
+
|
51 |
+
wp_enqueue_style( 'ff-fruitful_tabs' );
|
52 |
+
wp_enqueue_script( 'ff-fruitful_tabs' );
|
53 |
+
|
54 |
+
} );
|
55 |
+
|
56 |
+
// register the block
|
57 |
+
add_action( 'admin_init', function () {
|
58 |
+
|
59 |
+
register_block_type( 'fruitful-blocks/fruitful-tabs', [
|
60 |
+
'script' => 'fruitful-blocks-tabs',
|
61 |
+
] );
|
62 |
+
|
63 |
+
} );
|
fruitful-shortcodes-2.0.0/core/helper/admin_options.php
CHANGED
@@ -21,7 +21,7 @@ namespace ffshortcodes\helper;
|
|
21 |
$config = array_replace_recursive( $defaults, $config );
|
22 |
|
23 |
?>
|
24 |
-
<div class="ff-row">
|
25 |
<h4 class="<?php echo implode(' ', $config['css_classes']); ?>"><?php echo wp_kses_post( $config['title'] ); ?></h4>
|
26 |
</div>
|
27 |
<?php
|
@@ -63,7 +63,7 @@ namespace ffshortcodes\helper;
|
|
63 |
$config = array_replace_recursive( $defaults, $config );
|
64 |
|
65 |
?>
|
66 |
-
<div class="ff-row">
|
67 |
|
68 |
<?php if( $config['heading'] <> '' ): ?>
|
69 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
@@ -104,7 +104,7 @@ namespace ffshortcodes\helper;
|
|
104 |
$config = array_replace_recursive( $defaults, $config );
|
105 |
|
106 |
?>
|
107 |
-
<div class="ff-row">
|
108 |
|
109 |
<?php if( $config['heading'] <> '' ): ?>
|
110 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
@@ -150,7 +150,7 @@ namespace ffshortcodes\helper;
|
|
150 |
$config = array_replace_recursive( $defaults, $config );
|
151 |
|
152 |
?>
|
153 |
-
<div class="ff-row">
|
154 |
|
155 |
<?php if( $config['heading'] <> '' ): ?>
|
156 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
@@ -211,7 +211,7 @@ namespace ffshortcodes\helper;
|
|
211 |
$config = array_replace_recursive( $defaults, $config );
|
212 |
|
213 |
?>
|
214 |
-
<div class="ff-row">
|
215 |
|
216 |
<?php if( $config['heading'] <> '' ): ?>
|
217 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
@@ -256,7 +256,7 @@ namespace ffshortcodes\helper;
|
|
256 |
$config = array_replace_recursive( $defaults, $config );
|
257 |
|
258 |
?>
|
259 |
-
<div class="ff-row">
|
260 |
|
261 |
<?php if( $config['heading'] <> '' ): ?>
|
262 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
@@ -304,7 +304,7 @@ namespace ffshortcodes\helper;
|
|
304 |
$config = array_replace_recursive( $defaults, $config );
|
305 |
|
306 |
?>
|
307 |
-
<div class="ff-row">
|
308 |
|
309 |
<?php if( $config['heading'] <> '' ): ?>
|
310 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
@@ -349,7 +349,7 @@ namespace ffshortcodes\helper;
|
|
349 |
$config = array_replace_recursive( $defaults, $config );
|
350 |
|
351 |
?>
|
352 |
-
<div class="ff-row">
|
353 |
|
354 |
<?php if( $config['heading'] <> '' ): ?>
|
355 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
@@ -387,14 +387,15 @@ namespace ffshortcodes\helper;
|
|
387 |
'default' => '',
|
388 |
'desc' => '',
|
389 |
'heading' => '',
|
390 |
-
'css_classes' => array()
|
|
|
391 |
);
|
392 |
|
393 |
$config = array_replace_recursive( $defaults, $config );
|
394 |
|
395 |
?>
|
396 |
|
397 |
-
<div class="ff-row">
|
398 |
|
399 |
<?php if( $config['heading'] <> '' ): ?>
|
400 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
@@ -408,6 +409,11 @@ namespace ffshortcodes\helper;
|
|
408 |
|
409 |
<div class="dropdown-wrapper">
|
410 |
<select class="<?php echo implode(' ', $config['css_classes']); ?>" id="ff-shortcodes-input-<?php echo esc_attr( $config['name'] ); ?>" name="<?php echo esc_attr( $config['name'] ); ?>">
|
|
|
|
|
|
|
|
|
|
|
411 |
<?php if( is_array( $config['value'] ) ): ?>
|
412 |
|
413 |
<?php foreach( $config['value'] as $k=>$v ): ?>
|
@@ -450,7 +456,7 @@ namespace ffshortcodes\helper;
|
|
450 |
|
451 |
?>
|
452 |
|
453 |
-
<div class="ff-row">
|
454 |
|
455 |
<?php if( $config['heading'] <> '' ): ?>
|
456 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
@@ -505,7 +511,7 @@ namespace ffshortcodes\helper;
|
|
505 |
$config = array_replace_recursive( $defaults, $config );
|
506 |
|
507 |
?>
|
508 |
-
<div class="ff-row">
|
509 |
|
510 |
<?php if( $config['heading'] <> '' ): ?>
|
511 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
@@ -696,7 +702,23 @@ namespace ffshortcodes\helper;
|
|
696 |
<form action="javascript:;" id="ff-shortcode-params-form" class="ff-shortcode-params <?php if( $tabbed_form ): ?> tabbed<?php endif; ?>" method="POST">
|
697 |
<?php
|
698 |
|
699 |
-
if(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
700 |
?>
|
701 |
<input type="hidden" name="_ff_shortcode_name" value="<?php echo esc_attr( $config['shortcode'] ); ?>" />
|
702 |
<?php
|
21 |
$config = array_replace_recursive( $defaults, $config );
|
22 |
|
23 |
?>
|
24 |
+
<div class="ff-bk-row">
|
25 |
<h4 class="<?php echo implode(' ', $config['css_classes']); ?>"><?php echo wp_kses_post( $config['title'] ); ?></h4>
|
26 |
</div>
|
27 |
<?php
|
63 |
$config = array_replace_recursive( $defaults, $config );
|
64 |
|
65 |
?>
|
66 |
+
<div class="ff-bk-row">
|
67 |
|
68 |
<?php if( $config['heading'] <> '' ): ?>
|
69 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
104 |
$config = array_replace_recursive( $defaults, $config );
|
105 |
|
106 |
?>
|
107 |
+
<div class="ff-bk-row">
|
108 |
|
109 |
<?php if( $config['heading'] <> '' ): ?>
|
110 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
150 |
$config = array_replace_recursive( $defaults, $config );
|
151 |
|
152 |
?>
|
153 |
+
<div class="ff-bk-row">
|
154 |
|
155 |
<?php if( $config['heading'] <> '' ): ?>
|
156 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
211 |
$config = array_replace_recursive( $defaults, $config );
|
212 |
|
213 |
?>
|
214 |
+
<div class="ff-bk-row">
|
215 |
|
216 |
<?php if( $config['heading'] <> '' ): ?>
|
217 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
256 |
$config = array_replace_recursive( $defaults, $config );
|
257 |
|
258 |
?>
|
259 |
+
<div class="ff-bk-row">
|
260 |
|
261 |
<?php if( $config['heading'] <> '' ): ?>
|
262 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
304 |
$config = array_replace_recursive( $defaults, $config );
|
305 |
|
306 |
?>
|
307 |
+
<div class="ff-bk-row">
|
308 |
|
309 |
<?php if( $config['heading'] <> '' ): ?>
|
310 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
349 |
$config = array_replace_recursive( $defaults, $config );
|
350 |
|
351 |
?>
|
352 |
+
<div class="ff-bk-row">
|
353 |
|
354 |
<?php if( $config['heading'] <> '' ): ?>
|
355 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
387 |
'default' => '',
|
388 |
'desc' => '',
|
389 |
'heading' => '',
|
390 |
+
'css_classes' => array(),
|
391 |
+
'first_null_option' => false
|
392 |
);
|
393 |
|
394 |
$config = array_replace_recursive( $defaults, $config );
|
395 |
|
396 |
?>
|
397 |
|
398 |
+
<div class="ff-bk-row">
|
399 |
|
400 |
<?php if( $config['heading'] <> '' ): ?>
|
401 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
409 |
|
410 |
<div class="dropdown-wrapper">
|
411 |
<select class="<?php echo implode(' ', $config['css_classes']); ?>" id="ff-shortcodes-input-<?php echo esc_attr( $config['name'] ); ?>" name="<?php echo esc_attr( $config['name'] ); ?>">
|
412 |
+
|
413 |
+
<?php if( $config['first_null_option'] ): ?>
|
414 |
+
<option <?php echo selected( '', $config['default'] ); ?> value=""></option>
|
415 |
+
<?php endif; ?>
|
416 |
+
|
417 |
<?php if( is_array( $config['value'] ) ): ?>
|
418 |
|
419 |
<?php foreach( $config['value'] as $k=>$v ): ?>
|
456 |
|
457 |
?>
|
458 |
|
459 |
+
<div class="ff-bk-row">
|
460 |
|
461 |
<?php if( $config['heading'] <> '' ): ?>
|
462 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
511 |
$config = array_replace_recursive( $defaults, $config );
|
512 |
|
513 |
?>
|
514 |
+
<div class="ff-bk-row">
|
515 |
|
516 |
<?php if( $config['heading'] <> '' ): ?>
|
517 |
<h4><?php echo wp_kses_post( $config['heading'] ); ?></h4>
|
702 |
<form action="javascript:;" id="ff-shortcode-params-form" class="ff-shortcode-params <?php if( $tabbed_form ): ?> tabbed<?php endif; ?>" method="POST">
|
703 |
<?php
|
704 |
|
705 |
+
if( ! empty( $config['shortcode'] ) ):
|
706 |
+
|
707 |
+
// add common tabs to config
|
708 |
+
if ( $tabbed_form && apply_filters( 'ff_shortcodes_can_add_common_tabs', true, $config ) ) {
|
709 |
+
|
710 |
+
$common_tabs = apply_filters( 'ff_shortcodes_get_common_tabs', [], $config );
|
711 |
+
|
712 |
+
if ( is_array( $common_tabs ) && $common_tabs ) {
|
713 |
+
foreach ($common_tabs as $tab => $tab_params ) {
|
714 |
+
if ( ! isset( $config[$tab] ) ) { // prevent overriding shortcode tabs by common tabs
|
715 |
+
$config[$tab] = $tab_params;
|
716 |
+
}
|
717 |
+
}
|
718 |
+
}
|
719 |
+
}
|
720 |
+
|
721 |
+
|
722 |
?>
|
723 |
<input type="hidden" name="_ff_shortcode_name" value="<?php echo esc_attr( $config['shortcode'] ); ?>" />
|
724 |
<?php
|
fruitful-shortcodes-2.0.0/core/helper/utils.php
CHANGED
@@ -70,12 +70,33 @@
|
|
70 |
}
|
71 |
|
72 |
/**
|
73 |
-
*
|
74 |
**/
|
75 |
public static function is_gutenberg() {
|
76 |
-
return in_array( 'gutenberg/gutenberg.php', \apply_filters( 'active_plugins', \get_option( 'active_plugins' ) ) );
|
77 |
}
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
/**
|
80 |
* Register all available assets
|
81 |
*/
|
@@ -87,13 +108,14 @@
|
|
87 |
foreach( FF_SHORTCODES()->shortcodes as $shortcode_name => $data ) {
|
88 |
$style_file = FF_SHORTCODES()->assets_dir . $shortcode_name . '/css/styles.css';
|
89 |
$scripts_file = FF_SHORTCODES()->assets_dir . $shortcode_name . '/js/scripts' . $postfix . '.js';
|
90 |
-
|
91 |
-
|
92 |
-
|
|
|
93 |
}
|
94 |
|
95 |
-
if( file_exists( FF_SHORTCODES()->plugin_path . $scripts_file ) ) {
|
96 |
-
wp_register_script( 'ff-' . $shortcode_name, FF_SHORTCODES()->plugin_url . $scripts_file,
|
97 |
}
|
98 |
|
99 |
}
|
70 |
}
|
71 |
|
72 |
/**
|
73 |
+
* Check that Gutenberg functions present or plugin active
|
74 |
**/
|
75 |
public static function is_gutenberg() {
|
76 |
+
return function_exists( 'register_block_type' ) || in_array( 'gutenberg/gutenberg.php', \apply_filters( 'active_plugins', \get_option( 'active_plugins' ) ), true );
|
77 |
}
|
78 |
+
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Check that Gutenberg enable on current admin page, for hook usage only
|
82 |
+
**/
|
83 |
+
public static function is_block_editor() {
|
84 |
+
if ( is_admin() ) {
|
85 |
+
global $current_screen;
|
86 |
+
|
87 |
+
if ( ( method_exists( $current_screen, 'is_block_editor' ) && $current_screen->is_block_editor() )
|
88 |
+
||
|
89 |
+
( function_exists( 'is_gutenberg_page' ) && is_gutenberg_page() )
|
90 |
+
) {
|
91 |
+
return true;
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
return false;
|
96 |
+
}
|
97 |
+
|
98 |
+
|
99 |
+
|
100 |
/**
|
101 |
* Register all available assets
|
102 |
*/
|
108 |
foreach( FF_SHORTCODES()->shortcodes as $shortcode_name => $data ) {
|
109 |
$style_file = FF_SHORTCODES()->assets_dir . $shortcode_name . '/css/styles.css';
|
110 |
$scripts_file = FF_SHORTCODES()->assets_dir . $shortcode_name . '/js/scripts' . $postfix . '.js';
|
111 |
+
|
112 |
+
|
113 |
+
if( ! wp_style_is( 'ff-' . $shortcode_name, 'registered' ) && file_exists( FF_SHORTCODES()->plugin_path . $style_file ) ) {
|
114 |
+
wp_register_style( 'ff-' . $shortcode_name, FF_SHORTCODES()->plugin_url . $style_file, [], FF_SHORTCODES()->cache_time );
|
115 |
}
|
116 |
|
117 |
+
if( ! wp_script_is( 'ff-' . $shortcode_name, 'registered' ) && file_exists( FF_SHORTCODES()->plugin_path . $scripts_file ) ) {
|
118 |
+
wp_register_script( 'ff-' . $shortcode_name, FF_SHORTCODES()->plugin_url . $scripts_file, ['jquery'], FF_SHORTCODES()->cache_time, true);
|
119 |
}
|
120 |
|
121 |
}
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_alert/config.php
CHANGED
@@ -1,38 +1,42 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
14 |
array(
|
15 |
-
'type'
|
16 |
-
'name'
|
17 |
-
'label' => esc_html__( 'Alert style', 'ff_shortcodes'),
|
18 |
'value' => array(
|
19 |
-
'alert-success' => esc_html__( 'Success', 'ff_shortcodes'),
|
20 |
-
'alert-info'
|
21 |
-
'alert-warning' => esc_html__( 'Warning', 'ff_shortcodes'),
|
22 |
-
'alert-danger'
|
23 |
),
|
24 |
),
|
25 |
array(
|
26 |
-
'type'
|
27 |
-
'name'
|
28 |
-
'label' => esc_html__( 'Alert text', 'ff_shortcodes'),
|
29 |
-
'value' => esc_html__( 'Oh snap! Change a few things up and try submitting again.', 'ff_shortcodes'),
|
30 |
),
|
31 |
array(
|
32 |
-
'type'
|
33 |
-
'name'
|
34 |
-
'label' => esc_html__( 'Shortcode ID', 'ff_shortcodes'),
|
35 |
),
|
36 |
)
|
37 |
-
)
|
38 |
-
|
|
1 |
<?php
|
2 |
|
3 |
+
/**
|
4 |
+
* This file used to build a form
|
5 |
+
* in a modal window
|
6 |
+
* The config is an array with form options / control types
|
7 |
+
**/
|
8 |
|
9 |
+
$cfg = array(
|
10 |
+
'title' => esc_html__( 'Alert', 'ff_shortcodes' ),
|
11 |
+
'desc' => esc_html__( 'Add alert box', 'ff_shortcodes' ),
|
12 |
+
'shortcode' => 'fruitful_alert',
|
13 |
+
'tabs' => true,
|
14 |
+
'general' => array(
|
15 |
+
'tab_title' => esc_html__( 'General', 'ff_shortcodes' ),
|
16 |
+
'fields' => array(
|
17 |
array(
|
18 |
+
'type' => 'radio',
|
19 |
+
'name' => 'color',
|
20 |
+
'label' => esc_html__( 'Alert style', 'ff_shortcodes' ),
|
21 |
'value' => array(
|
22 |
+
'alert-success' => esc_html__( 'Success', 'ff_shortcodes' ),
|
23 |
+
'alert-info' => esc_html__( 'Info', 'ff_shortcodes' ),
|
24 |
+
'alert-warning' => esc_html__( 'Warning', 'ff_shortcodes' ),
|
25 |
+
'alert-danger' => esc_html__( 'Danger', 'ff_shortcodes' ),
|
26 |
),
|
27 |
),
|
28 |
array(
|
29 |
+
'type' => 'textarea',
|
30 |
+
'name' => 'content',
|
31 |
+
'label' => esc_html__( 'Alert text', 'ff_shortcodes' ),
|
32 |
+
'value' => esc_html__( 'Oh snap! Change a few things up and try submitting again.', 'ff_shortcodes' ),
|
33 |
),
|
34 |
array(
|
35 |
+
'type' => 'textfield',
|
36 |
+
'name' => 'id',
|
37 |
+
'label' => esc_html__( 'Shortcode ID', 'ff_shortcodes' ),
|
38 |
),
|
39 |
)
|
40 |
+
)
|
41 |
+
);
|
42 |
+
// config can be extended with common tabs
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_alert/init.php
CHANGED
@@ -1,29 +1,35 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
27 |
}
|
|
|
|
|
28 |
|
29 |
-
|
1 |
<?php
|
2 |
|
3 |
+
/**
|
4 |
+
* Display alerts shortcode on a front-end part
|
5 |
+
**/
|
6 |
+
|
7 |
+
if ( ! function_exists( 'display_fruitful_alert_shortcode' ) ) {
|
8 |
+
|
9 |
+
function display_fruitful_alert_shortcode( $atts, $content ) {
|
10 |
+
|
11 |
+
$default_atts = [
|
12 |
+
'color' => 'alert-success',
|
13 |
+
'id' => '',
|
14 |
+
];
|
15 |
+
|
16 |
+
$default_atts = apply_filters( 'ff_shortcodes_shortcode_default_atts', $default_atts );
|
17 |
+
$atts = shortcode_atts( $default_atts, $atts, 'fruitful_alert' );
|
18 |
+
|
19 |
+
wp_enqueue_style( 'ff-fruitful_alert' );
|
20 |
+
wp_enqueue_script( 'ff-fruitful_alert' );
|
21 |
+
|
22 |
+
|
23 |
+
do_action( 'ff_shortcodes_shortcode_before_view_load', $atts, $content );
|
24 |
+
|
25 |
+
return apply_filters( 'fruitful_alert_shortcode', FF_SHORTCODES()->view->load(
|
26 |
+
FF_SHORTCODES()->shortcodes_dir . '/' . 'fruitful_alert/view', [
|
27 |
+
'atts' => $atts,
|
28 |
+
'content' => $content
|
29 |
+
], false, true ) );
|
30 |
+
|
31 |
}
|
32 |
+
|
33 |
+
}
|
34 |
|
35 |
+
add_shortcode( 'fruitful_alert', 'display_fruitful_alert_shortcode' );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_alert/modal.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
-
|
7 |
|
8 |
-
|
9 |
-
|
1 |
<?php
|
2 |
|
3 |
+
use ffshortcodes\helper\admin_options;
|
4 |
|
5 |
+
// get config
|
6 |
+
require 'config.php';
|
7 |
|
8 |
+
// print shortcode form
|
9 |
+
admin_options::print_form( $cfg );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_alert/view.php
CHANGED
@@ -1,22 +1,25 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
|
5 |
-
|
6 |
|
7 |
-
|
8 |
-
|
|
|
9 |
|
10 |
-
|
11 |
-
|
12 |
|
13 |
-
|
14 |
-
<div <?php echo implode( $attributes ); ?>>
|
15 |
|
|
|
|
|
|
|
16 |
<i class="ff-icon"></i>
|
17 |
-
|
18 |
<?php echo $content; ?>
|
19 |
-
|
20 |
<a href="#" class="ff-alert-dismiss"></a>
|
21 |
|
22 |
</div>
|
1 |
<?php
|
2 |
+
$atts = $data['atts'];
|
3 |
+
$content = $data['content'];
|
4 |
|
5 |
+
$attributes = $classes = array();
|
6 |
|
7 |
+
$classes[] = 'ff-root';
|
8 |
+
$classes[] = 'fruitful_alert';
|
9 |
+
$classes[] = 'ff-' . $atts['color'];
|
10 |
|
11 |
+
$attributes[] = 'id="' . $atts['id'] . '"';
|
12 |
+
$attributes[] = 'class="' . implode( ' ', $classes ) . '"';
|
13 |
|
14 |
+
$attributes = apply_filters( 'ff_shortcodes_shortcode_wrap_attrs', $attributes, $data );
|
|
|
15 |
|
16 |
+
?>
|
17 |
+
<div <?php echo implode( ' ', $attributes ); ?>>
|
18 |
+
|
19 |
<i class="ff-icon"></i>
|
20 |
+
|
21 |
<?php echo $content; ?>
|
22 |
+
|
23 |
<a href="#" class="ff-alert-dismiss"></a>
|
24 |
|
25 |
</div>
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_bar/view.php
CHANGED
@@ -7,6 +7,7 @@
|
|
7 |
$content = $data['content'];
|
8 |
$attributes = $classes = array();
|
9 |
|
|
|
10 |
$classes[] = 'ff fruitful_bar';
|
11 |
|
12 |
$atts['type'] = str_replace( 'progress-bar-', '', $atts['type']);
|
7 |
$content = $data['content'];
|
8 |
$attributes = $classes = array();
|
9 |
|
10 |
+
$classes[] = 'ff-root';
|
11 |
$classes[] = 'ff fruitful_bar';
|
12 |
|
13 |
$atts['type'] = str_replace( 'progress-bar-', '', $atts['type']);
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_btn/config.php
CHANGED
@@ -1,137 +1,148 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
),
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
),
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
'
|
49 |
-
'
|
50 |
-
|
51 |
-
|
52 |
-
),
|
53 |
-
'desc' => esc_html__( 'Icon can be applied only for "Button" or "Link" button type', 'ff_shortcodes'),
|
54 |
-
),
|
55 |
-
array(
|
56 |
-
'type' => 'textfield',
|
57 |
-
'name' => 'id',
|
58 |
-
'label' => esc_html__( 'Button ID', 'ff_shortcodes'),
|
59 |
-
'value' => 'ff-btn-' . uniqid(),
|
60 |
-
),
|
61 |
-
)
|
62 |
-
),
|
63 |
-
'style' => array(
|
64 |
-
'tab_title' => esc_html__( 'Style', 'ff_shortcodes'),
|
65 |
-
'fields' => array(
|
66 |
-
array(
|
67 |
-
'type' => 'dropdown',
|
68 |
-
'name' => 'size',
|
69 |
-
'label' => esc_html__( 'Size', 'ff_shortcodes'),
|
70 |
-
'value' => array(
|
71 |
-
'mini' => esc_html__( 'Mini', 'ff_shortcodes'),
|
72 |
-
'small' => esc_html__( 'Small', 'ff_shortcodes'),
|
73 |
-
'large' => esc_html__( 'Large', 'ff_shortcodes'),
|
74 |
-
'extra-large' => esc_html__( 'Extra Large', 'ff_shortcodes'),
|
75 |
-
),
|
76 |
-
),
|
77 |
-
array(
|
78 |
-
'type' => 'dropdown',
|
79 |
-
'name' => 'color',
|
80 |
-
'label' => esc_html__( 'Color', 'ff_shortcodes'),
|
81 |
-
'value' => array(
|
82 |
-
'default' => esc_html__( 'Default', 'ff_shortcodes'),
|
83 |
-
'primary' => esc_html__( 'Primary', 'ff_shortcodes'),
|
84 |
-
'info' => esc_html__( 'Info', 'ff_shortcodes'),
|
85 |
-
'success' => esc_html__( 'Success', 'ff_shortcodes'),
|
86 |
-
'secondary' => esc_html__( 'Secondary', 'ff_shortcodes'),
|
87 |
-
'warning' => esc_html__( 'Warning', 'ff_shortcodes'),
|
88 |
-
'danger' => esc_html__( 'Danger', 'ff_shortcodes'),
|
89 |
-
'inverse' => esc_html__( 'Inverse', 'ff_shortcodes'),
|
90 |
-
),
|
91 |
),
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
'
|
100 |
-
'
|
101 |
-
'
|
102 |
-
'
|
103 |
-
|
104 |
-
|
105 |
-
),
|
106 |
),
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
),
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
),
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
),
|
133 |
),
|
134 |
-
|
135 |
-
|
136 |
)
|
137 |
-
)
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
/**
|
4 |
+
* This file used to build a form
|
5 |
+
* in a modal window
|
6 |
+
* The config is an array with form options / control types
|
7 |
+
**/
|
8 |
|
9 |
+
$cfg = array(
|
10 |
+
'title' => esc_html__( 'Button', 'ff_shortcodes' ),
|
11 |
+
'desc' => esc_html__( 'Add button', 'ff_shortcodes' ),
|
12 |
+
'shortcode' => 'fruitful_btn',
|
13 |
+
'tabs' => true,
|
14 |
+
'general' => array(
|
15 |
+
'tab_title' => esc_html__( 'General', 'ff_shortcodes' ),
|
16 |
+
'fields' => array(
|
17 |
+
array(
|
18 |
+
'type' => 'textfield',
|
19 |
+
'name' => 'content',
|
20 |
+
'label' => esc_html__( 'Button label', 'ff_shortcodes' ),
|
21 |
+
'value' => esc_html__( 'Click me', 'ff_shortcodes' ),
|
22 |
+
'desc' => esc_html__( 'type here button label', 'ff_shortcodes' ),
|
23 |
+
),
|
24 |
+
array(
|
25 |
+
'type' => 'textfield',
|
26 |
+
'name' => 'link',
|
27 |
+
'label' => esc_html__( 'Button link', 'ff_shortcodes' ),
|
28 |
+
'value' => 'http://google.com',
|
29 |
+
),
|
30 |
+
array(
|
31 |
+
'type' => 'dropdown',
|
32 |
+
'name' => 'target',
|
33 |
+
'label' => esc_html__( 'Link target', 'ff_shortcodes' ),
|
34 |
+
'value' => array(
|
35 |
+
'_self' => esc_html__( 'Current window', 'ff_shortcodes' ),
|
36 |
+
'_blank' => esc_html__( 'New window', 'ff_shortcodes' ),
|
37 |
),
|
38 |
+
),
|
39 |
+
array(
|
40 |
+
'type' => 'icon_picker',
|
41 |
+
'name' => 'icon',
|
42 |
+
'label' => esc_html__( 'Button Icon', 'ff_shortcodes' ),
|
43 |
+
'desc' => esc_html__( 'Icon can be applied only for "Button" or "Link" button type', 'ff_shortcodes' ),
|
44 |
+
),
|
45 |
+
array(
|
46 |
+
'type' => 'radio',
|
47 |
+
'name' => 'icon_position',
|
48 |
+
'label' => esc_html__( 'Icon position', 'ff_shortcodes' ),
|
49 |
+
'value' => array(
|
50 |
+
'right' => esc_html__( 'Right', 'ff_shortcodes' ),
|
51 |
+
'left' => esc_html__( 'Left', 'ff_shortcodes' ),
|
52 |
),
|
53 |
+
'desc' => esc_html__( 'Icon can be applied only for "Button" or "Link" button type', 'ff_shortcodes' ),
|
54 |
+
),
|
55 |
+
array(
|
56 |
+
'type' => 'textfield',
|
57 |
+
'name' => 'id',
|
58 |
+
'label' => esc_html__( 'Button ID', 'ff_shortcodes' ),
|
59 |
+
'value' => 'ff-btn-' . uniqid(),
|
60 |
+
),
|
61 |
+
)
|
62 |
+
),
|
63 |
+
'style' => array(
|
64 |
+
'tab_title' => esc_html__( 'Style', 'ff_shortcodes' ),
|
65 |
+
'fields' => array(
|
66 |
+
array(
|
67 |
+
'type' => 'dropdown',
|
68 |
+
'name' => 'size',
|
69 |
+
'label' => esc_html__( 'Size', 'ff_shortcodes' ),
|
70 |
+
'value' => array(
|
71 |
+
'mini' => esc_html__( 'Mini', 'ff_shortcodes' ),
|
72 |
+
'small' => esc_html__( 'Small', 'ff_shortcodes' ),
|
73 |
+
'large' => esc_html__( 'Large', 'ff_shortcodes' ),
|
74 |
+
'extra-large' => esc_html__( 'Extra Large', 'ff_shortcodes' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
),
|
76 |
+
),
|
77 |
+
array(
|
78 |
+
'type' => 'dropdown',
|
79 |
+
'name' => 'color',
|
80 |
+
'label' => esc_html__( 'Color', 'ff_shortcodes' ),
|
81 |
+
'value' => array(
|
82 |
+
'default' => esc_html__( 'Default', 'ff_shortcodes' ),
|
83 |
+
'primary' => esc_html__( 'Primary', 'ff_shortcodes' ),
|
84 |
+
'info' => esc_html__( 'Info', 'ff_shortcodes' ),
|
85 |
+
'success' => esc_html__( 'Success', 'ff_shortcodes' ),
|
86 |
+
'secondary' => esc_html__( 'Secondary', 'ff_shortcodes' ),
|
87 |
+
'warning' => esc_html__( 'Warning', 'ff_shortcodes' ),
|
88 |
+
'danger' => esc_html__( 'Danger', 'ff_shortcodes' ),
|
89 |
+
'inverse' => esc_html__( 'Inverse', 'ff_shortcodes' ),
|
90 |
),
|
91 |
+
),
|
92 |
+
array(
|
93 |
+
'type' => 'color_picker',
|
94 |
+
'name' => 'text_color',
|
95 |
+
'label' => esc_html__( 'Text Color', 'ff_shortcodes' ),
|
96 |
+
'value' => '#fff',
|
97 |
+
),
|
98 |
+
array(
|
99 |
+
'type' => 'color_picker',
|
100 |
+
'name' => 'background_color',
|
101 |
+
'label' => esc_html__( 'Background Color', 'ff_shortcodes' ),
|
102 |
+
),
|
103 |
+
array(
|
104 |
+
'type' => 'color_picker',
|
105 |
+
'name' => 'border_color',
|
106 |
+
'label' => esc_html__( 'Border Color', 'ff_shortcodes' ),
|
107 |
+
),
|
108 |
+
array(
|
109 |
+
'type' => 'radio',
|
110 |
+
'name' => 'style',
|
111 |
+
'label' => esc_html__( 'Style', 'ff_shortcodes' ),
|
112 |
+
'value' => array(
|
113 |
+
'default' => esc_html__( 'Filled', 'ff_shortcodes' ),
|
114 |
+
'outline' => esc_html__( 'Outline', 'ff_shortcodes' ),
|
115 |
),
|
116 |
+
),
|
117 |
+
array(
|
118 |
+
'type' => 'text_unit',
|
119 |
+
'name' => 'radius',
|
120 |
+
'label' => esc_html__( 'Border Radius', 'ff_shortcodes' ),
|
121 |
+
'unit' => 'px',
|
122 |
+
'value' => '4',
|
123 |
+
),
|
124 |
+
array(
|
125 |
+
'type' => 'dropdown',
|
126 |
+
'name' => 'type',
|
127 |
+
'label' => esc_html__( 'Type', 'ff_shortcodes' ),
|
128 |
+
'value' => array(
|
129 |
+
'button' => esc_html__( 'Button', 'ff_shortcodes' ),
|
130 |
+
'link' => esc_html__( 'Link', 'ff_shortcodes' ),
|
131 |
+
'input' => esc_html__( 'Input', 'ff_shortcodes' ),
|
132 |
+
'submit' => esc_html__( 'Submit', 'ff_shortcodes' ),
|
133 |
),
|
134 |
+
),
|
135 |
+
array(
|
136 |
+
'type' => 'dropdown',
|
137 |
+
'name' => 'state',
|
138 |
+
'label' => esc_html__( 'State', 'ff_shortcodes' ),
|
139 |
+
'value' => array(
|
140 |
+
'active' => esc_html__( 'Active', 'ff_shortcodes' ),
|
141 |
+
'disabled' => esc_html__( 'Disabled', 'ff_shortcodes' ),
|
142 |
),
|
143 |
+
),
|
144 |
+
|
145 |
)
|
146 |
+
)
|
147 |
+
);
|
148 |
+
// config can be extended with common tabs
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_btn/init.php
CHANGED
@@ -1,50 +1,57 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
});
|
39 |
-
|
40 |
-
return apply_filters( 'fruitful_btn_shortcode', FF_SHORTCODES()->view->load(
|
41 |
-
FF_SHORTCODES()->shortcodes_dir . '/' . 'fruitful_btn/view', [
|
42 |
-
'atts' => $atts,
|
43 |
-
'content' => $content
|
44 |
-
], false, true ) );
|
45 |
-
|
46 |
}
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
49 |
|
50 |
-
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
/**
|
4 |
+
* Display button shortcode on a front-end part
|
5 |
+
**/
|
6 |
+
|
7 |
+
if ( ! function_exists( 'display_fruitful_btn_shortcode' ) ) {
|
8 |
+
|
9 |
+
function display_fruitful_btn_shortcode( $atts, $content ) {
|
10 |
+
|
11 |
+
$default_atts = [
|
12 |
+
'id' => '',
|
13 |
+
'link' => '',
|
14 |
+
'target' => '_self',
|
15 |
+
'icon' => '',
|
16 |
+
'icon_position' => 'right',
|
17 |
+
'size' => 'mini',
|
18 |
+
'color' => 'default',
|
19 |
+
'style' => 'default',
|
20 |
+
'radius' => 2,
|
21 |
+
'type' => 'button',
|
22 |
+
'state' => 'active',
|
23 |
+
'text_color' => '',
|
24 |
+
'background_color' => '',
|
25 |
+
'border_color' => '',
|
26 |
+
];
|
27 |
+
|
28 |
+
$default_atts = apply_filters( 'ff_shortcodes_shortcode_default_atts', $default_atts );
|
29 |
+
$atts = shortcode_atts( $default_atts, $atts, 'fruitful_btn' );
|
30 |
+
|
31 |
+
wp_enqueue_style( 'font-awesome' );
|
32 |
+
wp_enqueue_style( 'ff-fruitful_btn' );
|
33 |
+
|
34 |
+
$custom_css = '';
|
35 |
+
|
36 |
+
if ( $atts['radius'] <> '' ) {
|
37 |
+
$custom_css .= '#' . $atts['id'] . ' { border-radius: ' . absint( $atts['radius'] ) . 'px; }';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
}
|
39 |
|
40 |
+
/** pring custom CSS **/
|
41 |
+
add_action( 'ff_shortcodes_print_custom_styles', function () use ( $custom_css ) {
|
42 |
+
echo $custom_css;
|
43 |
+
} );
|
44 |
+
|
45 |
+
do_action( 'ff_shortcodes_shortcode_before_view_load', $atts, $content );
|
46 |
+
|
47 |
+
return apply_filters( 'fruitful_btn_shortcode', FF_SHORTCODES()->view->load(
|
48 |
+
FF_SHORTCODES()->shortcodes_dir . '/' . 'fruitful_btn/view', [
|
49 |
+
'atts' => $atts,
|
50 |
+
'content' => $content
|
51 |
+
], false, true ) );
|
52 |
+
|
53 |
}
|
54 |
|
55 |
+
}
|
56 |
+
|
57 |
+
add_shortcode( 'fruitful_btn', 'display_fruitful_btn_shortcode' );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_btn/modal.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
-
|
7 |
|
8 |
-
|
9 |
-
|
1 |
<?php
|
2 |
|
3 |
+
use ffshortcodes\helper\admin_options;
|
4 |
|
5 |
+
// get config
|
6 |
+
require 'config.php';
|
7 |
|
8 |
+
// print shortcode form
|
9 |
+
admin_options::print_form( $cfg );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_btn/view.php
CHANGED
@@ -5,6 +5,7 @@
|
|
5 |
$attributes = $classes = array();
|
6 |
|
7 |
$classes[] = 'ff';
|
|
|
8 |
$classes[] = 'fruitful_btn';
|
9 |
$classes[] = 'ff-type-' . $atts['type'];
|
10 |
|
@@ -39,10 +40,25 @@
|
|
39 |
|
40 |
$attributes[] = 'class="' . implode( ' ', $classes ) . '"';
|
41 |
|
|
|
42 |
if (!empty($atts['text_color'])) {
|
43 |
-
|
|
|
44 |
}
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
?>
|
47 |
|
48 |
<?php if( $atts['type'] == 'link' || $atts['type'] == 'button' ): ?>
|
@@ -57,4 +73,4 @@
|
|
57 |
</a>
|
58 |
<?php else: ?>
|
59 |
<input <?php echo implode( ' ', $attributes ); ?>>
|
60 |
-
<?php endif;
|
5 |
$attributes = $classes = array();
|
6 |
|
7 |
$classes[] = 'ff';
|
8 |
+
$classes[] = 'ff-root';
|
9 |
$classes[] = 'fruitful_btn';
|
10 |
$classes[] = 'ff-type-' . $atts['type'];
|
11 |
|
40 |
|
41 |
$attributes[] = 'class="' . implode( ' ', $classes ) . '"';
|
42 |
|
43 |
+
$color = '';
|
44 |
if (!empty($atts['text_color'])) {
|
45 |
+
|
46 |
+
$color = 'color:' . esc_attr($atts['text_color']) . ';';
|
47 |
}
|
48 |
|
49 |
+
$bg_color = '';
|
50 |
+
if(!empty($atts['background_color'])) {
|
51 |
+
$bg_color = 'background-color:' . esc_attr($atts['background_color']). ';';
|
52 |
+
}
|
53 |
+
$border_color = '';
|
54 |
+
if(!empty($atts['border_color'])) {
|
55 |
+
$border_color = 'border-color:' . esc_attr($atts['border_color']). ';';
|
56 |
+
}
|
57 |
+
|
58 |
+
$attributes[] = "style='{$color}{$bg_color}{$border_color}'";
|
59 |
+
|
60 |
+
$attributes = apply_filters( 'ff_shortcodes_shortcode_wrap_attrs', $attributes, $data );
|
61 |
+
|
62 |
?>
|
63 |
|
64 |
<?php if( $atts['type'] == 'link' || $atts['type'] == 'button' ): ?>
|
73 |
</a>
|
74 |
<?php else: ?>
|
75 |
<input <?php echo implode( ' ', $attributes ); ?>>
|
76 |
+
<?php endif;
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_dbox/config.php
CHANGED
@@ -1,51 +1,56 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
14 |
array(
|
15 |
-
'type'
|
16 |
-
'name'
|
17 |
-
'label' => esc_html__( 'Small Heading', 'ff_shortcodes'),
|
18 |
),
|
19 |
array(
|
20 |
-
'type'
|
21 |
-
'name'
|
22 |
-
'label' => esc_html__( 'Heading', 'ff_shortcodes'),
|
23 |
),
|
24 |
array(
|
25 |
-
'type'
|
26 |
-
'name'
|
27 |
-
'label' => esc_html__( 'Text', 'ff_shortcodes'),
|
28 |
-
'value' => esc_html__( 'Hello, world! This is Fruitful Shortcodes plugin.', 'ff_shortcodes'),
|
29 |
),
|
30 |
array(
|
31 |
-
'type'
|
32 |
-
'name'
|
33 |
-
'label' => esc_html__( 'Button title', 'ff_shortcodes'),
|
34 |
),
|
35 |
array(
|
36 |
-
'type'
|
37 |
-
'name'
|
38 |
-
'label' => esc_html__( 'Button link', 'ff_shortcodes'),
|
39 |
),
|
40 |
array(
|
41 |
-
'type'
|
42 |
-
'name'
|
43 |
-
'label' => esc_html__( 'Block style', 'ff_shortcodes'),
|
44 |
'value' => array(
|
45 |
-
'style-1' => esc_html__( 'Style 1', 'ff_shortcodes'),
|
46 |
-
'style-2' => esc_html__( 'Style 2', 'ff_shortcodes'),
|
47 |
-
'style-3' => esc_html__( 'Style 3', 'ff_shortcodes'),
|
48 |
),
|
49 |
),
|
50 |
-
)
|
51 |
-
)
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
/**
|
4 |
+
* This file used to build a form
|
5 |
+
* in a modal window
|
6 |
+
* The config is an array with form options / control types
|
7 |
+
**/
|
8 |
|
9 |
+
$cfg = array(
|
10 |
+
'title' => esc_html__( 'Promo Text', 'ff_shortcodes' ),
|
11 |
+
'desc' => esc_html__( 'Add promo text box', 'ff_shortcodes' ),
|
12 |
+
'shortcode' => 'fruitful_dbox',
|
13 |
+
'tabs' => true,
|
14 |
+
'general' => array(
|
15 |
+
'tab_title' => esc_html__( 'General', 'ff_shortcodes' ),
|
16 |
+
'fields' => array(
|
17 |
array(
|
18 |
+
'type' => 'textfield',
|
19 |
+
'name' => 'small_heading',
|
20 |
+
'label' => esc_html__( 'Small Heading', 'ff_shortcodes' ),
|
21 |
),
|
22 |
array(
|
23 |
+
'type' => 'textfield',
|
24 |
+
'name' => 'heading',
|
25 |
+
'label' => esc_html__( 'Heading', 'ff_shortcodes' ),
|
26 |
),
|
27 |
array(
|
28 |
+
'type' => 'textarea',
|
29 |
+
'name' => 'content',
|
30 |
+
'label' => esc_html__( 'Text', 'ff_shortcodes' ),
|
31 |
+
'value' => esc_html__( 'Hello, world! This is Fruitful Shortcodes plugin.', 'ff_shortcodes' ),
|
32 |
),
|
33 |
array(
|
34 |
+
'type' => 'textfield',
|
35 |
+
'name' => 'button_title',
|
36 |
+
'label' => esc_html__( 'Button title', 'ff_shortcodes' ),
|
37 |
),
|
38 |
array(
|
39 |
+
'type' => 'textfield',
|
40 |
+
'name' => 'button_link',
|
41 |
+
'label' => esc_html__( 'Button link', 'ff_shortcodes' ),
|
42 |
),
|
43 |
array(
|
44 |
+
'type' => 'dropdown',
|
45 |
+
'name' => 'style',
|
46 |
+
'label' => esc_html__( 'Block style', 'ff_shortcodes' ),
|
47 |
'value' => array(
|
48 |
+
'style-1' => esc_html__( 'Style 1', 'ff_shortcodes' ),
|
49 |
+
'style-2' => esc_html__( 'Style 2', 'ff_shortcodes' ),
|
50 |
+
'style-3' => esc_html__( 'Style 3', 'ff_shortcodes' ),
|
51 |
),
|
52 |
),
|
53 |
+
),
|
54 |
+
)
|
55 |
+
);
|
56 |
+
// config can be extended with common tabs
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_dbox/init.php
CHANGED
@@ -1,31 +1,37 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
|
|
29 |
}
|
|
|
|
|
30 |
|
31 |
-
|
1 |
<?php
|
2 |
|
3 |
+
/**
|
4 |
+
* Display dbox shortcode on a front-end part
|
5 |
+
**/
|
6 |
+
|
7 |
+
if ( ! function_exists( 'display_fruitful_dbox_shortcode' ) ) {
|
8 |
+
|
9 |
+
function display_fruitful_dbox_shortcode( $atts, $content ) {
|
10 |
+
|
11 |
+
$default_atts = [
|
12 |
+
'small_heading' => '',
|
13 |
+
'heading' => '',
|
14 |
+
'button_title' => '',
|
15 |
+
'button_link' => '',
|
16 |
+
'style' => 'style-1'
|
17 |
+
];
|
18 |
+
|
19 |
+
$default_atts = apply_filters( 'ff_shortcodes_shortcode_default_atts', $default_atts );
|
20 |
+
$atts = shortcode_atts( $default_atts, $atts, 'fruitful_dbox' );
|
21 |
+
|
22 |
+
wp_enqueue_style( 'ff-fruitful_dbox' );
|
23 |
+
|
24 |
+
|
25 |
+
do_action( 'ff_shortcodes_shortcode_before_view_load', $atts, $content );
|
26 |
+
|
27 |
+
return apply_filters( 'fruitful_dbox_shortcode', FF_SHORTCODES()->view->load(
|
28 |
+
FF_SHORTCODES()->shortcodes_dir . '/' . 'fruitful_dbox/view', [
|
29 |
+
'atts' => $atts,
|
30 |
+
'content' => $content
|
31 |
+
], false, true ) );
|
32 |
+
|
33 |
}
|
34 |
+
|
35 |
+
}
|
36 |
|
37 |
+
add_shortcode( 'fruitful_dbox', 'display_fruitful_dbox_shortcode' );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_dbox/modal.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
-
|
7 |
|
8 |
-
|
9 |
-
|
1 |
<?php
|
2 |
|
3 |
+
use ffshortcodes\helper\admin_options;
|
4 |
|
5 |
+
// get config
|
6 |
+
require 'config.php';
|
7 |
|
8 |
+
// print shortcode form
|
9 |
+
admin_options::print_form( $cfg );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_dbox/view.php
CHANGED
@@ -1,28 +1,31 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
|
5 |
-
|
6 |
|
7 |
-
|
8 |
-
|
|
|
9 |
|
10 |
-
|
11 |
|
12 |
-
|
13 |
-
<div <?php echo implode( $attributes ); ?>>
|
14 |
|
15 |
-
|
|
|
|
|
|
|
16 |
<h4><?php echo $atts['small_heading']; ?></h4>
|
17 |
<?php endif; ?>
|
18 |
-
|
19 |
-
<?php if( $atts['heading'] <> '' ): ?>
|
20 |
<h2><?php echo $atts['heading']; ?></h2>
|
21 |
<?php endif; ?>
|
22 |
-
|
23 |
<?php echo apply_filters( 'the_content', $content ); ?>
|
24 |
-
|
25 |
-
<?php if( $atts['button_title'] <> '' ): ?>
|
26 |
<a href="<?php echo $atts['button_link']; ?>" class="dbox-btn"><?php echo $atts['button_title']; ?></a>
|
27 |
<?php endif; ?>
|
28 |
|
1 |
<?php
|
2 |
+
$atts = $data['atts'];
|
3 |
+
$content = $data['content'];
|
4 |
|
5 |
+
$attributes = $classes = array();
|
6 |
|
7 |
+
$classes[] = 'ff-root';
|
8 |
+
$classes[] = 'ff fruitful_dbox';
|
9 |
+
$classes[] = 'ff-' . $atts['style'];
|
10 |
|
11 |
+
$attributes[] = 'class="' . implode( ' ', $classes ) . '"';
|
12 |
|
13 |
+
$attributes = apply_filters( 'ff_shortcodes_shortcode_wrap_attrs', $attributes, $data );
|
|
|
14 |
|
15 |
+
?>
|
16 |
+
<div <?php echo implode( ' ', $attributes ); ?>>
|
17 |
+
|
18 |
+
<?php if ( $atts['small_heading'] <> '' ): ?>
|
19 |
<h4><?php echo $atts['small_heading']; ?></h4>
|
20 |
<?php endif; ?>
|
21 |
+
|
22 |
+
<?php if ( $atts['heading'] <> '' ): ?>
|
23 |
<h2><?php echo $atts['heading']; ?></h2>
|
24 |
<?php endif; ?>
|
25 |
+
|
26 |
<?php echo apply_filters( 'the_content', $content ); ?>
|
27 |
+
|
28 |
+
<?php if ( $atts['button_title'] <> '' ): ?>
|
29 |
<a href="<?php echo $atts['button_link']; ?>" class="dbox-btn"><?php echo $atts['button_title']; ?></a>
|
30 |
<?php endif; ?>
|
31 |
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_ibox/view.php
CHANGED
@@ -27,7 +27,6 @@
|
|
27 |
$attributes = $classes = array();
|
28 |
|
29 |
$classes[] = 'ff-col-md-' . $col;
|
30 |
-
|
31 |
$classes[] = 'ff-col-elem';
|
32 |
|
33 |
if( $atts['column'] == 'ffs-five-one' ) {
|
@@ -50,7 +49,7 @@
|
|
50 |
|
51 |
|
52 |
?>
|
53 |
-
<div <?php echo implode( $attributes ); ?>>
|
54 |
|
55 |
<div class="ffs-info-box <?php echo $icon_position; ?>">
|
56 |
<div class="ffs-icon-box">
|
27 |
$attributes = $classes = array();
|
28 |
|
29 |
$classes[] = 'ff-col-md-' . $col;
|
|
|
30 |
$classes[] = 'ff-col-elem';
|
31 |
|
32 |
if( $atts['column'] == 'ffs-five-one' ) {
|
49 |
|
50 |
|
51 |
?>
|
52 |
+
<div <?php echo implode( ' ', $attributes ); ?>>
|
53 |
|
54 |
<div class="ffs-info-box <?php echo $icon_position; ?>">
|
55 |
<div class="ffs-icon-box">
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_ibox_row/config.php
CHANGED
@@ -1,103 +1,108 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
14 |
array(
|
15 |
-
'type'
|
16 |
-
'count'
|
17 |
'shortcode' => 'fruitful_ibox',
|
18 |
-
'row_title' => esc_html__( 'Column', 'ff_shortcodes'),
|
19 |
-
'fields'
|
20 |
-
|
21 |
array(
|
22 |
-
'type'
|
23 |
-
'name'
|
24 |
-
'label' => esc_html__( 'Column width', 'ff_shortcodes'),
|
25 |
'value' => array(
|
26 |
-
'ffs-two-one'
|
27 |
-
'ffs-three-one'
|
28 |
-
'ffs-three-two'
|
29 |
-
'ffs-four-one'
|
30 |
-
'ffs-four-three' => esc_html__( '3/4', 'ff_shortcodes'),
|
31 |
-
'ffs-five-one'
|
32 |
),
|
33 |
),
|
34 |
array(
|
35 |
-
'type'
|
36 |
-
'name'
|
37 |
-
'label' => esc_html__( 'Column image', 'ff_shortcodes_pro'),
|
38 |
),
|
39 |
-
array(
|
40 |
-
'type' => 'textfield',
|
41 |
-
'name' => 'icon',
|
42 |
-
'css_classes' => array(
|
43 |
-
'ff-row-title'
|
44 |
-
),
|
45 |
-
'label' => esc_html__( 'Icon', 'ff_shortcodes'),
|
46 |
-
'value' => 'fa-check-square-o',
|
47 |
-
),
|
48 |
array(
|
49 |
-
'type'
|
50 |
-
'name'
|
51 |
'css_classes' => array(
|
52 |
'ff-row-title'
|
53 |
),
|
54 |
-
'label'
|
55 |
-
'value'
|
56 |
),
|
57 |
array(
|
58 |
-
'type'
|
59 |
-
'name'
|
60 |
-
'
|
61 |
-
|
|
|
|
|
|
|
62 |
),
|
63 |
array(
|
64 |
-
'type'
|
65 |
-
'name'
|
66 |
-
'label' => esc_html__( '
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
'value' => array(
|
68 |
-
'center' => esc_html__( 'Center', 'ff_shortcodes'),
|
69 |
-
'left'
|
70 |
-
'right'
|
71 |
),
|
72 |
),
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
),
|
101 |
),
|
102 |
)
|
103 |
-
)
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
/**
|
4 |
+
* This file used to build a form
|
5 |
+
* in modal window
|
6 |
+
* config is an array with form options
|
7 |
+
**/
|
8 |
|
9 |
+
$cfg = array(
|
10 |
+
'title' => esc_html__( 'Columns', 'ff_shortcodes' ),
|
11 |
+
'desc' => esc_html__( 'Add columns grid', 'ff_shortcodes' ),
|
12 |
+
'shortcode' => 'fruitful_ibox_row',
|
13 |
+
'tabs' => true,
|
14 |
+
'general' => array(
|
15 |
+
'tab_title' => esc_html__( 'General', 'ff_shortcodes' ),
|
16 |
+
'fields' => array(
|
17 |
array(
|
18 |
+
'type' => 'dynamic',
|
19 |
+
'count' => 2,
|
20 |
'shortcode' => 'fruitful_ibox',
|
21 |
+
'row_title' => esc_html__( 'Column', 'ff_shortcodes' ),
|
22 |
+
'fields' => array(
|
23 |
+
|
24 |
array(
|
25 |
+
'type' => 'dropdown',
|
26 |
+
'name' => 'column',
|
27 |
+
'label' => esc_html__( 'Column width', 'ff_shortcodes' ),
|
28 |
'value' => array(
|
29 |
+
'ffs-two-one' => esc_html__( '1/2', 'ff_shortcodes' ),
|
30 |
+
'ffs-three-one' => esc_html__( '1/3', 'ff_shortcodes' ),
|
31 |
+
'ffs-three-two' => esc_html__( '2/3', 'ff_shortcodes' ),
|
32 |
+
'ffs-four-one' => esc_html__( '1/4', 'ff_shortcodes' ),
|
33 |
+
'ffs-four-three' => esc_html__( '3/4', 'ff_shortcodes' ),
|
34 |
+
'ffs-five-one' => esc_html__( '1/5', 'ff_shortcodes' ),
|
35 |
),
|
36 |
),
|
37 |
array(
|
38 |
+
'type' => 'image',
|
39 |
+
'name' => 'image',
|
40 |
+
'label' => esc_html__( 'Column image', 'ff_shortcodes_pro' ),
|
41 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
array(
|
43 |
+
'type' => 'textfield',
|
44 |
+
'name' => 'icon',
|
45 |
'css_classes' => array(
|
46 |
'ff-row-title'
|
47 |
),
|
48 |
+
'label' => esc_html__( 'Icon', 'ff_shortcodes' ),
|
49 |
+
'value' => 'fa-check-square-o',
|
50 |
),
|
51 |
array(
|
52 |
+
'type' => 'textfield',
|
53 |
+
'name' => 'title',
|
54 |
+
'css_classes' => array(
|
55 |
+
'ff-row-title'
|
56 |
+
),
|
57 |
+
'label' => esc_html__( 'Column title', 'ff_shortcodes' ),
|
58 |
+
'value' => esc_html__( 'Column', 'ff_shortcodes' ),
|
59 |
),
|
60 |
array(
|
61 |
+
'type' => 'textarea',
|
62 |
+
'name' => 'content',
|
63 |
+
'label' => esc_html__( 'Column content', 'ff_shortcodes' ),
|
64 |
+
'value' => esc_html__( 'Type here your text inside column', 'ff_shortcodes' ),
|
65 |
+
),
|
66 |
+
array(
|
67 |
+
'type' => 'dropdown',
|
68 |
+
'name' => 'align',
|
69 |
+
'label' => esc_html__( 'Content align', 'ff_shortcodes' ),
|
70 |
'value' => array(
|
71 |
+
'center' => esc_html__( 'Center', 'ff_shortcodes' ),
|
72 |
+
'left' => esc_html__( 'Left', 'ff_shortcodes' ),
|
73 |
+
'right' => esc_html__( 'Right', 'ff_shortcodes' ),
|
74 |
),
|
75 |
),
|
76 |
+
|
77 |
+
array(
|
78 |
+
'type' => 'dropdown',
|
79 |
+
'name' => 'icon_position ',
|
80 |
+
'label' => esc_html__( 'Icon position', 'ff_shortcodes' ),
|
81 |
+
'value' => array(
|
82 |
+
'center' => esc_html__( 'Center', 'ff_shortcodes' ),
|
83 |
+
'left' => esc_html__( 'Left', 'ff_shortcodes' ),
|
84 |
+
'right' => esc_html__( 'Right', 'ff_shortcodes' ),
|
85 |
+
),
|
86 |
+
),
|
87 |
+
array(
|
88 |
+
'type' => 'textfield',
|
89 |
+
'name' => 'styleicon',
|
90 |
+
'label' => esc_html__( 'Icon styles', 'ff_shortcodes' ),
|
91 |
+
),
|
92 |
+
array(
|
93 |
+
'type' => 'textfield',
|
94 |
+
'name' => 'styletitle',
|
95 |
+
'label' => esc_html__( 'Title styles', 'ff_shortcodes' ),
|
96 |
+
),
|
97 |
+
array(
|
98 |
+
'type' => 'textfield',
|
99 |
+
'name' => 'styletext',
|
100 |
+
'label' => esc_html__( 'Text styles', 'ff_shortcodes' ),
|
101 |
+
),
|
102 |
+
|
103 |
),
|
104 |
),
|
105 |
)
|
106 |
+
),
|
107 |
+
);
|
108 |
+
// config can be extended with common tabs
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_ibox_row/init.php
CHANGED
@@ -1,19 +1,25 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
}
|
|
|
|
|
18 |
|
19 |
-
|
1 |
<?php
|
2 |
|
3 |
+
if ( ! function_exists( 'display_fruitful_ibox_row_shortcode' ) ) {
|
4 |
+
|
5 |
+
function display_fruitful_ibox_row_shortcode( $atts, $content ) {
|
6 |
+
|
7 |
+
$default_atts = [];
|
8 |
+
$default_atts = apply_filters( 'ff_shortcodes_shortcode_default_atts', $default_atts );
|
9 |
+
$atts = shortcode_atts( $default_atts, $atts, 'fruitful_ibox_row' );
|
10 |
+
|
11 |
+
wp_enqueue_style( 'ff-shortcodes-grid' );
|
12 |
+
|
13 |
+
do_action( 'ff_shortcodes_shortcode_before_view_load', $atts, $content );
|
14 |
+
|
15 |
+
return apply_filters( 'fruitful_ibox_row_shortcode', FF_SHORTCODES()->view->load(
|
16 |
+
FF_SHORTCODES()->shortcodes_dir . '/' . 'fruitful_ibox_row/view', [
|
17 |
+
'atts' => $atts,
|
18 |
+
'content' => $content
|
19 |
+
], false, true ) );
|
20 |
+
|
21 |
}
|
22 |
+
|
23 |
+
}
|
24 |
|
25 |
+
add_shortcode( 'fruitful_ibox_row', 'display_fruitful_ibox_row_shortcode' );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_ibox_row/modal.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
-
|
7 |
|
8 |
-
|
9 |
-
|
1 |
<?php
|
2 |
|
3 |
+
use ffshortcodes\helper\admin_options;
|
4 |
|
5 |
+
// get config
|
6 |
+
require 'config.php';
|
7 |
|
8 |
+
// print shortcode form
|
9 |
+
admin_options::print_form( $cfg );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_ibox_row/view.php
CHANGED
@@ -1,7 +1,18 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
?>
|
4 |
-
<div
|
5 |
<div class="ff-container-fluid">
|
6 |
<div class="ff-row">
|
7 |
<?php echo do_shortcode( $content ); ?>
|
1 |
<?php
|
2 |
+
|
3 |
+
$atts = $data['atts'];
|
4 |
+
$content = $data['content'];
|
5 |
+
|
6 |
+
$attributes = $classes = array();
|
7 |
+
|
8 |
+
$classes[] = 'ff';
|
9 |
+
$classes[] = 'ff-root';
|
10 |
+
$attributes[] = 'class="' . implode( ' ', $classes ) . '"';
|
11 |
+
|
12 |
+
$attributes = apply_filters( 'ff_shortcodes_shortcode_wrap_attrs', $attributes, $data );
|
13 |
+
|
14 |
?>
|
15 |
+
<div <?php echo implode( ' ', $attributes ); ?>>
|
16 |
<div class="ff-container-fluid">
|
17 |
<div class="ff-row">
|
18 |
<?php echo do_shortcode( $content ); ?>
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_pbar/config.php
CHANGED
@@ -1,61 +1,67 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
14 |
array(
|
15 |
-
'type'
|
16 |
-
'count'
|
17 |
'shortcode' => 'fruitful_bar',
|
18 |
-
'row_title' => esc_html__( 'Progress bar', 'ff_shortcodes'),
|
|
|
19 |
'fields' => array(
|
20 |
-
|
21 |
array(
|
22 |
-
'type'
|
23 |
-
'name'
|
24 |
-
'label' => esc_html__( 'Bar title', 'ff_shortcodes'),
|
25 |
-
'value' => esc_html__( 'My title', 'ff_shortcodes'),
|
26 |
),
|
27 |
array(
|
28 |
-
'type'
|
29 |
-
'name'
|
30 |
-
'label' => esc_html__( 'Bar width', 'ff_shortcodes'),
|
31 |
-
'unit'
|
32 |
'value' => '70',
|
33 |
),
|
34 |
array(
|
35 |
-
'type'
|
36 |
-
'name'
|
37 |
-
'label' => esc_html__( 'Bar type', 'ff_shortcodes'),
|
38 |
'value' => array(
|
39 |
-
'success' => esc_html__( 'Success', 'ff_shortcodes'),
|
40 |
-
'info'
|
41 |
-
'warning' => esc_html__( 'Warning', 'ff_shortcodes'),
|
42 |
-
'danger'
|
43 |
),
|
44 |
),
|
45 |
array(
|
46 |
-
'type'
|
47 |
-
'name'
|
48 |
-
'label' => esc_html__( 'Icon', 'ff_shortcodes'),
|
49 |
),
|
50 |
array(
|
51 |
-
'type'
|
52 |
-
'name'
|
53 |
'default' => 'off',
|
54 |
-
'label'
|
55 |
),
|
56 |
-
|
57 |
),
|
58 |
),
|
59 |
-
)
|
|
|
60 |
|
61 |
-
|
|
1 |
<?php
|
2 |
|
3 |
+
/**
|
4 |
+
* This file used to build a form
|
5 |
+
* in a modal window
|
6 |
+
* The config is an array with form options / control types
|
7 |
+
**/
|
8 |
|
9 |
+
$cfg = array(
|
10 |
+
'title' => esc_html__( 'Progress bar', 'ff_shortcodes' ),
|
11 |
+
'desc' => esc_html__( 'Add progress bar', 'ff_shortcodes' ),
|
12 |
+
'shortcode' => 'fruitful_pbar',
|
13 |
+
'tabs' => true,
|
14 |
+
'general' => array(
|
15 |
+
'tab_title' => esc_html__( 'General', 'ff_shortcodes' ),
|
16 |
+
'fields' => array(
|
17 |
array(
|
18 |
+
'type' => 'dynamic',
|
19 |
+
'count' => 3,
|
20 |
'shortcode' => 'fruitful_bar',
|
21 |
+
'row_title' => esc_html__( 'Progress bar', 'ff_shortcodes' ),
|
22 |
+
|
23 |
'fields' => array(
|
24 |
+
|
25 |
array(
|
26 |
+
'type' => 'textfield',
|
27 |
+
'name' => 'title',
|
28 |
+
'label' => esc_html__( 'Bar title', 'ff_shortcodes' ),
|
29 |
+
'value' => esc_html__( 'My title', 'ff_shortcodes' ),
|
30 |
),
|
31 |
array(
|
32 |
+
'type' => 'text_unit',
|
33 |
+
'name' => 'width',
|
34 |
+
'label' => esc_html__( 'Bar width', 'ff_shortcodes' ),
|
35 |
+
'unit' => '%',
|
36 |
'value' => '70',
|
37 |
),
|
38 |
array(
|
39 |
+
'type' => 'dropdown',
|
40 |
+
'name' => 'type',
|
41 |
+
'label' => esc_html__( 'Bar type', 'ff_shortcodes' ),
|
42 |
'value' => array(
|
43 |
+
'success' => esc_html__( 'Success', 'ff_shortcodes' ),
|
44 |
+
'info' => esc_html__( 'Info', 'ff_shortcodes' ),
|
45 |
+
'warning' => esc_html__( 'Warning', 'ff_shortcodes' ),
|
46 |
+
'danger' => esc_html__( 'Danger', 'ff_shortcodes' ),
|
47 |
),
|
48 |
),
|
49 |
array(
|
50 |
+
'type' => 'icon_picker',
|
51 |
+
'name' => 'icon',
|
52 |
+
'label' => esc_html__( 'Icon', 'ff_shortcodes' ),
|
53 |
),
|
54 |
array(
|
55 |
+
'type' => 'switcher',
|
56 |
+
'name' => 'striped',
|
57 |
'default' => 'off',
|
58 |
+
'label' => esc_html__( 'Stripped', 'ff_shortcodes' ),
|
59 |
),
|
60 |
+
|
61 |
),
|
62 |
),
|
63 |
+
),
|
64 |
+
)
|
65 |
|
66 |
+
);
|
67 |
+
// config can be extended with common tabs
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_pbar/init.php
CHANGED
@@ -1,17 +1,27 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
}
|
|
|
|
|
16 |
|
17 |
-
|
1 |
<?php
|
2 |
|
3 |
+
if ( ! function_exists( 'display_fruitful_pbar_shortcode' ) ) {
|
4 |
+
|
5 |
+
function display_fruitful_pbar_shortcode( $atts, $content ) {
|
6 |
+
|
7 |
+
$default_atts = [];
|
8 |
+
$default_atts = apply_filters( 'ff_shortcodes_shortcode_default_atts', $default_atts );
|
9 |
+
$atts = shortcode_atts( $default_atts, $atts, 'fruitful_ibox_row' );
|
10 |
+
|
11 |
+
wp_enqueue_style( 'font-awesome' );
|
12 |
+
wp_enqueue_style( 'ff-fruitful_pbar' );
|
13 |
+
wp_enqueue_script( 'wow' );
|
14 |
+
wp_enqueue_script( 'ff-fruitful_pbar' );
|
15 |
+
|
16 |
+
do_action( 'ff_shortcodes_shortcode_before_view_load', $atts, $content );
|
17 |
+
|
18 |
+
return apply_filters( 'fruitful_pbar_shortcode', FF_SHORTCODES()->view->load(
|
19 |
+
FF_SHORTCODES()->shortcodes_dir . '/' . 'fruitful_pbar/view', [
|
20 |
+
'atts' => $atts,
|
21 |
+
'content' => $content
|
22 |
+
], false, true ) );
|
23 |
}
|
24 |
+
|
25 |
+
}
|
26 |
|
27 |
+
add_shortcode( 'fruitful_pbar', 'display_fruitful_pbar_shortcode' );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_pbar/modal.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
-
|
7 |
|
8 |
-
|
9 |
-
|
1 |
<?php
|
2 |
|
3 |
+
use ffshortcodes\helper\admin_options;
|
4 |
|
5 |
+
// get config
|
6 |
+
require 'config.php';
|
7 |
|
8 |
+
// print shortcode form
|
9 |
+
admin_options::print_form( $cfg );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_pbar/view.php
CHANGED
@@ -1,7 +1,22 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<?php
|
3 |
global $ff_pbar_shortcode_delay;
|
4 |
$ff_pbar_shortcode_delay = 0.0;
|
5 |
-
echo do_shortcode( $
|
6 |
?>
|
7 |
</div>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$atts = $data['atts'];
|
4 |
+
$content = $data['content'];
|
5 |
+
|
6 |
+
$attributes = $classes = array();
|
7 |
+
|
8 |
+
$classes[] = 'ff-root';
|
9 |
+
$classes[] = 'fruitful_pbar';
|
10 |
+
$attributes[] = 'class="' . implode( ' ', $classes ) . '"';
|
11 |
+
|
12 |
+
$attributes = apply_filters( 'ff_shortcodes_shortcode_wrap_attrs', $attributes, $data );
|
13 |
+
|
14 |
+
?>
|
15 |
+
|
16 |
+
<div <?php echo implode( ' ', $attributes ); ?>>
|
17 |
<?php
|
18 |
global $ff_pbar_shortcode_delay;
|
19 |
$ff_pbar_shortcode_delay = 0.0;
|
20 |
+
echo do_shortcode( $content );
|
21 |
?>
|
22 |
</div>
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_recent_posts/config.php
CHANGED
@@ -1,120 +1,121 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
$cfg = array(
|
10 |
-
'title' => esc_html__( 'Recent posts', 'ff_shortcodes'),
|
11 |
-
'desc' => esc_html__( 'Add recent posts', 'ff_shortcodes'),
|
12 |
-
'shortcode' => 'fruitful_recent_posts',
|
13 |
-
'tabs' => true,
|
14 |
-
'query' => array(
|
15 |
-
'tab_title' => esc_html__( 'Query', 'ff_shortcodes'),
|
16 |
-
'fields' => array(
|
17 |
-
|
18 |
-
array(
|
19 |
-
'type' => 'textfield',
|
20 |
-
'name' => 'posts',
|
21 |
-
'label' => esc_html__( 'Posts count', 'ff_shortcodes'),
|
22 |
-
'value' => 4,
|
23 |
-
),
|
24 |
-
array(
|
25 |
-
'type' => 'textarea',
|
26 |
-
'name' => 'cat',
|
27 |
-
'label' => esc_html__( 'Categories', 'ff_shortcodes'),
|
28 |
-
'desc' => esc_html__( 'Explode multiple categories by comma', 'ff_shortcodes'),
|
29 |
-
'value' => '',
|
30 |
-
),
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
),
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
),
|
46 |
-
),
|
47 |
-
array(
|
48 |
-
'type' => 'dropdown',
|
49 |
-
'name' => 'cols',
|
50 |
-
'label' => esc_html__( 'Columns', 'ff_shortcodes'),
|
51 |
-
'value' => array(
|
52 |
-
'1' => esc_html__( 'One', 'ff_shortcodes'),
|
53 |
-
'2' => esc_html__( 'Two', 'ff_shortcodes'),
|
54 |
-
'3' => esc_html__( 'Three', 'ff_shortcodes'),
|
55 |
-
'4' => esc_html__( 'Four', 'ff_shortcodes'),
|
56 |
-
),
|
57 |
-
),
|
58 |
-
array(
|
59 |
-
'type' => 'switcher',
|
60 |
-
'name' => 'show_thumbs',
|
61 |
-
'default' => 'on',
|
62 |
-
'label' => esc_html__( 'Display thumbnails', 'ff_shortcodes'),
|
63 |
-
),
|
64 |
-
array(
|
65 |
-
'type' => 'text_unit',
|
66 |
-
'name' => 'thumb_width',
|
67 |
-
'label' => esc_html__( 'Thumbnail width', 'ff_shortcodes'),
|
68 |
-
'unit' => 'px',
|
69 |
-
'value' => '255',
|
70 |
-
),
|
71 |
-
array(
|
72 |
-
'type' => 'text_unit',
|
73 |
-
'name' => 'thumb_height',
|
74 |
-
'label' => esc_html__( 'Thumbnail height', 'ff_shortcodes'),
|
75 |
-
'unit' => 'px',
|
76 |
-
'value' => '240',
|
77 |
-
),
|
78 |
-
array(
|
79 |
-
'type' => 'text_unit',
|
80 |
-
'name' => 'thumb_radius',
|
81 |
-
'label' => esc_html__( 'Thumbnail border radius', 'ff_shortcodes'),
|
82 |
-
'unit' => 'px',
|
83 |
-
'value' => '4',
|
84 |
-
),
|
85 |
-
array(
|
86 |
-
'type' => 'switcher',
|
87 |
-
'name' => 'show_date',
|
88 |
-
'default' => 'on',
|
89 |
-
'label' => esc_html__( 'Display post date', 'ff_shortcodes'),
|
90 |
-
),
|
91 |
-
array(
|
92 |
-
'type' => 'switcher',
|
93 |
-
'name' => 'show_header',
|
94 |
-
'default' => 'on',
|
95 |
-
'label' => esc_html__( 'Display header', 'ff_shortcodes'),
|
96 |
-
),
|
97 |
-
array(
|
98 |
-
'type' => 'switcher',
|
99 |
-
'name' => 'show_excerpt',
|
100 |
-
'default' => 'on',
|
101 |
-
'label' => esc_html__( 'Display excerpt', 'ff_shortcodes'),
|
102 |
-
),
|
103 |
-
array(
|
104 |
-
'type' => 'text_unit',
|
105 |
-
'name' => 'excerpt_len',
|
106 |
-
'label' => esc_html__( 'Excerpt length', 'ff_shortcodes'),
|
107 |
-
'unit' => 'words',
|
108 |
-
'value' => '30',
|
109 |
),
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
115 |
),
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
/**
|
4 |
+
* This file used to build a form
|
5 |
+
* in modal window
|
6 |
+
* config is an array with form options
|
7 |
+
**/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
+
$cfg = array(
|
10 |
+
'title' => esc_html__( 'Recent posts', 'ff_shortcodes' ),
|
11 |
+
'desc' => esc_html__( 'Add recent posts', 'ff_shortcodes' ),
|
12 |
+
'shortcode' => 'fruitful_recent_posts',
|
13 |
+
'tabs' => true,
|
14 |
+
'query' => array(
|
15 |
+
'tab_title' => esc_html__( 'Query', 'ff_shortcodes' ),
|
16 |
+
'fields' => array(
|
17 |
+
|
18 |
+
array(
|
19 |
+
'type' => 'textfield',
|
20 |
+
'name' => 'posts',
|
21 |
+
'label' => esc_html__( 'Posts count', 'ff_shortcodes' ),
|
22 |
+
'value' => 4,
|
23 |
),
|
24 |
+
array(
|
25 |
+
'type' => 'textarea',
|
26 |
+
'name' => 'cat',
|
27 |
+
'label' => esc_html__( 'Categories', 'ff_shortcodes' ),
|
28 |
+
'desc' => esc_html__( 'Explode multiple categories by comma', 'ff_shortcodes' ),
|
29 |
+
'value' => '',
|
30 |
+
),
|
31 |
+
|
32 |
),
|
33 |
+
),
|
34 |
+
'style' => array(
|
35 |
+
'tab_title' => esc_html__( 'Style', 'ff_shortcodes' ),
|
36 |
+
'fields' => array(
|
37 |
+
|
38 |
+
array(
|
39 |
+
'type' => 'radio',
|
40 |
+
'name' => 'style',
|
41 |
+
'label' => esc_html__( 'Style', 'ff_shortcodes' ),
|
42 |
+
'value' => array(
|
43 |
+
'default' => esc_html__( 'Clean', 'ff_shortcodes' ),
|
44 |
+
'bordered' => esc_html__( 'Bordered', 'ff_shortcodes' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
),
|
46 |
+
),
|
47 |
+
array(
|
48 |
+
'type' => 'dropdown',
|
49 |
+
'name' => 'cols',
|
50 |
+
'label' => esc_html__( 'Columns', 'ff_shortcodes' ),
|
51 |
+
'value' => array(
|
52 |
+
'1' => esc_html__( 'One', 'ff_shortcodes' ),
|
53 |
+
'2' => esc_html__( 'Two', 'ff_shortcodes' ),
|
54 |
+
'3' => esc_html__( 'Three', 'ff_shortcodes' ),
|
55 |
+
'4' => esc_html__( 'Four', 'ff_shortcodes' ),
|
56 |
),
|
57 |
+
),
|
58 |
+
array(
|
59 |
+
'type' => 'switcher',
|
60 |
+
'name' => 'show_thumbs',
|
61 |
+
'default' => 'on',
|
62 |
+
'label' => esc_html__( 'Display thumbnails', 'ff_shortcodes' ),
|
63 |
+
),
|
64 |
+
array(
|
65 |
+
'type' => 'text_unit',
|
66 |
+
'name' => 'thumb_width',
|
67 |
+
'label' => esc_html__( 'Thumbnail width', 'ff_shortcodes' ),
|
68 |
+
'unit' => 'px',
|
69 |
+
'value' => '255',
|
70 |
+
),
|
71 |
+
array(
|
72 |
+
'type' => 'text_unit',
|
73 |
+
'name' => 'thumb_height',
|
74 |
+
'label' => esc_html__( 'Thumbnail height', 'ff_shortcodes' ),
|
75 |
+
'unit' => 'px',
|
76 |
+
'value' => '240',
|
77 |
+
),
|
78 |
+
array(
|
79 |
+
'type' => 'text_unit',
|
80 |
+
'name' => 'thumb_radius',
|
81 |
+
'label' => esc_html__( 'Thumbnail border radius', 'ff_shortcodes' ),
|
82 |
+
'unit' => 'px',
|
83 |
+
'value' => '4',
|
84 |
+
),
|
85 |
+
array(
|
86 |
+
'type' => 'switcher',
|
87 |
+
'name' => 'show_date',
|
88 |
+
'default' => 'on',
|
89 |
+
'label' => esc_html__( 'Display post date', 'ff_shortcodes' ),
|
90 |
+
),
|
91 |
+
array(
|
92 |
+
'type' => 'switcher',
|
93 |
+
'name' => 'show_header',
|
94 |
+
'default' => 'on',
|
95 |
+
'label' => esc_html__( 'Display header', 'ff_shortcodes' ),
|
96 |
+
),
|
97 |
+
array(
|
98 |
+
'type' => 'switcher',
|
99 |
+
'name' => 'show_excerpt',
|
100 |
+
'default' => 'on',
|
101 |
+
'label' => esc_html__( 'Display excerpt', 'ff_shortcodes' ),
|
102 |
+
),
|
103 |
+
array(
|
104 |
+
'type' => 'text_unit',
|
105 |
+
'name' => 'excerpt_len',
|
106 |
+
'label' => esc_html__( 'Excerpt length', 'ff_shortcodes' ),
|
107 |
+
'unit' => 'words',
|
108 |
+
'value' => '30',
|
109 |
+
),
|
110 |
+
array(
|
111 |
+
'type' => 'switcher',
|
112 |
+
'name' => 'show_metadata',
|
113 |
+
'default' => 'on',
|
114 |
+
'label' => esc_html__( 'Display meta data', 'ff_shortcodes' ),
|
115 |
+
),
|
116 |
+
|
117 |
+
)
|
118 |
+
),
|
119 |
+
|
120 |
+
);
|
121 |
+
// config can be extended with common tabs
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_recent_posts/init.php
CHANGED
@@ -1,56 +1,61 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
function display_fruitful_recent_posts_shortcode( $atts, $content ) {
|
6 |
-
|
7 |
-
$atts = shortcode_atts( [
|
8 |
-
'posts' => 4,
|
9 |
-
'cat' => '',
|
10 |
-
'style' => 'default',
|
11 |
-
'cols' => 1,
|
12 |
-
'show_thumbs' => 'on',
|
13 |
-
'thumb_width' => 255,
|
14 |
-
'thumb_height' => 240,
|
15 |
-
'thumb_radius' => 4,
|
16 |
-
'show_date' => 'on',
|
17 |
-
'show_header' => 'on',
|
18 |
-
'show_excerpt' => 'on',
|
19 |
-
'excerpt_len' => 30,
|
20 |
-
'show_metadata' => 'on',
|
21 |
-
], $atts, 'fruitful_recent_posts' );
|
22 |
-
|
23 |
-
$q_array = array(
|
24 |
-
'post_type' => 'post',
|
25 |
-
'post_status' => 'publish',
|
26 |
-
'posts_per_page' => absint( $atts['posts'] ),
|
27 |
-
'ignore_sticky_posts' => true
|
28 |
-
);
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
}
|
|
|
|
|
55 |
|
56 |
-
|
1 |
<?php
|
2 |
|
3 |
+
if ( ! function_exists( 'display_fruitful_recent_posts_shortcode' ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
+
function display_fruitful_recent_posts_shortcode( $atts, $content ) {
|
6 |
+
|
7 |
+
$default_atts = [
|
8 |
+
'posts' => 4,
|
9 |
+
'cat' => '',
|
10 |
+
'style' => 'default',
|
11 |
+
'cols' => 1,
|
12 |
+
'show_thumbs' => 'on',
|
13 |
+
'thumb_width' => 255,
|
14 |
+
'thumb_height' => 240,
|
15 |
+
'thumb_radius' => 4,
|
16 |
+
'show_date' => 'on',
|
17 |
+
'show_header' => 'on',
|
18 |
+
'show_excerpt' => 'on',
|
19 |
+
'excerpt_len' => 30,
|
20 |
+
'show_metadata' => 'on',
|
21 |
+
];
|
22 |
+
|
23 |
+
$default_atts = apply_filters( 'ff_shortcodes_shortcode_default_atts', $default_atts );
|
24 |
+
$atts = shortcode_atts( $default_atts, $atts, 'fruitful_recent_posts' );
|
25 |
+
|
26 |
+
$q_array = array(
|
27 |
+
'post_type' => 'post',
|
28 |
+
'post_status' => 'publish',
|
29 |
+
'posts_per_page' => absint( $atts['posts'] ),
|
30 |
+
'ignore_sticky_posts' => true
|
31 |
+
);
|
32 |
+
|
33 |
+
if ( $atts['cat'] <> '' ) {
|
34 |
+
$cats_array = array_filter( explode( ',', $atts['cat'] ) );
|
35 |
+
$q_array['tax_query'] = array(
|
36 |
+
array(
|
37 |
+
'taxonomy' => 'category',
|
38 |
+
'field' => 'slug',
|
39 |
+
'terms' => $cats_array
|
40 |
+
)
|
41 |
+
);
|
42 |
}
|
43 |
+
|
44 |
+
$posts = new WP_Query( $q_array );
|
45 |
+
|
46 |
+
wp_enqueue_style( 'ff-shortcodes-grid' );
|
47 |
+
wp_enqueue_style( 'ff-fruitful_recent_posts' );
|
48 |
+
|
49 |
+
do_action( 'ff_shortcodes_shortcode_before_view_load', $atts, $content );
|
50 |
+
|
51 |
+
return apply_filters( 'fruitful_recent_posts_shortcode', FF_SHORTCODES()->view->load(
|
52 |
+
FF_SHORTCODES()->shortcodes_dir . '/' . 'fruitful_recent_posts/view', [
|
53 |
+
'atts' => $atts,
|
54 |
+
'posts_query' => $posts
|
55 |
+
], false, true ) );
|
56 |
+
|
57 |
}
|
58 |
+
|
59 |
+
}
|
60 |
|
61 |
+
add_shortcode( 'fruitful_recent_posts', 'display_fruitful_recent_posts_shortcode' );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_recent_posts/modal.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
-
|
7 |
|
8 |
-
|
9 |
-
|
1 |
<?php
|
2 |
|
3 |
+
use ffshortcodes\helper\admin_options;
|
4 |
|
5 |
+
// get config
|
6 |
+
require 'config.php';
|
7 |
|
8 |
+
// print shortcode form
|
9 |
+
admin_options::print_form( $cfg );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_recent_posts/view.php
CHANGED
@@ -9,12 +9,15 @@
|
|
9 |
|
10 |
$attributes = $classes = array();
|
11 |
|
12 |
-
|
13 |
-
|
|
|
14 |
|
15 |
$classes[] = 'ff-style-' . $atts['style'];
|
16 |
|
17 |
$attributes[] = 'class="' . implode( ' ', $classes ) . '"';
|
|
|
|
|
18 |
?>
|
19 |
<div <?php echo implode( ' ', $attributes ); ?>>
|
20 |
|
@@ -55,16 +58,16 @@
|
|
55 |
|
56 |
<?php if( filter_var( $atts['show_excerpt'], FILTER_VALIDATE_BOOLEAN ) ): ?>
|
57 |
<div class="ff-excerpt">
|
58 |
-
<?php echo wp_trim_words(
|
59 |
</div>
|
60 |
<?php endif; ?>
|
61 |
|
62 |
<?php if( filter_var( $atts['show_metadata'], FILTER_VALIDATE_BOOLEAN ) ): ?>
|
63 |
<div class="ff-meta">
|
64 |
<div class="ff-meta-content">
|
65 |
-
<span class="ff-author"><?php _e( 'by', 'ff_shortcodes');
|
66 |
-
<span class="ff-tax"><?php _e( 'in', 'ff_shortcodes');
|
67 |
-
<span class="ff-comments"><i></i
|
68 |
</div>
|
69 |
</div>
|
70 |
<?php endif; ?>
|
9 |
|
10 |
$attributes = $classes = array();
|
11 |
|
12 |
+
$classes[] = 'ff ff-recent-posts';
|
13 |
+
$classes[] = 'ff-root';
|
14 |
+
$classes[] = 'fruitful_recent_posts';
|
15 |
|
16 |
$classes[] = 'ff-style-' . $atts['style'];
|
17 |
|
18 |
$attributes[] = 'class="' . implode( ' ', $classes ) . '"';
|
19 |
+
|
20 |
+
$attributes = apply_filters( 'ff_shortcodes_shortcode_wrap_attrs', $attributes, $data );
|
21 |
?>
|
22 |
<div <?php echo implode( ' ', $attributes ); ?>>
|
23 |
|
58 |
|
59 |
<?php if( filter_var( $atts['show_excerpt'], FILTER_VALIDATE_BOOLEAN ) ): ?>
|
60 |
<div class="ff-excerpt">
|
61 |
+
<?php echo wp_trim_words( get_post_field('post_content'), absint( $atts['excerpt_len'] ) ); ?>
|
62 |
</div>
|
63 |
<?php endif; ?>
|
64 |
|
65 |
<?php if( filter_var( $atts['show_metadata'], FILTER_VALIDATE_BOOLEAN ) ): ?>
|
66 |
<div class="ff-meta">
|
67 |
<div class="ff-meta-content">
|
68 |
+
<span class="ff-author"><?php _e( 'by', 'ff_shortcodes'); ?> <?php the_author(); ?></span>
|
69 |
+
<span class="ff-tax"><?php _e( 'in', 'ff_shortcodes'); ?> <?php echo get_the_category_list( ', ' ); ?></span>
|
70 |
+
<span class="ff-comments"><i></i> <?php comments_number( 0, 1, '%' ); ?></span>
|
71 |
</div>
|
72 |
</div>
|
73 |
<?php endif; ?>
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_recent_posts_slider/config.php
CHANGED
@@ -1,161 +1,161 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
$cfg = array(
|
10 |
-
'title' => esc_html__( 'Posts slider', 'ff_shortcodes'),
|
11 |
-
'desc' => esc_html__( 'Add slider', 'ff_shortcodes'),
|
12 |
-
'shortcode' => 'fruitful_recent_posts_slider',
|
13 |
-
'tabs' => true,
|
14 |
-
'query' => array(
|
15 |
-
'tab_title' => esc_html__( 'Query', 'ff_shortcodes'),
|
16 |
-
'fields' => array(
|
17 |
-
|
18 |
-
array(
|
19 |
-
'type' => 'textfield',
|
20 |
-
'name' => 'title',
|
21 |
-
'label' => esc_html__( 'Block title', 'ff_shortcodes'),
|
22 |
-
'value' => '',
|
23 |
-
),
|
24 |
-
array(
|
25 |
-
'type' => 'textfield',
|
26 |
-
'name' => 'posts',
|
27 |
-
'label' => esc_html__( 'Posts count', 'ff_shortcodes'),
|
28 |
-
'value' => 4,
|
29 |
-
),
|
30 |
-
array(
|
31 |
-
'type' => 'textarea',
|
32 |
-
'name' => 'cat',
|
33 |
-
'label' => esc_html__( 'Categories', 'ff_shortcodes'),
|
34 |
-
'desc' => esc_html__( 'Explode multiple categories by comma', 'ff_shortcodes'),
|
35 |
-
'value' => '',
|
36 |
-
),
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
),
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
),
|
52 |
-
),
|
53 |
-
/*
|
54 |
-
array(
|
55 |
-
'type' => 'switcher',
|
56 |
-
'name' => 'show_nav',
|
57 |
-
'default' => 'on',
|
58 |
-
'label' => esc_html__( 'Display navigation', 'ff_shortcodes'),
|
59 |
-
),
|
60 |
-
*/
|
61 |
-
array(
|
62 |
-
'type' => 'switcher',
|
63 |
-
'name' => 'show_thumbs',
|
64 |
-
'default' => 'on',
|
65 |
-
'label' => esc_html__( 'Display thumbnails', 'ff_shortcodes'),
|
66 |
-
),
|
67 |
-
array(
|
68 |
-
'type' => 'text_unit',
|
69 |
-
'name' => 'thumb_width',
|
70 |
-
'label' => esc_html__( 'Thumbnail width', 'ff_shortcodes'),
|
71 |
-
'unit' => 'px',
|
72 |
-
'value' => '255',
|
73 |
-
),
|
74 |
-
array(
|
75 |
-
'type' => 'text_unit',
|
76 |
-
'name' => 'thumb_height',
|
77 |
-
'label' => esc_html__( 'Thumbnail height', 'ff_shortcodes'),
|
78 |
-
'unit' => 'px',
|
79 |
-
'value' => '240',
|
80 |
-
),
|
81 |
-
array(
|
82 |
-
'type' => 'text_unit',
|
83 |
-
'name' => 'thumb_radius',
|
84 |
-
'label' => esc_html__( 'Thumbnail border radius', 'ff_shortcodes'),
|
85 |
-
'unit' => 'px',
|
86 |
-
'value' => '4',
|
87 |
-
),
|
88 |
-
array(
|
89 |
-
'type' => 'switcher',
|
90 |
-
'name' => 'show_date',
|
91 |
-
'default' => 'on',
|
92 |
-
'label' => esc_html__( 'Display post date', 'ff_shortcodes'),
|
93 |
-
),
|
94 |
-
array(
|
95 |
-
'type' => 'switcher',
|
96 |
-
'name' => 'show_header',
|
97 |
-
'default' => 'on',
|
98 |
-
'label' => esc_html__( 'Display header', 'ff_shortcodes'),
|
99 |
-
),
|
100 |
-
array(
|
101 |
-
'type' => 'switcher',
|
102 |
-
'name' => 'show_excerpt',
|
103 |
-
'default' => 'on',
|
104 |
-
'label' => esc_html__( 'Display excerpt', 'ff_shortcodes'),
|
105 |
-
),
|
106 |
-
array(
|
107 |
-
'type' => 'text_unit',
|
108 |
-
'name' => 'excerpt_len',
|
109 |
-
'label' => esc_html__( 'Excerpt length', 'ff_shortcodes'),
|
110 |
-
'unit' => 'words',
|
111 |
-
'value' => '30',
|
112 |
-
),
|
113 |
-
array(
|
114 |
-
'type' => 'switcher',
|
115 |
-
'name' => 'show_metadata',
|
116 |
-
'default' => 'on',
|
117 |
-
'label' => esc_html__( 'Display meta data', 'ff_shortcodes'),
|
118 |
),
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
),
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
),
|
146 |
),
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
),
|
157 |
),
|
158 |
-
)
|
159 |
-
)
|
160 |
-
)
|
161 |
-
|
|
1 |
<?php
|
2 |
|
3 |
+
/**
|
4 |
+
* This file used to build a form
|
5 |
+
* in modal window
|
6 |
+
* config is an array with form options
|
7 |
+
**/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
+
$cfg = array(
|
10 |
+
'title' => esc_html__( 'Posts slider', 'ff_shortcodes' ),
|
11 |
+
'desc' => esc_html__( 'Add slider', 'ff_shortcodes' ),
|
12 |
+
'shortcode' => 'fruitful_recent_posts_slider',
|
13 |
+
'tabs' => true,
|
14 |
+
'query' => array(
|
15 |
+
'tab_title' => esc_html__( 'Query', 'ff_shortcodes' ),
|
16 |
+
'fields' => array(
|
17 |
+
|
18 |
+
array(
|
19 |
+
'type' => 'textfield',
|
20 |
+
'name' => 'title',
|
21 |
+
'label' => esc_html__( 'Block title', 'ff_shortcodes' ),
|
22 |
+
'value' => '',
|
23 |
),
|
24 |
+
array(
|
25 |
+
'type' => 'textfield',
|
26 |
+
'name' => 'posts',
|
27 |
+
'label' => esc_html__( 'Posts count', 'ff_shortcodes' ),
|
28 |
+
'value' => 4,
|
29 |
+
),
|
30 |
+
array(
|
31 |
+
'type' => 'textarea',
|
32 |
+
'name' => 'cat',
|
33 |
+
'label' => esc_html__( 'Categories', 'ff_shortcodes' ),
|
34 |
+
'desc' => esc_html__( 'Explode multiple categories by comma', 'ff_shortcodes' ),
|
35 |
+
'value' => '',
|
36 |
+
),
|
37 |
+
|
38 |
),
|
39 |
+
),
|
40 |
+
'style' => array(
|
41 |
+
'tab_title' => esc_html__( 'Style', 'ff_shortcodes' ),
|
42 |
+
'fields' => array(
|
43 |
+
|
44 |
+
array(
|
45 |
+
'type' => 'radio',
|
46 |
+
'name' => 'style',
|
47 |
+
'label' => esc_html__( 'Style', 'ff_shortcodes' ),
|
48 |
+
'value' => array(
|
49 |
+
'default' => esc_html__( 'Clean', 'ff_shortcodes' ),
|
50 |
+
'bordered' => esc_html__( 'Bordered', 'ff_shortcodes' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
),
|
52 |
+
),
|
53 |
+
/*
|
54 |
+
array(
|
55 |
+
'type' => 'switcher',
|
56 |
+
'name' => 'show_nav',
|
57 |
+
'default' => 'on',
|
58 |
+
'label' => esc_html__( 'Display navigation', 'ff_shortcodes'),
|
59 |
+
),
|
60 |
+
*/
|
61 |
+
array(
|
62 |
+
'type' => 'switcher',
|
63 |
+
'name' => 'show_thumbs',
|
64 |
+
'default' => 'on',
|
65 |
+
'label' => esc_html__( 'Display thumbnails', 'ff_shortcodes' ),
|
66 |
+
),
|
67 |
+
array(
|
68 |
+
'type' => 'text_unit',
|
69 |
+
'name' => 'thumb_width',
|
70 |
+
'label' => esc_html__( 'Thumbnail width', 'ff_shortcodes' ),
|
71 |
+
'unit' => 'px',
|
72 |
+
'value' => '255',
|
73 |
+
),
|
74 |
+
array(
|
75 |
+
'type' => 'text_unit',
|
76 |
+
'name' => 'thumb_height',
|
77 |
+
'label' => esc_html__( 'Thumbnail height', 'ff_shortcodes' ),
|
78 |
+
'unit' => 'px',
|
79 |
+
'value' => '240',
|
80 |
+
),
|
81 |
+
array(
|
82 |
+
'type' => 'text_unit',
|
83 |
+
'name' => 'thumb_radius',
|
84 |
+
'label' => esc_html__( 'Thumbnail border radius', 'ff_shortcodes' ),
|
85 |
+
'unit' => 'px',
|
86 |
+
'value' => '4',
|
87 |
+
),
|
88 |
+
array(
|
89 |
+
'type' => 'switcher',
|
90 |
+
'name' => 'show_date',
|
91 |
+
'default' => 'on',
|
92 |
+
'label' => esc_html__( 'Display post date', 'ff_shortcodes' ),
|
93 |
+
),
|
94 |
+
array(
|
95 |
+
'type' => 'switcher',
|
96 |
+
'name' => 'show_header',
|
97 |
+
'default' => 'on',
|
98 |
+
'label' => esc_html__( 'Display header', 'ff_shortcodes' ),
|
99 |
+
),
|
100 |
+
array(
|
101 |
+
'type' => 'switcher',
|
102 |
+
'name' => 'show_excerpt',
|
103 |
+
'default' => 'on',
|
104 |
+
'label' => esc_html__( 'Display excerpt', 'ff_shortcodes' ),
|
105 |
+
),
|
106 |
+
array(
|
107 |
+
'type' => 'text_unit',
|
108 |
+
'name' => 'excerpt_len',
|
109 |
+
'label' => esc_html__( 'Excerpt length', 'ff_shortcodes' ),
|
110 |
+
'unit' => 'words',
|
111 |
+
'value' => '30',
|
112 |
+
),
|
113 |
+
array(
|
114 |
+
'type' => 'switcher',
|
115 |
+
'name' => 'show_metadata',
|
116 |
+
'default' => 'on',
|
117 |
+
'label' => esc_html__( 'Display meta data', 'ff_shortcodes' ),
|
118 |
+
),
|
119 |
+
|
120 |
+
)
|
121 |
+
),
|
122 |
+
'responsive' => array(
|
123 |
+
'tab_title' => esc_html__( 'Responsive', 'ff_shortcodes' ),
|
124 |
+
'fields' => array(
|
125 |
+
array(
|
126 |
+
'type' => 'dropdown',
|
127 |
+
'name' => 'slides',
|
128 |
+
'label' => esc_html__( 'Visible slides (desktop screen)', 'ff_shortcodes' ),
|
129 |
+
'value' => array(
|
130 |
+
'1' => esc_html__( 'One', 'ff_shortcodes' ),
|
131 |
+
'2' => esc_html__( 'Two', 'ff_shortcodes' ),
|
132 |
+
'3' => esc_html__( 'Three', 'ff_shortcodes' ),
|
133 |
+
'4' => esc_html__( 'Four', 'ff_shortcodes' ),
|
134 |
),
|
135 |
+
),
|
136 |
+
array(
|
137 |
+
'type' => 'dropdown',
|
138 |
+
'name' => 'slides_small',
|
139 |
+
'label' => esc_html__( 'Visible slides (small screen)', 'ff_shortcodes' ),
|
140 |
+
'value' => array(
|
141 |
+
'1' => esc_html__( 'One', 'ff_shortcodes' ),
|
142 |
+
'2' => esc_html__( 'Two', 'ff_shortcodes' ),
|
143 |
+
'3' => esc_html__( 'Three', 'ff_shortcodes' ),
|
144 |
+
'4' => esc_html__( 'Four', 'ff_shortcodes' ),
|
145 |
),
|
146 |
+
),
|
147 |
+
array(
|
148 |
+
'type' => 'dropdown',
|
149 |
+
'name' => 'slides_extra_small',
|
150 |
+
'label' => esc_html__( 'Visible slides (extra small screen)', 'ff_shortcodes' ),
|
151 |
+
'value' => array(
|
152 |
+
'1' => esc_html__( 'One', 'ff_shortcodes' ),
|
153 |
+
'2' => esc_html__( 'Two', 'ff_shortcodes' ),
|
154 |
+
'3' => esc_html__( 'Three', 'ff_shortcodes' ),
|
155 |
+
'4' => esc_html__( 'Four', 'ff_shortcodes' ),
|
156 |
),
|
157 |
+
),
|
158 |
+
)
|
159 |
+
),
|
160 |
+
);
|
161 |
+
// config can be extended with common tabs
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_recent_posts_slider/init.php
CHANGED
@@ -1,64 +1,69 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
function display_fruitful_recent_posts_slider_shortcode( $atts, $content ) {
|
6 |
-
|
7 |
-
$atts = shortcode_atts( [
|
8 |
-
'title' => '',
|
9 |
-
'posts' => 4,
|
10 |
-
'cat' => '',
|
11 |
-
'style' => 'default',
|
12 |
-
'slides' => 4,
|
13 |
-
'slides_small' => 2,
|
14 |
-
'slides_extra_small' => 1,
|
15 |
-
//'show_nav' => 'on',
|
16 |
-
'show_thumbs' => 'on',
|
17 |
-
'thumb_width' => 255,
|
18 |
-
'thumb_height' => 240,
|
19 |
-
'thumb_radius' => 4,
|
20 |
-
'show_date' => 'on',
|
21 |
-
'show_header' => 'on',
|
22 |
-
'show_excerpt' => 'on',
|
23 |
-
'excerpt_len' => 30,
|
24 |
-
'show_metadata' => 'on',
|
25 |
-
], $atts, 'fruitful_recent_posts_slider' );
|
26 |
-
|
27 |
-
$q_array = array(
|
28 |
-
'post_type' => 'post',
|
29 |
-
'post_status' => 'publish',
|
30 |
-
'posts_per_page' => absint( $atts['posts'] ),
|
31 |
-
'ignore_sticky_posts' => true
|
32 |
-
);
|
33 |
-
|
34 |
-
if( $atts['cat'] <> '' ) {
|
35 |
-
$cats_array = array_filter( explode( ',', $atts['cat'] ) );
|
36 |
-
$q_array['tax_query'] = array(
|
37 |
-
array(
|
38 |
-
'taxonomy' => 'category',
|
39 |
-
'field' => 'slug',
|
40 |
-
'terms' => $cats_array
|
41 |
-
)
|
42 |
-
);
|
43 |
-
}
|
44 |
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
|
|
|
|
63 |
|
64 |
-
|
1 |
<?php
|
2 |
|
3 |
+
if ( ! function_exists( 'display_fruitful_recent_posts_slider_shortcode' ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
+
function display_fruitful_recent_posts_slider_shortcode( $atts, $content ) {
|
6 |
+
|
7 |
+
$default_atts = [
|
8 |
+
'title' => '',
|
9 |
+
'posts' => 4,
|
10 |
+
'cat' => '',
|
11 |
+
'style' => 'default',
|
12 |
+
'slides' => 4,
|
13 |
+
'slides_small' => 2,
|
14 |
+
'slides_extra_small' => 1,
|
15 |
+
//'show_nav' => 'on',
|
16 |
+
'show_thumbs' => 'on',
|
17 |
+
'thumb_width' => 255,
|
18 |
+
'thumb_height' => 240,
|
19 |
+
'thumb_radius' => 4,
|
20 |
+
'show_date' => 'on',
|
21 |
+
'show_header' => 'on',
|
22 |
+
'show_excerpt' => 'on',
|
23 |
+
'excerpt_len' => 30,
|
24 |
+
'show_metadata' => 'on',
|
25 |
+
];
|
26 |
+
|
27 |
+
$default_atts = apply_filters( 'ff_shortcodes_shortcode_default_atts', $default_atts );
|
28 |
+
$atts = shortcode_atts( $default_atts, $atts, 'fruitful_recent_posts_slider' );
|
29 |
+
|
30 |
+
$q_array = array(
|
31 |
+
'post_type' => 'post',
|
32 |
+
'post_status' => 'publish',
|
33 |
+
'posts_per_page' => absint( $atts['posts'] ),
|
34 |
+
'ignore_sticky_posts' => true
|
35 |
+
);
|
36 |
+
|
37 |
+
if ( $atts['cat'] <> '' ) {
|
38 |
+
$cats_array = array_filter( explode( ',', $atts['cat'] ) );
|
39 |
+
$q_array['tax_query'] = array(
|
40 |
+
array(
|
41 |
+
'taxonomy' => 'category',
|
42 |
+
'field' => 'slug',
|
43 |
+
'terms' => $cats_array
|
44 |
+
)
|
45 |
+
);
|
46 |
}
|
47 |
+
|
48 |
+
$posts = new WP_Query( $q_array );
|
49 |
+
|
50 |
+
wp_enqueue_style( 'slick' );
|
51 |
+
wp_enqueue_style( 'ff-fruitful_recent_posts' );
|
52 |
+
wp_enqueue_style( 'ff-fruitful_recent_posts_slider' );
|
53 |
+
wp_enqueue_script( 'jquery' );
|
54 |
+
wp_enqueue_script( 'slick' );
|
55 |
+
wp_enqueue_script( 'ff-fruitful_recent_posts_slider' );
|
56 |
+
|
57 |
+
do_action( 'ff_shortcodes_shortcode_before_view_load', $atts, $content );
|
58 |
+
|
59 |
+
return apply_filters( 'fruitful_recent_posts_slider_shortcode', FF_SHORTCODES()->view->load(
|
60 |
+
FF_SHORTCODES()->shortcodes_dir . '/' . 'fruitful_recent_posts_slider/view', [
|
61 |
+
'atts' => $atts,
|
62 |
+
'posts_query' => $posts
|
63 |
+
], false, true ) );
|
64 |
+
|
65 |
}
|
66 |
+
|
67 |
+
}
|
68 |
|
69 |
+
add_shortcode( 'fruitful_recent_posts_slider', 'display_fruitful_recent_posts_slider_shortcode' );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_recent_posts_slider/modal.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
-
|
7 |
|
8 |
-
|
9 |
-
|
1 |
<?php
|
2 |
|
3 |
+
use ffshortcodes\helper\admin_options;
|
4 |
|
5 |
+
// get config
|
6 |
+
require 'config.php';
|
7 |
|
8 |
+
// print shortcode form
|
9 |
+
admin_options::print_form( $cfg );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_recent_posts_slider/view.php
CHANGED
@@ -1,87 +1,91 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
|
7 |
-
|
8 |
|
9 |
-
|
10 |
|
11 |
-
|
12 |
-
|
|
|
13 |
|
14 |
-
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
|
20 |
-
|
|
|
|
|
21 |
|
22 |
?>
|
23 |
<div <?php echo implode( ' ', $attributes ); ?>>
|
24 |
-
|
25 |
<?php
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
<?php endif; ?>
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
|
|
|
|
|
|
|
|
75 |
</div>
|
|
|
76 |
</div>
|
77 |
-
<?php
|
78 |
-
</div>
|
79 |
-
|
80 |
</div>
|
81 |
-
|
82 |
-
|
83 |
-
<?php wp_reset_postdata(); ?>
|
84 |
-
|
85 |
<?php endif; ?>
|
86 |
|
87 |
</div>
|
1 |
<?php
|
2 |
|
3 |
+
use ffshortcodes\helper\media;
|
4 |
|
5 |
+
$atts = $data['atts'];
|
6 |
|
7 |
+
$slides = absint( $atts['slides'] );
|
8 |
|
9 |
+
$attributes = $classes = array();
|
10 |
|
11 |
+
$classes[] = 'ff ff-recent-posts';
|
12 |
+
$classes[] = 'ff-root';
|
13 |
+
$classes[] = 'fruitful_recent_posts_slider';
|
14 |
|
15 |
+
$classes[] = 'ff-style-' . $atts['style'];
|
16 |
|
17 |
+
$attributes[] = 'data-slides="' . absint( $atts['slides'] ) . '"';
|
18 |
+
$attributes[] = 'data-slides-small="' . absint( $atts['slides_small'] ) . '"';
|
19 |
+
$attributes[] = 'data-slides-extra-small="' . absint( $atts['slides_extra_small'] ) . '"';
|
20 |
|
21 |
+
$attributes[] = 'class="' . implode( ' ', $classes ) . '"';
|
22 |
+
|
23 |
+
$attributes = apply_filters( 'ff_shortcodes_shortcode_wrap_attrs', $attributes, $data );
|
24 |
|
25 |
?>
|
26 |
<div <?php echo implode( ' ', $attributes ); ?>>
|
27 |
+
|
28 |
<?php
|
29 |
+
$posts = $data['posts_query'];
|
30 |
+
if ( $posts->have_posts() ):
|
31 |
+
?>
|
32 |
+
|
33 |
+
<?php if ( $atts['title'] <> '' ): ?>
|
34 |
+
<h2 class="ff-carousel-title"><?php echo $atts['title']; ?></h2>
|
35 |
<?php endif; ?>
|
36 |
+
|
37 |
+
<div class="ff-carousel">
|
38 |
+
<?php while ( $posts->have_posts() ): $posts->the_post(); ?>
|
39 |
+
<div class="ff-carousel-item">
|
40 |
+
<div class="ff-item">
|
41 |
+
<?php if ( filter_var( $atts['show_thumbs'], FILTER_VALIDATE_BOOLEAN ) ): ?>
|
42 |
+
<?php
|
43 |
+
$thumb_width = absint( $atts['thumb_width'] );
|
44 |
+
$thumb_height = absint( $atts['thumb_height'] );
|
45 |
+
$img = wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) );
|
46 |
+
$img_src = media::img_resize( $img, $thumb_width, $thumb_height );
|
47 |
+
if ( $img_src <> '' ):
|
48 |
+
?>
|
49 |
+
<div class="ff-thumb">
|
50 |
+
<a href="<?php the_permalink(); ?>"><img src="<?php echo esc_attr( $img_src ); ?>" alt=""
|
51 |
+
<?php if ( $atts['thumb_radius'] <> '' ): ?>style="border-radius: <?php echo absint( $atts['thumb_radius'] ); ?>px"<?php endif; ?>></a>
|
52 |
+
</div>
|
53 |
+
<?php endif; endif; ?>
|
54 |
+
|
55 |
+
<?php if ( filter_var( $atts['show_date'], FILTER_VALIDATE_BOOLEAN ) ): ?>
|
56 |
+
<div class="ff-date">
|
57 |
+
<?php echo get_the_date( get_option( 'date_format' ) ); ?>
|
58 |
+
</div>
|
59 |
+
<?php endif; ?>
|
60 |
+
|
61 |
+
<?php if ( filter_var( $atts['show_header'], FILTER_VALIDATE_BOOLEAN ) ): ?>
|
62 |
+
<div class="ff-title">
|
63 |
+
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
64 |
+
</div>
|
65 |
+
<?php endif; ?>
|
66 |
+
|
67 |
+
<?php if ( filter_var( $atts['show_excerpt'], FILTER_VALIDATE_BOOLEAN ) ): ?>
|
68 |
+
<div class="ff-excerpt">
|
69 |
+
<?php echo wp_trim_words( get_post_field('post_content'), absint( $atts['excerpt_len'] ) ); ?>
|
70 |
+
</div>
|
71 |
+
<?php endif; ?>
|
72 |
+
|
73 |
+
<?php if ( filter_var( $atts['show_metadata'], FILTER_VALIDATE_BOOLEAN ) ): ?>
|
74 |
+
<div class="ff-meta">
|
75 |
+
<div class="ff-meta-content">
|
76 |
+
<span class="ff-author"><?php _e( 'by', 'ff_shortcodes' ); ?> <?php the_author(); ?></span>
|
77 |
+
<span class="ff-tax"><?php _e( 'in', 'ff_shortcodes' ); ?> <?php echo get_the_category_list( ', ' ); ?></span>
|
78 |
+
<span class="ff-comments"><i></i> <?php comments_number( 0, 1, '%' ); ?></span>
|
79 |
+
</div>
|
80 |
+
</div>
|
81 |
+
<?php endif; ?>
|
82 |
</div>
|
83 |
+
|
84 |
</div>
|
85 |
+
<?php endwhile; ?>
|
|
|
|
|
86 |
</div>
|
87 |
+
<?php wp_reset_postdata(); ?>
|
88 |
+
|
|
|
|
|
89 |
<?php endif; ?>
|
90 |
|
91 |
</div>
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_sep/config.php
CHANGED
@@ -1,33 +1,38 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
14 |
array(
|
15 |
-
'type'
|
16 |
-
'name'
|
17 |
-
'label' => esc_html__( 'Separator height', 'ff_shortcodes'),
|
18 |
-
'unit'
|
19 |
'value' => '10',
|
20 |
),
|
21 |
array(
|
22 |
-
'type'
|
23 |
-
'name'
|
24 |
-
'label' => esc_html__( 'Color', 'ff_shortcodes'),
|
25 |
'value' => '#e0e0e0',
|
26 |
),
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
)
|
33 |
-
)
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
/**
|
4 |
+
* This file used to build a form
|
5 |
+
* in a modal window
|
6 |
+
* The config is an array with form options / control types
|
7 |
+
**/
|
8 |
|
9 |
+
$cfg = array(
|
10 |
+
'title' => esc_html__( 'Separator', 'ff_shortcodes' ),
|
11 |
+
'desc' => esc_html__( 'Add a gap', 'ff_shortcodes' ),
|
12 |
+
'shortcode' => 'fruitful_sep',
|
13 |
+
'tabs' => true,
|
14 |
+
'general' => array(
|
15 |
+
'tab_title' => esc_html__( 'General', 'ff_shortcodes' ),
|
16 |
+
'fields' => array(
|
17 |
array(
|
18 |
+
'type' => 'text_unit',
|
19 |
+
'name' => 'height',
|
20 |
+
'label' => esc_html__( 'Separator height', 'ff_shortcodes' ),
|
21 |
+
'unit' => 'px',
|
22 |
'value' => '10',
|
23 |
),
|
24 |
array(
|
25 |
+
'type' => 'color_picker',
|
26 |
+
'name' => 'color',
|
27 |
+
'label' => esc_html__( 'Color', 'ff_shortcodes' ),
|
28 |
'value' => '#e0e0e0',
|
29 |
),
|
30 |
+
array(
|
31 |
+
'type' => 'textfield',
|
32 |
+
'name' => 'style',
|
33 |
+
'label' => esc_html__( 'Style', 'ff_shortcodes' ),
|
34 |
+
),
|
35 |
+
),
|
36 |
+
)
|
37 |
+
);
|
38 |
+
// config can be extended with common tabs
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_sep/init.php
CHANGED
@@ -1,22 +1,28 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
20 |
}
|
|
|
|
|
21 |
|
22 |
-
|
1 |
<?php
|
2 |
|
3 |
+
if ( ! function_exists( 'display_fruitful_sep_shortcode' ) ) {
|
4 |
+
|
5 |
+
function display_fruitful_sep_shortcode( $atts, $content ) {
|
6 |
+
|
7 |
+
$default_atts = [
|
8 |
+
'height' => '10',
|
9 |
+
'color' => '#e0e0e0',
|
10 |
+
'style' => ''
|
11 |
+
];
|
12 |
+
|
13 |
+
$default_atts = apply_filters( 'ff_shortcodes_shortcode_default_atts', $default_atts );
|
14 |
+
$atts = shortcode_atts( $default_atts, $atts, 'fruitful_sep' );
|
15 |
+
|
16 |
+
|
17 |
+
do_action( 'ff_shortcodes_shortcode_before_view_load', $atts, $content );
|
18 |
+
|
19 |
+
return apply_filters( 'fruitful_sep_shortcode', FF_SHORTCODES()->view->load(
|
20 |
+
FF_SHORTCODES()->shortcodes_dir . '/' . 'fruitful_sep/view', [
|
21 |
+
'atts' => $atts
|
22 |
+
], false, true ) );
|
23 |
+
|
24 |
}
|
25 |
+
|
26 |
+
}
|
27 |
|
28 |
+
add_shortcode( 'fruitful_sep', 'display_fruitful_sep_shortcode' );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_sep/modal.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
-
|
7 |
|
8 |
-
|
9 |
-
|
1 |
<?php
|
2 |
|
3 |
+
use ffshortcodes\helper\admin_options;
|
4 |
|
5 |
+
// get config
|
6 |
+
require 'config.php';
|
7 |
|
8 |
+
// print shortcode form
|
9 |
+
admin_options::print_form( $cfg );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_sep/view.php
CHANGED
@@ -1,27 +1,31 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
|
4 |
-
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
|
|
22 |
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
25 |
|
26 |
?>
|
27 |
-
<div <?php echo implode( $attributes ); ?>></div>
|
1 |
<?php
|
2 |
+
$atts = $data['atts'];
|
3 |
|
4 |
+
$css = '';
|
5 |
|
6 |
+
if ( $atts['height'] <> '' ) {
|
7 |
+
$css .= 'height: ' . absint( $atts['height'] ) . 'px;';
|
8 |
+
}
|
9 |
|
10 |
+
if ( $atts['style'] <> '' ) {
|
11 |
+
$atts['style'] = preg_replace( '#;$#', '', $atts['style'] );
|
12 |
+
$css .= $atts['style'] . ';';
|
13 |
+
}
|
14 |
|
15 |
+
if ( $atts['color'] <> '' ) {
|
16 |
+
$css .= 'background-color: ' . $atts['color'] . ';';
|
17 |
+
}
|
18 |
|
19 |
+
$attributes = $classes = array();
|
20 |
|
21 |
+
$classes[] = 'ff fruitful_sep';
|
22 |
+
$classes[] = 'ff-root';
|
23 |
|
24 |
+
$attributes[] = 'class="' . implode( ' ', $classes ) . '"';
|
25 |
+
$attributes[] = 'style="' . $css . '"';
|
26 |
+
|
27 |
+
|
28 |
+
$attributes = apply_filters( 'ff_shortcodes_shortcode_wrap_attrs', $attributes, $data );
|
29 |
|
30 |
?>
|
31 |
+
<div <?php echo implode( ' ', $attributes ); ?>></div>
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_tabs/config.php
CHANGED
@@ -1,66 +1,67 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
),
|
30 |
-
'label' => esc_html__( 'Tab title', 'ff_shortcodes'),
|
31 |
-
'value' => esc_html__( 'My tab title', 'ff_shortcodes'),
|
32 |
-
),
|
33 |
-
array(
|
34 |
-
'type' => 'textarea',
|
35 |
-
'name' => 'content',
|
36 |
-
'label' => esc_html__( 'Tab content', 'ff_shortcodes'),
|
37 |
-
'value' => esc_html__( 'Type here your text inside tab', 'ff_shortcodes'),
|
38 |
),
|
39 |
-
|
|
|
40 |
),
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
'fields' => array(
|
47 |
-
array(
|
48 |
-
'type' => 'dropdown',
|
49 |
-
'name' => 'type',
|
50 |
-
'label' => esc_html__( 'Tabs type', 'ff_shortcodes'),
|
51 |
-
'value' => array(
|
52 |
-
'default' => esc_html__( 'Horizontal tabs', 'ff_shortcodes'),
|
53 |
-
'vertical' => esc_html__( 'Vertical tabs', 'ff_shortcodes'),
|
54 |
-
'accordion' => esc_html__( 'Accordion', 'ff_shortcodes'),
|
55 |
),
|
|
|
56 |
),
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
),
|
64 |
-
)
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
/**
|
4 |
+
* This file used to build a form
|
5 |
+
* in modal window
|
6 |
+
* config is an array with form options
|
7 |
+
**/
|
8 |
|
9 |
+
$cfg = array(
|
10 |
+
'title' => esc_html__( 'Tabs', 'ff_shortcodes' ),
|
11 |
+
'desc' => esc_html__( 'Add horizontal tabs', 'ff_shortcodes' ),
|
12 |
+
'shortcode' => 'fruitful_tabs',
|
13 |
+
'tabs' => true,
|
14 |
+
'tabs_content' => array(
|
15 |
+
'tab_title' => esc_html__( 'Tabs Content', 'ff_shortcodes' ),
|
16 |
+
'fields' => array(
|
17 |
+
array(
|
18 |
+
'type' => 'dynamic',
|
19 |
+
'count' => 3,
|
20 |
+
'shortcode' => 'fruitful_tab',
|
21 |
+
'row_title' => esc_html__( 'My tab title', 'ff_shortcodes' ),
|
22 |
+
'fields' => array(
|
23 |
+
|
24 |
+
array(
|
25 |
+
'type' => 'textfield',
|
26 |
+
'name' => 'title',
|
27 |
+
'css_classes' => array(
|
28 |
+
'ff-row-title'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
),
|
30 |
+
'label' => esc_html__( 'Tab title', 'ff_shortcodes' ),
|
31 |
+
'value' => esc_html__( 'My tab title', 'ff_shortcodes' ),
|
32 |
),
|
33 |
+
array(
|
34 |
+
'type' => 'textarea',
|
35 |
+
'name' => 'content',
|
36 |
+
'label' => esc_html__( 'Tab content', 'ff_shortcodes' ),
|
37 |
+
'value' => esc_html__( 'Type here your text inside tab', 'ff_shortcodes' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
),
|
39 |
+
|
40 |
),
|
41 |
+
),
|
42 |
+
)
|
43 |
+
),
|
44 |
+
'settings' => array(
|
45 |
+
'tab_title' => esc_html__( 'Settings', 'ff_shortcodes' ),
|
46 |
+
'fields' => array(
|
47 |
+
array(
|
48 |
+
'type' => 'dropdown',
|
49 |
+
'name' => 'type',
|
50 |
+
'label' => esc_html__( 'Tabs type', 'ff_shortcodes' ),
|
51 |
+
'value' => array(
|
52 |
+
'default' => esc_html__( 'Horizontal tabs', 'ff_shortcodes' ),
|
53 |
+
'vertical' => esc_html__( 'Vertical tabs', 'ff_shortcodes' ),
|
54 |
+
'accordion' => esc_html__( 'Accordion', 'ff_shortcodes' ),
|
55 |
),
|
56 |
+
),
|
57 |
+
array(
|
58 |
+
'type' => 'textfield',
|
59 |
+
'name' => 'resp_break',
|
60 |
+
'label' => esc_html__( 'Responsive break', 'ff_shortcodes' ),
|
61 |
+
'value' => '767',
|
62 |
+
'desc' => esc_html__( 'type here a screen width when tabs become responsive', 'ff_shortcodes' ),
|
63 |
+
),
|
64 |
+
)
|
65 |
+
),
|
66 |
+
);
|
67 |
+
// config can be extended with common tabs
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_tabs/init.php
CHANGED
@@ -1,25 +1,30 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
23 |
}
|
|
|
|
|
24 |
|
25 |
-
|
1 |
<?php
|
2 |
|
3 |
+
if ( ! function_exists( 'display_fruitful_tabs_shortcode' ) ) {
|
4 |
+
|
5 |
+
function display_fruitful_tabs_shortcode( $atts, $content ) {
|
6 |
+
|
7 |
+
$default_atts = [
|
8 |
+
'type' => 'default',
|
9 |
+
'resp_break' => 767,
|
10 |
+
];
|
11 |
+
|
12 |
+
$default_atts = apply_filters( 'ff_shortcodes_shortcode_default_atts', $default_atts );
|
13 |
+
$atts = shortcode_atts( $default_atts, $atts, 'fruitful_tabs' );
|
14 |
+
|
15 |
+
wp_enqueue_style( 'ff-fruitful_tabs' );
|
16 |
+
wp_enqueue_script( 'ff-fruitful_tabs' );
|
17 |
+
|
18 |
+
do_action( 'ff_shortcodes_shortcode_before_view_load', $atts, $content );
|
19 |
+
|
20 |
+
return apply_filters( 'fruitful_tabs_shortcode', FF_SHORTCODES()->view->load(
|
21 |
+
FF_SHORTCODES()->shortcodes_dir . '/' . 'fruitful_tabs/view', [
|
22 |
+
'atts' => $atts,
|
23 |
+
'content' => $content
|
24 |
+
], false, true ) );
|
25 |
+
|
26 |
}
|
27 |
+
|
28 |
+
}
|
29 |
|
30 |
+
add_shortcode( 'fruitful_tabs', 'display_fruitful_tabs_shortcode' );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_tabs/modal.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
-
|
7 |
|
8 |
-
|
9 |
-
|
1 |
<?php
|
2 |
|
3 |
+
use ffshortcodes\helper\admin_options;
|
4 |
|
5 |
+
// get config
|
6 |
+
require 'config.php';
|
7 |
|
8 |
+
// print shortcode form
|
9 |
+
admin_options::print_form( $cfg );
|
fruitful-shortcodes-2.0.0/core/shortcodes/fruitful_tabs/view.php
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
4 |
?>
|
5 |
-
<div class="fruitful_tabs type-<?php echo esc_attr( $atts['type'] ); ?> from-shortcodes" data-type="<?php echo esc_attr( $atts['type'] ); ?>"
|
|
|
6 |
<?php echo do_shortcode( $content ); ?>
|
7 |
</div>
|
1 |
<?php
|
2 |
+
$atts = $data['atts'];
|
3 |
+
$content = $data['content'];
|
4 |
+
|
5 |
+
$additional_attributes = apply_filters( 'ff_shortcodes_shortcode_wrap_attrs', [], $data );
|
6 |
?>
|
7 |
+
<div class="ff-root fruitful_tabs type-<?php echo esc_attr( $atts['type'] ); ?> from-shortcodes" data-type="<?php echo esc_attr( $atts['type'] ); ?>"
|
8 |
+
data-break="<?php echo absint( $atts['resp_break'] ); ?>" <?php echo implode( ' ', $additional_attributes ); ?>>
|
9 |
<?php echo do_shortcode( $content ); ?>
|
10 |
</div>
|
fruitful-shortcodes-2.0.0/core/view/backend/button.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<button type="button" id="ff-shortcodes-button" class="ff-shortcodes-button button">
|
2 |
-
<span class="ff-shortcodes-icon"></span> <?php _e( 'Fruitful Shortcodes', 'ff_shortcodes'); ?>
|
3 |
-
</button>
|
|
|
|
|
|
fruitful-shortcodes-2.0.0/core/view/backend/modal/window.php
CHANGED
@@ -29,10 +29,14 @@
|
|
29 |
|
30 |
<?php
|
31 |
foreach( $data['shortcodes'] as $shortcode => $cfg ):
|
32 |
-
$is_pro
|
|
|
|
|
|
|
|
|
33 |
?>
|
34 |
<div class="elem <?php if( $is_pro ): ?>pro<?php endif; ?> <?php if( $is_pro && ! utils::is_pro() ): ?>promo<?php endif; ?>">
|
35 |
-
<a href="
|
36 |
<img src="<?php echo $cfg['icon']; ?>" alt="" class="icon">
|
37 |
<div class="desc">
|
38 |
<h4><?php echo $cfg['title']; ?></h4>
|
29 |
|
30 |
<?php
|
31 |
foreach( $data['shortcodes'] as $shortcode => $cfg ):
|
32 |
+
$is_pro = filter_var( $cfg['is_pro'], FILTER_VALIDATE_BOOLEAN );
|
33 |
+
$a_href = ! empty( $cfg['direct_link'] ) ? esc_url( $cfg['direct_link'] ) : 'javascript:;';
|
34 |
+
$a_class = ! empty( $cfg['direct_link'] ) ? 'shortcode-elem-direct_link' : 'shortcode-elem';
|
35 |
+
$a_target = ! empty( $cfg['direct_link'] ) ? ' target="_blank" ' : '';
|
36 |
+
|
37 |
?>
|
38 |
<div class="elem <?php if( $is_pro ): ?>pro<?php endif; ?> <?php if( $is_pro && ! utils::is_pro() ): ?>promo<?php endif; ?>">
|
39 |
+
<a href="<?php echo $a_href ?>" data-shortcode="<?php echo esc_attr( $shortcode ); ?>" class="<?php echo $a_class ?>" <?php echo $a_target ?> >
|
40 |
<img src="<?php echo $cfg['icon']; ?>" alt="" class="icon">
|
41 |
<div class="desc">
|
42 |
<h4><?php echo $cfg['title']; ?></h4>
|
fruitful-shortcodes-2.0.0/core/view/view.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
**/
|
9 |
class view {
|
10 |
|
11 |
-
function load( $path = '', $data =
|
12 |
|
13 |
// Check for template in theme's path as a first thing
|
14 |
$theme_dir = get_stylesheet_directory();
|
8 |
**/
|
9 |
class view {
|
10 |
|
11 |
+
function load( $path = '', $data = [], $die = false, $return = false ) {
|
12 |
|
13 |
// Check for template in theme's path as a first thing
|
14 |
$theme_dir = get_stylesheet_directory();
|
package-lock.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"name": "
|
3 |
"version": "1.0.0",
|
4 |
"lockfileVersion": 1,
|
5 |
"requires": true,
|
@@ -3716,8 +3716,7 @@
|
|
3716 |
"ansi-regex": {
|
3717 |
"version": "2.1.1",
|
3718 |
"bundled": true,
|
3719 |
-
"dev": true
|
3720 |
-
"optional": true
|
3721 |
},
|
3722 |
"aproba": {
|
3723 |
"version": "1.2.0",
|
@@ -3738,14 +3737,12 @@
|
|
3738 |
"balanced-match": {
|
3739 |
"version": "1.0.0",
|
3740 |
"bundled": true,
|
3741 |
-
"dev": true
|
3742 |
-
"optional": true
|
3743 |
},
|
3744 |
"brace-expansion": {
|
3745 |
"version": "1.1.11",
|
3746 |
"bundled": true,
|
3747 |
"dev": true,
|
3748 |
-
"optional": true,
|
3749 |
"requires": {
|
3750 |
"balanced-match": "^1.0.0",
|
3751 |
"concat-map": "0.0.1"
|
@@ -3760,20 +3757,17 @@
|
|
3760 |
"code-point-at": {
|
3761 |
"version": "1.1.0",
|
3762 |
"bundled": true,
|
3763 |
-
"dev": true
|
3764 |
-
"optional": true
|
3765 |
},
|
3766 |
"concat-map": {
|
3767 |
"version": "0.0.1",
|
3768 |
"bundled": true,
|
3769 |
-
"dev": true
|
3770 |
-
"optional": true
|
3771 |
},
|
3772 |
"console-control-strings": {
|
3773 |
"version": "1.1.0",
|
3774 |
"bundled": true,
|
3775 |
-
"dev": true
|
3776 |
-
"optional": true
|
3777 |
},
|
3778 |
"core-util-is": {
|
3779 |
"version": "1.0.2",
|
@@ -3890,8 +3884,7 @@
|
|
3890 |
"inherits": {
|
3891 |
"version": "2.0.3",
|
3892 |
"bundled": true,
|
3893 |
-
"dev": true
|
3894 |
-
"optional": true
|
3895 |
},
|
3896 |
"ini": {
|
3897 |
"version": "1.3.5",
|
@@ -3903,7 +3896,6 @@
|
|
3903 |
"version": "1.0.0",
|
3904 |
"bundled": true,
|
3905 |
"dev": true,
|
3906 |
-
"optional": true,
|
3907 |
"requires": {
|
3908 |
"number-is-nan": "^1.0.0"
|
3909 |
}
|
@@ -3918,7 +3910,6 @@
|
|
3918 |
"version": "3.0.4",
|
3919 |
"bundled": true,
|
3920 |
"dev": true,
|
3921 |
-
"optional": true,
|
3922 |
"requires": {
|
3923 |
"brace-expansion": "^1.1.7"
|
3924 |
}
|
@@ -3926,14 +3917,12 @@
|
|
3926 |
"minimist": {
|
3927 |
"version": "0.0.8",
|
3928 |
"bundled": true,
|
3929 |
-
"dev": true
|
3930 |
-
"optional": true
|
3931 |
},
|
3932 |
"minipass": {
|
3933 |
"version": "2.2.4",
|
3934 |
"bundled": true,
|
3935 |
"dev": true,
|
3936 |
-
"optional": true,
|
3937 |
"requires": {
|
3938 |
"safe-buffer": "^5.1.1",
|
3939 |
"yallist": "^3.0.0"
|
@@ -3952,7 +3941,6 @@
|
|
3952 |
"version": "0.5.1",
|
3953 |
"bundled": true,
|
3954 |
"dev": true,
|
3955 |
-
"optional": true,
|
3956 |
"requires": {
|
3957 |
"minimist": "0.0.8"
|
3958 |
}
|
@@ -4033,8 +4021,7 @@
|
|
4033 |
"number-is-nan": {
|
4034 |
"version": "1.0.1",
|
4035 |
"bundled": true,
|
4036 |
-
"dev": true
|
4037 |
-
"optional": true
|
4038 |
},
|
4039 |
"object-assign": {
|
4040 |
"version": "4.1.1",
|
@@ -4046,7 +4033,6 @@
|
|
4046 |
"version": "1.4.0",
|
4047 |
"bundled": true,
|
4048 |
"dev": true,
|
4049 |
-
"optional": true,
|
4050 |
"requires": {
|
4051 |
"wrappy": "1"
|
4052 |
}
|
@@ -4132,8 +4118,7 @@
|
|
4132 |
"safe-buffer": {
|
4133 |
"version": "5.1.1",
|
4134 |
"bundled": true,
|
4135 |
-
"dev": true
|
4136 |
-
"optional": true
|
4137 |
},
|
4138 |
"safer-buffer": {
|
4139 |
"version": "2.1.2",
|
@@ -4169,7 +4154,6 @@
|
|
4169 |
"version": "1.0.2",
|
4170 |
"bundled": true,
|
4171 |
"dev": true,
|
4172 |
-
"optional": true,
|
4173 |
"requires": {
|
4174 |
"code-point-at": "^1.0.0",
|
4175 |
"is-fullwidth-code-point": "^1.0.0",
|
@@ -4189,7 +4173,6 @@
|
|
4189 |
"version": "3.0.1",
|
4190 |
"bundled": true,
|
4191 |
"dev": true,
|
4192 |
-
"optional": true,
|
4193 |
"requires": {
|
4194 |
"ansi-regex": "^2.0.0"
|
4195 |
}
|
@@ -4233,14 +4216,12 @@
|
|
4233 |
"wrappy": {
|
4234 |
"version": "1.0.2",
|
4235 |
"bundled": true,
|
4236 |
-
"dev": true
|
4237 |
-
"optional": true
|
4238 |
},
|
4239 |
"yallist": {
|
4240 |
"version": "3.0.2",
|
4241 |
"bundled": true,
|
4242 |
-
"dev": true
|
4243 |
-
"optional": true
|
4244 |
}
|
4245 |
}
|
4246 |
},
|
1 |
{
|
2 |
+
"name": "fruitful_shortcodes",
|
3 |
"version": "1.0.0",
|
4 |
"lockfileVersion": 1,
|
5 |
"requires": true,
|
3716 |
"ansi-regex": {
|
3717 |
"version": "2.1.1",
|
3718 |
"bundled": true,
|
3719 |
+
"dev": true
|
|
|
3720 |
},
|
3721 |
"aproba": {
|
3722 |
"version": "1.2.0",
|
3737 |
"balanced-match": {
|
3738 |
"version": "1.0.0",
|
3739 |
"bundled": true,
|
3740 |
+
"dev": true
|
|
|
3741 |
},
|
3742 |
"brace-expansion": {
|
3743 |
"version": "1.1.11",
|
3744 |
"bundled": true,
|
3745 |
"dev": true,
|
|
|
3746 |
"requires": {
|
3747 |
"balanced-match": "^1.0.0",
|
3748 |
"concat-map": "0.0.1"
|
3757 |
"code-point-at": {
|
3758 |
"version": "1.1.0",
|
3759 |
"bundled": true,
|
3760 |
+
"dev": true
|
|
|
3761 |
},
|
3762 |
"concat-map": {
|
3763 |
"version": "0.0.1",
|
3764 |
"bundled": true,
|
3765 |
+
"dev": true
|
|
|
3766 |
},
|
3767 |
"console-control-strings": {
|
3768 |
"version": "1.1.0",
|
3769 |
"bundled": true,
|
3770 |
+
"dev": true
|
|
|
3771 |
},
|
3772 |
"core-util-is": {
|
3773 |
"version": "1.0.2",
|
3884 |
"inherits": {
|
3885 |
"version": "2.0.3",
|
3886 |
"bundled": true,
|
3887 |
+
"dev": true
|
|
|
3888 |
},
|
3889 |
"ini": {
|
3890 |
"version": "1.3.5",
|
3896 |
"version": "1.0.0",
|
3897 |
"bundled": true,
|
3898 |
"dev": true,
|
|
|
3899 |
"requires": {
|
3900 |
"number-is-nan": "^1.0.0"
|
3901 |
}
|
3910 |
"version": "3.0.4",
|
3911 |
"bundled": true,
|
3912 |
"dev": true,
|
|
|
3913 |
"requires": {
|
3914 |
"brace-expansion": "^1.1.7"
|
3915 |
}
|
3917 |
"minimist": {
|
3918 |
"version": "0.0.8",
|
3919 |
"bundled": true,
|
3920 |
+
"dev": true
|
|
|
3921 |
},
|
3922 |
"minipass": {
|
3923 |
"version": "2.2.4",
|
3924 |
"bundled": true,
|
3925 |
"dev": true,
|
|
|
3926 |
"requires": {
|
3927 |
"safe-buffer": "^5.1.1",
|
3928 |
"yallist": "^3.0.0"
|
3941 |
"version": "0.5.1",
|
3942 |
"bundled": true,
|
3943 |
"dev": true,
|
|
|
3944 |
"requires": {
|
3945 |
"minimist": "0.0.8"
|
3946 |
}
|
4021 |
"number-is-nan": {
|
4022 |
"version": "1.0.1",
|
4023 |
"bundled": true,
|
4024 |
+
"dev": true
|
|
|
4025 |
},
|
4026 |
"object-assign": {
|
4027 |
"version": "4.1.1",
|
4033 |
"version": "1.4.0",
|
4034 |
"bundled": true,
|
4035 |
"dev": true,
|
|
|
4036 |
"requires": {
|
4037 |
"wrappy": "1"
|
4038 |
}
|
4118 |
"safe-buffer": {
|
4119 |
"version": "5.1.1",
|
4120 |
"bundled": true,
|
4121 |
+
"dev": true
|
|
|
4122 |
},
|
4123 |
"safer-buffer": {
|
4124 |
"version": "2.1.2",
|
4154 |
"version": "1.0.2",
|
4155 |
"bundled": true,
|
4156 |
"dev": true,
|
|
|
4157 |
"requires": {
|
4158 |
"code-point-at": "^1.0.0",
|
4159 |
"is-fullwidth-code-point": "^1.0.0",
|
4173 |
"version": "3.0.1",
|
4174 |
"bundled": true,
|
4175 |
"dev": true,
|
|
|
4176 |
"requires": {
|
4177 |
"ansi-regex": "^2.0.0"
|
4178 |
}
|
4216 |
"wrappy": {
|
4217 |
"version": "1.0.2",
|
4218 |
"bundled": true,
|
4219 |
+
"dev": true
|
|
|
4220 |
},
|
4221 |
"yallist": {
|
4222 |
"version": "3.0.2",
|
4223 |
"bundled": true,
|
4224 |
+
"dev": true
|
|
|
4225 |
}
|
4226 |
}
|
4227 |
},
|
package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"name": "
|
3 |
"version": "1.0.0",
|
4 |
"license": "GPL-2.0-or-later",
|
5 |
"main": "block.js",
|
1 |
{
|
2 |
+
"name": "fruitful_shortcodes",
|
3 |
"version": "1.0.0",
|
4 |
"license": "GPL-2.0-or-later",
|
5 |
"main": "block.js",
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: fruitfulcode
|
|
3 |
Donate link: https://fruitfulcode.com
|
4 |
Tags: admin, fruitful, shortcode, shortcodes, short code, editor, content, bootstrap, post, page, alert, button, promo-text, columns, progress-bar, recent-posts, posts-slider, separator, tabs
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 5.0
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -12,7 +12,7 @@ Add additional content shortcodes: Alert, Button, Promo-text, Columns, Progress-
|
|
12 |
|
13 |
== Description ==
|
14 |
<h3>Demo Website</h3>
|
15 |
-
|
16 |
<h3>Shortcodes</h3>
|
17 |
<ol>
|
18 |
<li><a href="https://shortcodes.fruitfulcode.com/shortcodes/alert/"> Alert</a></li>
|
@@ -68,6 +68,22 @@ You can check <a href="https://support.fruitfulcode.com/hc/en-us/sections/200406
|
|
68 |
11. Recent posts settings.
|
69 |
|
70 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
= 2.0 =
|
72 |
Release Date 7.11.2018
|
73 |
* Added
|
3 |
Donate link: https://fruitfulcode.com
|
4 |
Tags: admin, fruitful, shortcode, shortcodes, short code, editor, content, bootstrap, post, page, alert, button, promo-text, columns, progress-bar, recent-posts, posts-slider, separator, tabs
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 5.0.3
|
7 |
+
Stable tag: 2.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
12 |
|
13 |
== Description ==
|
14 |
<h3>Demo Website</h3>
|
15 |
+
https://shortcodes.fruitfulcode.com
|
16 |
<h3>Shortcodes</h3>
|
17 |
<ol>
|
18 |
<li><a href="https://shortcodes.fruitfulcode.com/shortcodes/alert/"> Alert</a></li>
|
68 |
11. Recent posts settings.
|
69 |
|
70 |
== Changelog ==
|
71 |
+
= 2.1 =
|
72 |
+
Release Date 15.01.2019
|
73 |
+
|
74 |
+
* Added
|
75 |
+
* Animations
|
76 |
+
* Gutenberg blocks "Fruitful Blocks"
|
77 |
+
* Shortcode Button : added button background color and button border color options
|
78 |
+
* New position for button "Fruitful shortcodes"
|
79 |
+
* "Custom shortcode" proposal button
|
80 |
+
|
81 |
+
* Tested
|
82 |
+
* To WordPress 5.0.3
|
83 |
+
|
84 |
+
* Fixed
|
85 |
+
* Plugin css styles
|
86 |
+
|
87 |
= 2.0 =
|
88 |
Release Date 7.11.2018
|
89 |
* Added
|
webpack.config.js
CHANGED
@@ -5,7 +5,7 @@ const glob = require('glob');
|
|
5 |
const path = require('path');
|
6 |
let dir = path.resolve();
|
7 |
|
8 |
-
const pathTo = dir.replace(/\\/g, '/') + '/core/gutenberg_blocks/';
|
9 |
//read all styles.scss from shortcodes
|
10 |
const stylesArray = glob.sync(pathTo + '**/block/block.scss');
|
11 |
|
@@ -71,7 +71,7 @@ module.exports = {
|
|
71 |
},
|
72 |
output: {
|
73 |
path: dir,
|
74 |
-
filename: "core/gutenberg_blocks/[name]/block/block.build.js"
|
75 |
},
|
76 |
module: {
|
77 |
rules: [
|
@@ -92,7 +92,7 @@ module.exports = {
|
|
92 |
loader: 'file-loader',
|
93 |
options: {
|
94 |
name: '[name].[ext]',
|
95 |
-
outputPath: './assets/fonts/',
|
96 |
publicPath: '../../../../assets/fonts/' // override the default path
|
97 |
}
|
98 |
}]
|
@@ -103,7 +103,7 @@ module.exports = {
|
|
103 |
loader: 'file-loader',
|
104 |
options: {
|
105 |
name: '[name].[ext]',
|
106 |
-
outputPath: './assets/img/', // where the fonts will go
|
107 |
publicPath: '../../../../assets/img/' // override the default path
|
108 |
}
|
109 |
}]
|
@@ -122,7 +122,7 @@ module.exports = {
|
|
122 |
devtool: 'source-map',
|
123 |
plugins: [
|
124 |
new MiniCssExtractPlugin({
|
125 |
-
filename: 'core/gutenberg_blocks/[name]/block/block.css'
|
126 |
})
|
127 |
]
|
128 |
};
|
5 |
const path = require('path');
|
6 |
let dir = path.resolve();
|
7 |
|
8 |
+
const pathTo = dir.replace(/\\/g, '/') + '/fruitful-shortcodes-2.0.0/core/gutenberg_blocks/';
|
9 |
//read all styles.scss from shortcodes
|
10 |
const stylesArray = glob.sync(pathTo + '**/block/block.scss');
|
11 |
|
71 |
},
|
72 |
output: {
|
73 |
path: dir,
|
74 |
+
filename: "fruitful-shortcodes-2.0.0/core/gutenberg_blocks/[name]/block/block.build.js"
|
75 |
},
|
76 |
module: {
|
77 |
rules: [
|
92 |
loader: 'file-loader',
|
93 |
options: {
|
94 |
name: '[name].[ext]',
|
95 |
+
outputPath: './fruitful-shortcodes-2.0.0/assets/fonts/',
|
96 |
publicPath: '../../../../assets/fonts/' // override the default path
|
97 |
}
|
98 |
}]
|
103 |
loader: 'file-loader',
|
104 |
options: {
|
105 |
name: '[name].[ext]',
|
106 |
+
outputPath: './fruitful-shortcodes-2.0.0/assets/img/', // where the fonts will go
|
107 |
publicPath: '../../../../assets/img/' // override the default path
|
108 |
}
|
109 |
}]
|
122 |
devtool: 'source-map',
|
123 |
plugins: [
|
124 |
new MiniCssExtractPlugin({
|
125 |
+
filename: 'fruitful-shortcodes-2.0.0/core/gutenberg_blocks/[name]/block/block.css'
|
126 |
})
|
127 |
]
|
128 |
};
|