| 1 |
<?php |
| 2 |
|
| 3 |
namespace BBlocks\Inc; |
| 4 |
|
| 5 |
if ( ! defined( 'ABSPATH' ) ) { |
| 6 |
exit; |
| 7 |
} |
| 8 |
|
| 9 |
class BlocksList |
| 10 |
{ |
| 11 |
|
| 12 |
public static function disabled() |
| 13 |
{ |
| 14 |
$disabledBlocks = get_option( 'bBlocksDisabledBlocks', [] ); |
| 15 |
$disabledBlocks = is_array( $disabledBlocks ) ? $disabledBlocks : []; |
| 16 |
|
| 17 |
// Add dependent blocks |
| 18 |
if ( in_array( 'b-blocks/row', $disabledBlocks ) && !in_array( 'b-blocks/column', $disabledBlocks ) ) { |
| 19 |
$disabledBlocks[] = 'b-blocks/column'; |
| 20 |
} |
| 21 |
if ( in_array( 'b-blocks/services', $disabledBlocks ) && !in_array( 'b-blocks/service', $disabledBlocks ) ) { |
| 22 |
$disabledBlocks[] = 'b-blocks/service'; |
| 23 |
} |
| 24 |
|
| 25 |
return $disabledBlocks; |
| 26 |
} |
| 27 |
|
| 28 |
public static function premium() |
| 29 |
{ |
| 30 |
return Utils::isPro() ? [] : ['b-blocks/logo-slider', 'b-blocks/content-ticker', 'b-blocks/image-hotspot', 'b-blocks/stacked-cards', 'b-blocks/key-takeaways', 'b-blocks/stat-cards', 'b-blocks/article-card', 'b-blocks/event-card', 'b-blocks/file-download-card', 'b-blocks/google-map', 'b-blocks/code-highlight','b-blocks/one-page-navigation']; |
| 31 |
} |
| 32 |
|
| 33 |
public static function all() |
| 34 |
{ |
| 35 |
return [ |
| 36 |
'alert', |
| 37 |
// 'anchor-nav', |
| 38 |
'advanced-image', |
| 39 |
'animated-text', |
| 40 |
'advanced-tabs', |
| 41 |
'article-card', |
| 42 |
'audio-player', |
| 43 |
// 'author-box', |
| 44 |
'blockquote', |
| 45 |
'button', |
| 46 |
'button-group', |
| 47 |
'breadcrumb', |
| 48 |
// 'business-hours', |
| 49 |
// 'call-to-action', |
| 50 |
// 'callout', |
| 51 |
'cards', |
| 52 |
'chart', |
| 53 |
'column', |
| 54 |
'container', |
| 55 |
'content-ticker', |
| 56 |
'countdown', |
| 57 |
'counters', |
| 58 |
'data-table', |
| 59 |
'table-head', |
| 60 |
'table-body', |
| 61 |
'table-row', |
| 62 |
'table-cell', |
| 63 |
'table-footer', |
| 64 |
'carousel', |
| 65 |
'carousel-slide', |
| 66 |
// 'click-to-share', |
| 67 |
'code-highlight', |
| 68 |
'comparison-table', |
| 69 |
// 'contact-card', |
| 70 |
// 'content-filter', |
| 71 |
// 'content-filter-item', |
| 72 |
// 'cookie-consent-bar', |
| 73 |
// 'coupon-code', |
| 74 |
'divider', |
| 75 |
'dual-color-heading', |
| 76 |
'emoji-stack-separator', |
| 77 |
'event-card', |
| 78 |
'expand-content', |
| 79 |
'facebook-embed', |
| 80 |
'facebook-page', |
| 81 |
// 'faq-block', |
| 82 |
'feature-boxes', |
| 83 |
// 'feature-tabs', |
| 84 |
'file-download-card', |
| 85 |
'flip-boxes', |
| 86 |
// 'floating-cta', |
| 87 |
'gif', |
| 88 |
'form-builder', |
| 89 |
'google-map', |
| 90 |
'hero-section', |
| 91 |
// 'howto-schema', |
| 92 |
'html', |
| 93 |
// 'icon', |
| 94 |
'icon-box', |
| 95 |
// 'icon-list', |
| 96 |
// 'image-accordion', |
| 97 |
// 'image-box', |
| 98 |
'image-comparison', |
| 99 |
'image-gallery', |
| 100 |
'image-hotspot', |
| 101 |
// 'image-mask', |
| 102 |
'image-scroller', |
| 103 |
// 'image-slider', |
| 104 |
'info-box', |
| 105 |
'infographic', |
| 106 |
'input-field', |
| 107 |
'instagram', |
| 108 |
'interactive-checklist', |
| 109 |
'key-takeaways', |
| 110 |
// 'logo-grid', |
| 111 |
'logo-slider', |
| 112 |
'lottie-player', |
| 113 |
'list', |
| 114 |
'mailto', |
| 115 |
// 'marquee', |
| 116 |
'media-text-section', |
| 117 |
// 'milestone-timeline', |
| 118 |
// 'modal-popup', |
| 119 |
'navigation', |
| 120 |
'news-ticker', |
| 121 |
// 'newsletter-optin', |
| 122 |
// 'notification-bar', |
| 123 |
'off-canvas', |
| 124 |
'one-page-navigation', |
| 125 |
// 'parallax-section', |
| 126 |
// 'pdf-embed', |
| 127 |
// 'popup-optin', |
| 128 |
// 'portfolio-gallery', |
| 129 |
// 'post-carousel', |
| 130 |
// 'post-filter-grid', |
| 131 |
// 'post-masonry-grid', |
| 132 |
// 'post-navigation', |
| 133 |
// 'post-timeline', |
| 134 |
'posts', |
| 135 |
'price-lists', |
| 136 |
'pricing-table', |
| 137 |
// 'pricing-toggle', |
| 138 |
'process-steps', |
| 139 |
// 'progress-bar', |
| 140 |
// 'progress-circle', |
| 141 |
// 'promo-strip', |
| 142 |
'qr-code', |
| 143 |
// 'reading-progress', |
| 144 |
// 'review-box', |
| 145 |
'row', |
| 146 |
'section-heading', |
| 147 |
'skill-bar', |
| 148 |
'service', |
| 149 |
'services', |
| 150 |
'shape-divider', |
| 151 |
'slider', |
| 152 |
// 'scroll-reveal', |
| 153 |
'scroll-to-top', |
| 154 |
// 'search-bar', |
| 155 |
'social-share', |
| 156 |
// 'social-share-bar', |
| 157 |
'whatsapp-chat', |
| 158 |
// 'woo-add-to-cart', |
| 159 |
// 'woo-best-sellers', |
| 160 |
// 'woo-category-grid', |
| 161 |
// 'woo-featured-product', |
| 162 |
// 'woo-mini-cart', |
| 163 |
// 'woo-product-carousel', |
| 164 |
// 'woo-product-filter', |
| 165 |
// 'woo-product-grid', |
| 166 |
// 'woo-product-reviews', |
| 167 |
// 'woo-sale-badge', |
| 168 |
// 'woo-single-product', |
| 169 |
'star-rating', |
| 170 |
'stacked-cards', |
| 171 |
'stat-cards', |
| 172 |
// 'sticky-sidebar', |
| 173 |
'svg-draw', |
| 174 |
'table-of-content', |
| 175 |
// 'taxonomy-grid', |
| 176 |
'td-viewer', |
| 177 |
'team-members', |
| 178 |
// 'testimonial-card', |
| 179 |
// 'testimonial-slider', |
| 180 |
'testimonials', |
| 181 |
// 'testimonials-grid', |
| 182 |
'timeline', |
| 183 |
'timeline-item', |
| 184 |
'toggle-content', |
| 185 |
'accordion-block', |
| 186 |
'video', |
| 187 |
// 'video-popup', |
| 188 |
'text-path', |
| 189 |
// 'typing-headline', |
| 190 |
// 'urgency-timer' |
| 191 |
]; |
| 192 |
} |
| 193 |
} |
| 194 |
|