← All changes
|
admin/views/configs/generator/class-sps-layout.php
+35
-190
4.0.8
→
2.2.10
View file →
| @@ -8,11 +8,11 @@ | ||
| 8 | 8 | |
| 9 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | 10 | die; } // Cannot access pages directly. |
| 11 | 11 | |
| 12 | -/** | |
| 13 | - * The Layout building class. | |
| 14 | - */ | |
| 12 | + /** | |
| 13 | + * The Layout building class. | |
| 14 | + */ | |
| 15 | 15 | class SPS_Layout { |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * Layout metabox section. |
| @@ -25,218 +25,63 @@ | ||
| 25 | 25 | $prefix, |
| 26 | 26 | array( |
| 27 | 27 | 'fields' => array( |
| 28 | 28 | array( |
| 29 | - 'type' => 'heading', | |
| 30 | - 'image' => SP_PC_URL . 'admin/assets/img/logo.svg', | |
| 31 | - 'after' => '<i class="fa fa-life-ring"></i> Support', | |
| 32 | - 'link' => 'https://shapedplugin.com/support/?user=lite', | |
| 33 | - 'class' => 'pcp-admin-header', | |
| 34 | - 'version' => SP_PC_VERSION, | |
| 29 | + 'type' => 'heading', | |
| 30 | + 'image' => SP_PC_URL . 'admin/assets/img/logo.svg', | |
| 31 | + 'after' => '<i class="fa fa-life-ring"></i> Support', | |
| 32 | + 'link' => 'https://shapedplugin.com/support/?user=lite', | |
| 33 | + 'class' => 'pcp-admin-header', | |
| 35 | 34 | ), |
| 36 | 35 | array( |
| 37 | 36 | 'id' => 'pcp_layout_preset', |
| 38 | 37 | 'type' => 'layout_preset', |
| 39 | - 'title' => __( 'Layout Preset', 'post-carousel' ), | |
| 38 | + 'title' => __( 'Layout Preset', 'smart-post-show' ), | |
| 40 | 39 | 'class' => 'pcp-layout-preset', |
| 41 | 40 | 'options' => array( |
| 42 | - 'carousel_layout' => array( | |
| 43 | - 'image' => SP_PC_URL . 'admin/img/layout-preset/carousel.svg', | |
| 44 | - 'text' => __( 'Carousel', 'post-carousel' ), | |
| 45 | - 'option_demo_url' => 'https://wpsmartpost.com/blocks/', | |
| 41 | + 'carousel_layout' => array( | |
| 42 | + 'image' => SP_PC_URL . 'admin/assets/img/carousel.png', | |
| 43 | + 'text' => __( 'Carousel', 'smart-post-show' ), | |
| 46 | 44 | ), |
| 47 | - 'slider_layout' => array( | |
| 48 | - 'image' => SP_PC_URL . 'admin/img/layout-preset/slider.svg', | |
| 49 | - 'text' => __( 'Slider', 'post-carousel' ), | |
| 50 | - 'option_demo_url' => 'https://wpsmartpost.com/blocks/#demoId3490', | |
| 45 | + 'grid_layout' => array( | |
| 46 | + 'image' => SP_PC_URL . 'admin/assets/img/grid.png', | |
| 47 | + 'text' => __( 'Grid', 'smart-post-show' ), | |
| 51 | 48 | ), |
| 52 | - 'grid_layout' => array( | |
| 53 | - 'image' => SP_PC_URL . 'admin/img/layout-preset/grid.svg', | |
| 54 | - 'text' => __( 'Grid', 'post-carousel' ), | |
| 55 | - 'option_demo_url' => 'https://wpsmartpost.com/blocks/#demoId3497', | |
| 56 | - ), | |
| 57 | - 'list_layout' => array( | |
| 58 | - 'image' => SP_PC_URL . 'admin/img/layout-preset/list.svg', | |
| 59 | - 'text' => __( 'List', 'post-carousel' ), | |
| 60 | - 'option_demo_url' => 'https://wpsmartpost.com/blocks/#demoId3509', | |
| 61 | - ), | |
| 62 | - 'thumbnails_slider' => array( | |
| 63 | - 'image' => SP_PC_URL . 'admin/img/layout-preset/thumb_slider.svg', | |
| 64 | - 'text' => __( 'Thumbs Slider', 'post-carousel' ), | |
| 65 | - 'pro_only' => true, | |
| 66 | - 'option_demo_url' => 'https://wpsmartpost.com/blocks/#demoId3570', | |
| 67 | - ), | |
| 68 | - 'masonry_layout' => array( | |
| 69 | - 'image' => SP_PC_URL . 'admin/img/layout-preset/masonry.svg', | |
| 70 | - 'text' => __( 'Masonry', 'post-carousel' ), | |
| 71 | - 'pro_only' => true, | |
| 72 | - // 'option_demo_url' => 'https://smartpostshow.com/demo/masonry/', | |
| 73 | - ), | |
| 74 | - 'filter_layout' => array( | |
| 75 | - 'image' => SP_PC_URL . 'admin/img/layout-preset/isotope.svg', | |
| 76 | - 'text' => __( 'Isotope', 'post-carousel' ), | |
| 77 | - 'pro_only' => true, | |
| 78 | - // 'option_demo_url' => 'https://smartpostshow.com/demo/isotope-filter/', | |
| 79 | - ), | |
| 80 | - 'glossary_layout' => array( | |
| 81 | - 'image' => SP_PC_URL . 'admin/img/layout-preset/glossary.svg', | |
| 82 | - 'text' => __( 'Glossary', 'post-carousel' ), | |
| 83 | - 'pro_only' => true, | |
| 84 | - // 'option_demo_url' => 'https://smartpostshow.com/demo/glossary/', | |
| 85 | - ), | |
| 86 | - 'large_with_small' => array( | |
| 87 | - 'image' => SP_PC_URL . 'admin/img/layout-preset/hierarchical_grid.svg', | |
| 88 | - 'text' => __( 'Hierarchical Grid', 'post-carousel' ), | |
| 89 | - 'pro_only' => true, | |
| 90 | - 'option_demo_url' => 'https://wpsmartpost.com/blocks/#demoId3506', | |
| 91 | - ), | |
| 92 | - 'timeline_layout' => array( | |
| 93 | - 'image' => SP_PC_URL . 'admin/img/layout-preset/timeline.svg', | |
| 94 | - 'text' => __( 'Timeline', 'post-carousel' ), | |
| 95 | - 'pro_only' => true, | |
| 96 | - 'option_demo_url' => 'https://wpsmartpost.com/blocks/#demoId3522', | |
| 97 | - ), | |
| 98 | - 'zigzag_layout' => array( | |
| 99 | - 'image' => SP_PC_URL . 'admin/img/layout-preset/zigzag.svg', | |
| 100 | - 'text' => __( 'Zigzag', 'post-carousel' ), | |
| 101 | - 'pro_only' => true, | |
| 102 | - // 'option_demo_url' => 'https://smartpostshow.com/demo/zigzag/', | |
| 103 | - ), | |
| 104 | - 'table_layout' => array( | |
| 105 | - 'image' => SP_PC_URL . 'admin/img/layout-preset/table.svg', | |
| 106 | - 'text' => __( 'Table', 'post-carousel' ), | |
| 107 | - 'pro_only' => true, | |
| 108 | - // 'option_demo_url' => 'https://smartpostshow.com/demo/posts-table/', | |
| 109 | - ), | |
| 110 | - 'accordion_layout' => array( | |
| 111 | - 'image' => SP_PC_URL . 'admin/img/layout-preset/accordion.svg', | |
| 112 | - 'text' => __( 'Accordion', 'post-carousel' ), | |
| 113 | - 'pro_only' => true, | |
| 114 | - // 'option_demo_url' => 'https://smartpostshow.com/demo/accordion/', | |
| 115 | - ), | |
| 116 | - ), | |
| 117 | - 'default' => 'carousel_layout', | |
| 118 | - ), | |
| 119 | - array( | |
| 120 | - 'id' => 'pcp_thumb_style', | |
| 121 | - 'type' => 'layout_preset', | |
| 122 | - 'class' => 'img_custom_width-3 hide-active-sign pcp_thumb_style padding_0', | |
| 123 | - 'title' => __( 'Thumbnails Slider Style', 'post-carousel' ), | |
| 124 | - 'options' => array( | |
| 125 | - 'bottom' => array( | |
| 126 | - 'image' => SP_PC_URL . 'admin/img/thumb-style/bottom.svg', | |
| 127 | - 'text' => __( 'Bottom', 'post-carousel' ), | |
| 49 | + 'list_layout' => array( | |
| 50 | + 'image' => SP_PC_URL . 'admin/assets/img/list.png', | |
| 51 | + 'text' => __( 'List', 'smart-post-show' ), | |
| 128 | 52 | 'pro_only' => true, |
| 129 | 53 | ), |
| 130 | - 'top' => array( | |
| 131 | - 'image' => SP_PC_URL . 'admin/img/thumb-style/top.svg', | |
| 132 | - 'text' => __( 'Top', 'post-carousel' ), | |
| 54 | + 'filter_layout' => array( | |
| 55 | + 'image' => SP_PC_URL . 'admin/assets/img/filter.png', | |
| 56 | + 'text' => __( 'Isotope', 'smart-post-show' ), | |
| 133 | 57 | 'pro_only' => true, |
| 134 | 58 | ), |
| 135 | - 'left' => array( | |
| 136 | - 'image' => SP_PC_URL . 'admin/img/thumb-style/left.svg', | |
| 137 | - 'text' => __( 'Left', 'post-carousel' ), | |
| 59 | + 'timeline_layout' => array( | |
| 60 | + 'image' => SP_PC_URL . 'admin/assets/img/timeline.png', | |
| 61 | + 'text' => __( 'Timeline', 'smart-post-show' ), | |
| 138 | 62 | 'pro_only' => true, |
| 139 | 63 | ), |
| 140 | - 'right' => array( | |
| 141 | - 'image' => SP_PC_URL . 'admin/img/thumb-style/right.svg', | |
| 142 | - 'text' => __( 'Right', 'post-carousel' ), | |
| 64 | + 'zigzag_layout' => array( | |
| 65 | + 'image' => SP_PC_URL . 'admin/assets/img/zigzag.png', | |
| 66 | + 'text' => __( 'Zigzag', 'smart-post-show' ), | |
| 143 | 67 | 'pro_only' => true, |
| 144 | 68 | ), |
| 145 | - ), | |
| 146 | - 'default' => 'bottom', | |
| 147 | - 'dependency' => array( 'pcp_layout_preset', '==', 'thumbnails_slider' ), | |
| 148 | - ), | |
| 149 | - array( | |
| 150 | - 'id' => 'pcp_grid_style', | |
| 151 | - 'type' => 'layout_preset', | |
| 152 | - 'class' => 'img_custom_width-2 hide-active-sign padding_0', | |
| 153 | - 'title' => __( 'Isotope Style', 'post-carousel' ), | |
| 154 | - // 'subtitle' => __( 'Choose a style for the isotope.', 'post-carousel' ), | |
| 155 | - 'inline' => true, | |
| 156 | - 'options' => array( | |
| 157 | - 'even' => array( | |
| 158 | - 'image' => SP_PC_URL . 'admin/img/isotope-style/even.svg', | |
| 159 | - 'text' => __( 'Even', 'post-carousel' ), | |
| 69 | + 'accordion_layout' => array( | |
| 70 | + 'image' => SP_PC_URL . 'admin/assets/img/collapsible.png', | |
| 71 | + 'text' => __( 'Accordion', 'smart-post-show' ), | |
| 160 | 72 | 'pro_only' => true, |
| 161 | 73 | ), |
| 162 | - 'masonry' => array( | |
| 163 | - 'image' => SP_PC_URL . 'admin/img/isotope-style/masonry.svg', | |
| 164 | - 'text' => __( 'Masonry', 'post-carousel' ), | |
| 74 | + 'large_with_small' => array( | |
| 75 | + 'image' => SP_PC_URL . 'admin/assets/img/block.png', | |
| 76 | + 'text' => __( 'Large with Small', 'smart-post-show' ), | |
| 165 | 77 | 'pro_only' => true, |
| 166 | 78 | ), |
| 167 | 79 | ), |
| 168 | - 'default' => 'even', | |
| 169 | - 'dependency' => array( 'pcp_layout_preset', '==', 'filter_layout', true ), | |
| 80 | + 'default' => 'carousel_layout', | |
| 170 | 81 | ), |
| 171 | - array( | |
| 172 | - 'id' => '_one_other_style', | |
| 173 | - 'type' => 'layout_preset', | |
| 174 | - 'class' => 'img_custom_width-3 hide-active-sign padding_0', | |
| 175 | - 'title' => __( 'Hierarchical Style', 'post-carousel' ), | |
| 176 | - // 'subtitle' => __( 'Choose a large item position for the large with small layout.', 'post-carousel' ), | |
| 177 | - 'options' => array( | |
| 178 | - 'style_1' => array( | |
| 179 | - 'image' => SP_PC_URL . 'admin/img/hierarchial-style/hierarchical_1.svg', | |
| 180 | - 'text' => __( 'Hierarchical 1', 'post-carousel' ), | |
| 181 | - 'pro_only' => true, | |
| 182 | - ), | |
| 183 | - 'style_2' => array( | |
| 184 | - 'image' => SP_PC_URL . 'admin/img/hierarchial-style/hierarchical_2.svg', | |
| 185 | - 'text' => __( 'Hierarchical 2', 'post-carousel' ), | |
| 186 | - 'pro_only' => true, | |
| 187 | - ), | |
| 188 | - 'style_3' => array( | |
| 189 | - 'image' => SP_PC_URL . 'admin/img/hierarchial-style/hierarchical_3.svg', | |
| 190 | - 'text' => __( 'Hierarchical 3', 'post-carousel' ), | |
| 191 | - 'pro_only' => true, | |
| 192 | - ), | |
| 193 | - 'style_4' => array( | |
| 194 | - 'image' => SP_PC_URL . 'admin/img/hierarchial-style/hierarchical_4.svg', | |
| 195 | - 'text' => __( 'Hierarchical 4', 'post-carousel' ), | |
| 196 | - 'pro_only' => true, | |
| 197 | - ), | |
| 198 | - 'style_5' => array( | |
| 199 | - 'image' => SP_PC_URL . 'admin/img/hierarchial-style/hierarchical_5.svg', | |
| 200 | - 'text' => __( 'Hierarchical 5', 'post-carousel' ), | |
| 201 | - 'pro_only' => true, | |
| 202 | - ), | |
| 203 | - ), | |
| 204 | - 'default' => 'style_1', | |
| 205 | - 'dependency' => array( 'pcp_layout_preset', '==', 'large_with_small', true ), | |
| 206 | - ), | |
| 207 | - array( | |
| 208 | - 'id' => 'timeline_other_style', | |
| 209 | - 'type' => 'layout_preset', | |
| 210 | - 'class' => 'timeline_other_style img_custom_width-3 hide-active-sign padding_0', | |
| 211 | - 'title' => __( 'Timeline Style', 'post-carousel' ), | |
| 212 | - // 'subtitle' => __( 'Choose a large item position for the large with small layout.', 'post-carousel' ), | |
| 213 | - 'options' => array( | |
| 214 | - 'timeline_style_1' => array( | |
| 215 | - 'image' => SP_PC_URL . 'admin/img/timeline-style/style_01.svg', | |
| 216 | - 'text' => __( 'Vertical', 'post-carousel' ), | |
| 217 | - 'pro_only' => true, | |
| 218 | - ), | |
| 219 | - 'timeline_style_2' => array( | |
| 220 | - 'image' => SP_PC_URL . 'admin/img/timeline-style/style_02.svg', | |
| 221 | - 'text' => __( 'Horizontal', 'post-carousel' ), | |
| 222 | - 'pro_only' => true, | |
| 223 | - ), | |
| 224 | - 'timeline_style_3' => array( | |
| 225 | - 'image' => SP_PC_URL . 'admin/img/timeline-style/style_03.svg', | |
| 226 | - 'text' => __( 'Right Side', 'post-carousel' ), | |
| 227 | - 'pro_only' => true, | |
| 228 | - ), | |
| 229 | - 'timeline_style_4' => array( | |
| 230 | - 'image' => SP_PC_URL . 'admin/img/timeline-style/style_04.svg', | |
| 231 | - 'text' => __( 'Left Side', 'post-carousel' ), | |
| 232 | - 'pro_only' => true, | |
| 233 | - ), | |
| 234 | - ), | |
| 235 | - 'default' => 'timeline_style_1', | |
| 236 | - 'dependency' => array( 'pcp_layout_preset', '==', 'timeline_layout', true ), | |
| 237 | - ), | |
| 238 | 82 | ), // End of fields array. |
| 239 | 83 | ) |
| 240 | 84 | ); |
| 85 | + | |
| 241 | 86 | } |
| 242 | 87 | } |