PluginProbe
Post Grid Gutenberg Blocks – PostX / 1.2.3
Post Grid Gutenberg Blocks – PostX v1.2.3
5.0.39 5.0.38 5.0.37 5.0.36 5.0.35 5.0.34 5.0.33 5.0.32 5.0.31 5.0.30 5.0.29 5.0.28 5.0.27 5.0.26 5.0.25 5.0.23 5.0.24 5.0.22 5.0.21 5.0.20 5.0.19 5.0.18 5.0.17 2.1.1 2.1.2 All 237 releases
ultimate-post / classes / Options.php

Options.php in Post Grid Gutenberg Blocks – PostX 1.2.3, at classes/Options.php

835 lines 36.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace ULTP;
3
4 defined('ABSPATH') || exit;
5
6 class Options{
7 public function __construct() {
8 add_action( 'admin_menu', array( $this, 'menu_page_callback' ) );
9 add_action( 'admin_init', array( $this, 'register_settings' ) );
10 }
11
12 public static function menu_page_callback() {
13 add_menu_page(
14 esc_html__( 'Post Blocks', 'ultimate-post' ),
15 esc_html__( 'Post Blocks', 'ultimate-post' ),
16 'manage_options',
17 'ultp-settings',
18 array( self::class, 'create_admin_page' ),
19 ULTP_URL.'assets/img/menu-panel.svg'
20 );
21 }
22
23 /**
24 * Register a setting and its sanitization callback.
25 */
26 public static function register_settings() {
27 register_setting( 'ultp_options', 'ultp_options', array( self::class, 'sanitize' ) );
28 }
29
30 /**
31 * Sanitization callback
32 */
33 public static function sanitize( $options ) {
34 if ($options) {
35 $settings = self::get_option_settings();
36 foreach ($settings as $key => $setting) {
37 if (!empty($key)) {
38 $options[$key] = isset($options[$key]) ? sanitize_text_field($options[$key]) : '';
39 }
40 }
41 }
42 return $options;
43 }
44
45 public static function get_option_settings(){
46 return array(
47 'css_save_as' => array(
48 'type' => 'select',
49 'label' => __('CSS Add Via', 'ultimate-post'),
50 'options' => array(
51 'wp_head' => __( 'Header - (Internal)','ultimate-post' ),
52 'filesystem' => __( 'File System - (External)','ultimate-post' ),
53 ),
54 'default' => 'wp_head',
55 'desc' => __('Select where you want to save CSS.', 'ultimate-post')
56 ),
57 'preloader_style' => array(
58 'type' => 'select',
59 'label' => __('Preloader Style', 'ultimate-post'),
60 'options' => array(
61 'style1' => __( 'Preloader Style 1','ultimate-post' ),
62 'style2' => __( 'Preloader Style 2','ultimate-post' ),
63 ),
64 'default' => 'style1',
65 'desc' => __('Select Preloader Style.', 'ultimate-post')
66 ),
67 'container_width' => array(
68 'type' => 'number',
69 'label' => __('Container Width', 'ultimate-post'),
70 'default' => '1140',
71 'desc' => __('Change Container Width.', 'ultimate-post')
72 ),
73 'hide_import_btn' => array(
74 'type' => 'switch',
75 'label' => __('Hide Import Button', 'ultimate-post'),
76 'default' => '',
77 'desc' => __('Hide Import Layout Button from the Gutenberg Editor.', 'ultimate-post')
78 ),
79 );
80 }
81
82 public static function get_recommended_themes(){
83 $recommended_themes = array(
84 'coblog' => array(
85 'name' => 'Coblog',
86 'slug' => 'coblog',
87 'url' => 'https://wordpress.org/themes/coblog',
88 'logo' => ULTP_URL.'assets/img/WordPress.png'
89 ),
90 'blocksy' => array(
91 'name' => 'Blocksy',
92 'slug' => 'blocksy',
93 'url' => 'https://wordpress.org/themes/blocksy/',
94 'logo' => ULTP_URL.'assets/img/WordPress.png'
95 ),
96 );
97
98 $html = '';
99 foreach ($recommended_themes as $key => $value) {
100 $html .= '<div class="ultp-recommended-theme">';
101 $html .= '<div class="ultp-recommended-image">';
102 $html .= '<img src="'.$value['logo'].'" alt="'.$value['name'].'" />';
103 $html .= '</div>';
104 $html .= '<div class="ultp-recommended-name"><a target="_blank" href="'.$value['url'].'">'.$value['name'].'</a></div>';
105 $html .= '<div class="ultp-recommended-button">';
106 $html .= '<a target="_blank" href="'.$value['url'].'" class="button button-success">'.__('Download Now').'</a>';
107 $html .= '</div>';
108 $html .= '</div>';
109 }
110 echo $html;
111 }
112
113 public static function get_changelog_data() {
114 $html = '';
115 $resource_data = file_get_contents(ULTP_PATH.'/readme.txt', "r");
116 $data = array();
117 if ($resource_data) {
118 $resource_data = explode('== Changelog ==', $resource_data);
119 if (isset($resource_data[1])) {
120 $resource_data = $resource_data[1];
121 $resource_data = explode("\n", $resource_data);
122 $inner = false;
123 $count = -1;
124
125 foreach ($resource_data as $element) {
126 if ($element){
127 if (substr_count($element, '=') > 1) {
128 $count++;
129 $temp = trim(str_replace('=', '', $element));
130 if (strpos($temp, '-') !== false) {
131 $temp = explode('-', $temp);
132 $data[$count]['date'] = trim($temp[1]);
133 $data[$count]['version'] = trim($temp[0]);
134 }
135 }
136 if (strpos($element, '* New:') !== false) {
137 $data[$count]['new'][] = trim(str_replace('* New:', '', $element));
138 }
139 if (strpos($element, '* Fix:') !== false) {
140 $data[$count]['fix'][] = trim(str_replace('* Fix:', '', $element));
141 }
142 if (strpos($element, '* Update:') !== false) {
143 $data[$count]['update'][] = trim(str_replace('* Update:', '', $element));
144 }
145 }
146 }
147 }
148 }
149 if (!empty($data)) {
150 foreach ($data as $k => $inner_data) {
151 $html .= '<div class="ultp-changelog-wrap">';
152 foreach ($inner_data as $key => $changelog) {
153 if ($key == 'date') {
154 $html .= '<div class="ultp-changelog-date">'.__('Released on ', 'ultimate-post').' '.$changelog.'</div>';
155 } elseif($key == 'version') {
156 $html .= '<div class="ultp-changelog-version">'.__('Version', 'ultimate-post').' : '.$changelog.'</div>';
157 } else {
158 foreach ($changelog as $keyword => $val) {
159 $html .= '<div class="ultp-changelog-title"><span class="changelog-'.$key.'">'.$key.'</span>'.$val.'</div>';
160 }
161 }
162 }
163 $html .= '</div>';
164 }
165 }
166 echo $html;
167 }
168
169 public static function get_settings_data() {
170 $html = '';
171 $option_data = get_option( 'ultp_options' );
172 if(!$option_data){
173 $option_data = ultimate_post()->init_set_data();
174 }
175 $data = self::get_option_settings();
176 $html .= '<div class="ultp-settings">';
177 $html .= '<input type="hidden" name="option_page" value="ultp_options" />';
178 $html .= '<input type="hidden" name="action" value="update" />';
179 $html .= wp_nonce_field( "ultp_options-options" );
180 foreach ($data as $key => $value) {
181 $html .= '<div class="ultp-settings-wrap">';
182 $html .= '<div class="ultp-settings-label">'.$value['label'].'</div>';
183 $html .= '<div class="ultp-settings-field-wrap">';
184 switch ($value['type']) {
185
186 case 'select':
187 $html .= '<div class="ultp-settings-field">';
188 $val = isset($option_data[$key]) ? $option_data[$key] : (isset($value['default']) ? $value['default'] : '');
189 $html .= '<select name="ultp_options['.$key.']">';
190 foreach ( $value['options'] as $id => $label ) {
191 $html .= '<option value="'.$id.'" '.( $val == $id ? ' selected="selected"':'').'>';
192 $html .= strip_tags( $label );
193 $html .= '</option>';
194 }
195 $html .= '</select>';
196 $html .= '<p class="description">'.$value['desc'].'</p>';
197 $html .= '</div>';
198 break;
199
200 case 'color':
201 $html .= '<div class="ultp-settings-field">';
202 $val = isset($option_data[$key]) ? $option_data[$key] : (isset($value['default']) ? $value['default'] : '');
203 $html .= '<input name="ultp_options['.$key.']" value="'.$val.'" class="ultp-color-picker" />';
204 $html .= '<p class="description">'.$value['desc'].'</p>';
205 $html .= '</div>';
206 break;
207
208 case 'number':
209 $html .= '<div class="ultp-settings-field">';
210 $val = isset($option_data[$key]) ? $option_data[$key] : (isset($value['default']) ? $value['default'] : '');
211 $html .= '<input type="number" name="ultp_options['.$key.']" value="'.$val.'"/>';
212 $html .= '<p class="description">'.$value['desc'].'</p>';
213 $html .= '</div>';
214 break;
215
216 case 'switch':
217 $html .= '<div class="ultp-settings-field">';
218 $val = isset($option_data[$key]) ? $option_data[$key] : (isset($value['default']) ? $value['default'] : '');
219 $html .= '<input type="checkbox" value="yes" name="ultp_options['.$key.']" '.($val == 'yes' ? 'checked' : '').' />';
220 $html .= '<p class="description">'.$value['desc'].'</p>';
221 $html .= '</div>';
222 break;
223
224 default:
225 # code...
226 break;
227
228 }
229 $html .= '</div>';
230 $html .= '</div>';
231 }
232 $html .= '<div class="ultp-settings-wrap ultp-submit-button">';
233 $html .= '<div></div>'.get_submit_button();
234 $html .= '</div>';
235
236 $html .= '</div>';
237
238
239
240 echo '<form method="post" action="options.php">'.$html.'</form>';
241 }
242
243
244 public static function get_support_data() {
245 $html = '';
246 $html .= '<div class="ultp-admin-sidebar">';
247
248 $html .= '<div class="ultp-admin-card ultp-sidebar-card">';
249 $html .= '<h3 class="ultp-sidebar-title">'.esc_html__( 'Coblog Theme', 'ultimate-post' ).'</h3>';
250 $html .= '<p class="ultp-sidebar-content">'.esc_html__( 'Responsive WordPress Theme news theme built for personal blog, blogging, blogger, journal, lifestyle, magazine, photography, editorial, traveler and so on.', 'ultimate-post' ).'</p>';
251 $html .= '<h4>'.esc_html__( 'Core Features', 'ultimate-post' ).'</h4>';
252 $html .= '<ul class="ultp-sidebar-list">';
253 $html .= '<li>'.esc_html__( 'Based On Gutenberg', 'ultimate-post' ).'</li>';
254 $html .= '<li>'.esc_html__( 'Header Variations', 'ultimate-post' ).'</li>';
255 $html .= '<li>'.esc_html__( 'Footer Variations', 'ultimate-post' ).'</li>';
256 $html .= '<li>'.esc_html__( 'Advanced Option Panel', 'ultimate-post' ).'</li>';
257 $html .= '<li>'.esc_html__( 'Box Width layout', 'ultimate-post' ).'</li>';
258 $html .= '<li>'.esc_html__( 'Unlimited Color Options', 'ultimate-post' ).'</li>';
259 $html .= '</ul>';
260 $html .= '<a class="button button-success" target="_blank" href="https://wordpress.org/themes/coblog">'.__('Free Download', 'ultimate-post').'</a>';
261 $html .= '</div>';//ultp-admin-card
262
263 $html .= '</div>';//ultp-admin-sidebar
264 echo $html;
265 }
266
267 /**
268 * Settings page output
269 */
270 public static function create_admin_page() { ?>
271 <style>
272 /* ----Common--- */
273 #wpbody-content, #wpwrap{
274 background-color: #f2f2f2;
275 -webkit-font-smoothing: subpixel-antialiased;
276 }
277 .error, .notice {
278 display: none;
279 }
280 #wpcontent {
281 padding-left: 0px;
282 }
283 .ultp-option-body {
284 position: relative;
285 font-size: 15px;
286 max-width: 100%;
287 display:block;
288 }
289
290 /* ----Header--- */
291 .ultp-setting-header {
292 width: 100%;
293 display: flex;
294 align-items: center;
295 padding: 20px 40px;
296 box-sizing: border-box;
297 background: #fff;
298 }
299 .ultp-setting-header img {
300 margin-left:auto;
301 }
302 .ultp-setting-header-info h1 {
303 margin: 0;
304 font-weight: 300;
305 font-size: 35px;
306 line-height: normal;
307 color: #000;
308 }
309 .ultp-setting-header-info p {
310 font-size: 14px;
311 margin-top: 5px;
312 margin-bottom: 0;
313 font-weight:300;
314 }
315 .ultp-setting-header-info p a {
316 margin-left: 5px;
317 text-decoration: none;
318 color: #007AFF;
319 }
320 .ultp-setting-header-info p a span {
321 color: #FF9920;
322 margin-left: 10px;
323 font-size: 18px;
324 letter-spacing: 4px;
325 }
326
327
328
329
330 /* ----common--- */
331 .ultp-admin-card {
332 box-shadow: 0 0 10px -5px rgba(0,0,0,0.5);
333 background-color: #fff;
334 }
335 .ultp-title {
336 margin-top:0;
337 color: #000;
338 }
339 .ultp-overview {
340 padding: 50px;
341 display:flex;
342 }
343 .ultp-overview-content {
344 max-width: 50%;
345 padding-right: 30px;
346 }
347 .wp-core-ui .button-primary {
348 background: #006ade;
349 border-color: #006ade;
350 border-radius: 2px;
351 padding: 3px 15px;
352 font-weight: 400;
353 height: auto;
354 }
355 .wp-core-ui .button.button-success {
356 background: #14bd62;
357 border-color: #14bd62;
358 color: #fff;
359 margin-left: 10px;
360 transition: 400ms;
361 border-radius: 2px;
362 padding: 3px 15px;
363 font-weight: 400;
364 height: auto;
365 }
366 .wp-core-ui .button.button-success:hover {
367 background: #14d26c;
368 border-color: #14d26c;
369 }
370 .wp-core-ui .button.button-primary:hover {
371 background: #007afe;
372 border-color: #007afe;
373 }
374 .wp-core-ui .button.button-success:focus {
375 box-shadow: 0 0 0 1px #10b35b;
376 }
377 .wp-core-ui .button.button-primary:focus {
378 box-shadow: 0 0 0 1px #016BDF;
379 }
380 .ultp-overview-text {
381 font-size: 14px;
382 font-weight: 300;
383 line-height: 25px;
384 }
385 .ultp-overview-text .button {
386 margin-top: 30px;
387 }
388 .ultp-overview-feature {
389 margin-top: 40px;
390 }
391
392 .ultp-dashboard-list {
393 list-style: none;
394 padding: 0;
395 }
396 .ultp-dashboard-list li {
397 font-size: 14px;
398 font-weight: 300;
399 line-height: 26px;
400 position: relative;
401 padding: 0 20px;
402 display: inline-block;
403 width: 40%;
404 }
405 .ultp-dashboard-list li:after {
406 content: "";
407 left: 0;
408 width: 8px;
409 height: 8px;
410 border-radius: 100px;
411 background: #dcdcdc;
412 position: absolute;
413 top: 50%;
414 margin-top: -4px;
415 }
416
417
418
419 /* ----Sidebar--- */
420 .ultp-sidebar-card {
421 padding: 0 20px 25px;
422 }
423 .ultp-sidebar-title {
424 margin: 0 -20px 0;
425 background: #FAFAFA;
426 padding: 15px 20px;
427 font-size: 16px;
428 border-bottom: 1px solid #EEEEEE;
429 color: #000;
430 }
431 .ultp-sidebar-card h4 {
432 color: #000;
433 margin-top: 25px;
434 }
435 .ultp-sidebar-list {
436 list-style: none;
437 padding: 0;
438 margin-bottom: 30px;
439 }
440 .ultp-sidebar-list li {
441 font-size: 13px;
442 padding: 0 20px;
443 position: relative;
444 margin-right: auto;
445 line-height: 24px;
446 }
447 .ultp-sidebar-list li:after {
448 content: "";
449 left: 0;
450 width: 8px;
451 height: 8px;
452 border-radius: 100px;
453 background: #dcdcdc;
454 position: absolute;
455 top: 50%;
456 margin-top: -4px;
457 }
458 .ultp-sidebar-content {
459 margin-top: 25px;
460 }
461
462 /* ----Tab--- */
463 .ultp-content-wrap {
464 padding: 40px;
465 display: flex;
466 width: 100%;
467 box-sizing: border-box;
468 }
469 .ultp-tab-content-wrap {
470 width: 75%;
471 margin-right: 30px;
472 -webkit-box-flex: 0;
473 -ms-flex: 0 0 75%;
474 flex: 0 0 75%;
475 max-width: 75%;
476 }
477
478 .ultp-tab-title-wrap{
479 padding: 0 40px;
480 background-color: #ffffff;
481 border-bottom: 3px solid #d5d5d5;
482 }
483 .ultp-tab-title{
484 font-weight: 300;
485 color: #555;
486 font-size: 15px;
487 display: inline-block;
488 margin-right: 25px;
489 padding: 10px 0;
490 }
491 .ultp-tab-title:hover{
492 cursor: pointer;
493 }
494 .ultp-tab-title.active{
495 border-bottom: 3px solid #007AFF;
496 color: #007AFF;
497 margin-bottom: -3px;
498 }
499 .ultp-tab-content{
500 display: none;
501 }
502 .ultp-tab-content.active{
503 display: block;
504 }
505
506 /* ----Settings--- */
507 .ultp-settings-wrap {
508 margin-bottom: 20px;
509 display: grid;
510 grid-template-columns: 0.8fr 1fr;
511 }
512
513
514 /* ----Recomended--- */
515 .ultp-recommended-theme{
516 max-width: 100%;
517 background-color: #ffffff;
518 border-radius: 3px;
519 box-shadow: 0 0 10px -5px rgba(0,0,0,0.5);
520 margin-bottom: 30px;
521 }
522 .ultp-recommended-image, .ultp-recommended-name, .ultp-recommended-button {
523 display: inline-block;
524 vertical-align: middle;
525 }
526 .ultp-recommended-name {
527 font-size: 18px;
528 margin-left: 20px;
529 }
530 .ultp-recommended-name a {
531 transition: 400ms;
532 color: #000000;
533 text-decoration: none;
534 transition: 400ms;
535 }
536 .ultp-recommended-name a:hover {
537 color: #007AFF;
538 }
539 .ultp-recommended-image {
540 border-right: 1px solid #ececec;
541 }
542 .ultp-recommended-image img {
543 width: 70px;
544 }
545 .ultp-recommended-button {
546 float: right;
547 margin: 20px 20px 0 0;
548 position: relative;
549 }
550 .ultp-recommended-button a{
551 float: right;
552 transition: 200ms;
553 text-decoration: none;
554 }
555 .ultp-recommended-button a:hover{
556 cursor: pointer;
557 }
558
559 /* ---Video Tutorials--- */
560 .ultp-overview-video iframe {
561 box-shadow: 0 0 10px -5px rgba(0,0,0,0.5);
562 }
563 .ultp-video-tutorials {
564 display: grid;
565 grid-template-columns: 1fr 1fr 1fr;
566 grid-gap: 30px;
567 }
568 .ultp-video-tutorial {
569 box-shadow: 0 0 10px -5px rgba(0,0,0,0.5);
570 background-color: #fff;
571 }
572 .ultp-video-tutorial iframe {
573 box-shadow: 0 0 10px -5px rgba(0,0,0,0.5);
574 width: 100%;
575 height: 207px;
576 }
577 .ultp-video-tutorial h4 {
578 color: #000;
579 margin: 0;
580 padding: 15px 20px 20px;
581 }
582 /* ---Changelog--- */
583 .ultp-changelog-wrap {
584 background-color: #ffffff;
585 margin: 0 auto 30px;
586 padding: 25px 30px;
587 position: relative;
588 box-shadow: 0 0 10px -5px rgba(0,0,0,0.5);
589 }
590 .ultp-changelog-date{
591 font-size: 14px;
592 display: inline-block;
593 right: 30px;
594 position: absolute;
595 font-weight: 300;
596 }
597 .ultp-changelog-version{
598 font-size: 16px;
599 color: #000000;
600 font-weight: 700;
601 margin-bottom: 20px;
602 }
603 .ultp-changelog-title {
604 text-transform: capitalize;
605 font-size: 14px;
606 color: #555555;
607 line-height: 28px;
608 font-weight: 300;
609 margin-bottom: 8px;
610 }
611 .ultp-changelog-title > span {
612 padding: 2px 10px;
613 border-radius: 3px;
614 margin-right: 10px;
615 }
616 .changelog-fix{
617 color: #721c24;
618 background-color: #f8d7da;
619 border-color: #f5c6cb;
620 }
621 .changelog-update{
622 color: #856404;
623 background-color: #fff3cd;
624 border-color: #ffeeba;
625 }
626 .changelog-new{
627 color: #155724;
628 background-color: #d4edda;
629 border-color: #c3e6cb;
630 }
631
632 /* ----Responsive--- */
633 @media (max-width: 1500px) {
634 .ultp-overview {
635 flex-wrap: wrap;
636 flex-direction: column-reverse;
637 }
638 .ultp-overview-content {
639 max-width: 100%;
640 }
641 .ultp-overview-video {
642 margin-bottom: 40px;
643 }
644 .ultp-overview-video iframe {
645 width: 640px;
646 height: 360px;
647 box-shadow: 0 0 10px -5px rgba(0,0,0,0.5);
648 }
649 .ultp-video-tutorials {
650 grid-template-columns: 1fr 1fr;
651 }
652 }
653 @media (max-width: 1400px) {
654 .ultp-sidebar-card .button.button-primary {
655 text-align: center;
656 display: block;
657 }
658 .ultp-sidebar-card .button.button-success {
659 text-align: center;
660 display: block;
661 margin-left: 0;
662 margin-top: 10px;
663 }
664 }
665 @media (max-width: 1200px) {
666 .ultp-content-wrap {
667 flex-wrap: wrap;
668 }
669 .ultp-tab-content-wrap {
670 width: 100%;
671 margin-right: 0;
672 -webkit-box-flex: 0;
673 -ms-flex: 0 0 100%;
674 flex: 0 0 100%;
675 max-width: 100%;
676 }
677 .ultp-admin-sidebar {
678 margin-top: 40px;
679 }
680 }
681 @media (max-width: 1000px) {
682 .ultp-setting-header-info h1 {
683 font-size: 28px;
684 }
685 .ultp-overview-video iframe {
686 width: 350px;
687 height: 250px;
688 }
689 .ultp-setting-header {
690 padding: 20px 30px;
691 }
692 .ultp-tab-title-wrap {
693 padding: 0 30px;
694 }
695 .ultp-overview {
696 padding: 30px;
697 }
698 .ultp-video-tutorials {
699 grid-template-columns: 1fr;
700 }
701 }
702 </style>
703
704 <div class="ultp-option-body">
705 <div class="ultp-setting-header">
706 <div class="ultp-setting-header-info">
707 <h1>
708 <?php _e('Welcome to <strong>Gutenberg Post Blocks</strong> - Version', 'ultimate-post'); ?><span> <?php echo ULTP_VER; ?></span>
709 </h1>
710 <p><?php esc_html_e('Most Powerful & Advanced Gutenberg Kit', 'ultimate-post'); ?><a href="https://wordpress.org/support/plugin/ultimate-post/reviews/#new-post"><?php esc_html_e('Rate the plugin', 'ultimate-post'); ?><span>�
711
712
713
714
715 <span></a></p>
716 </div>
717 <img src="<?php echo ULTP_URL.'assets/img/logo-option.svg'; ?>" alt="<?php _e('Gutenberg Post Blocks', 'ultimate-post'); ?>">
718 </div>
719
720 <?php $section = isset($_GET['tab']) ? $_GET['tab'] :'started'; ?>
721 <div class="ultp-tab-wrap">
722 <div class="ultp-tab-title-wrap">
723 <div data-title="started" class="ultp-tab-title<?php if($section == 'started'){ echo ' active'; } ?>"><?php _e('Getting Started', 'ultimate-post'); ?></div>
724 <div data-title="settings" class="ultp-tab-title<?php if($section == 'settings'){ echo ' active'; } ?>"><?php _e('General Settings', 'ultimate-post'); ?></div>
725 <div data-title="recommended" class="ultp-tab-title<?php if($section == 'recommended'){ echo ' active'; } ?>"><?php _e('Recommended Theme', 'ultimate-post'); ?></div>
726 <div data-title="tutorials" class="ultp-tab-title<?php if($section == 'tutorials'){ echo ' active'; } ?>"><?php _e('Video Tutorials', 'ultimate-post'); ?></div>
727 <div data-title="changelog" class="ultp-tab-title<?php if($section == 'changelog'){ echo ' active'; } ?>"><?php _e('Changelog', 'ultimate-post'); ?></div>
728 </div>
729 <div class="ultp-content-wrap">
730 <div class="ultp-tab-content-wrap">
731 <div class="ultp-tab-content<?php if($section == 'started'){ echo ' active'; } ?>"><!-- #Recommended Theme Content -->
732 <div class="ultp-overview ultp-admin-card">
733 <div class="ultp-overview-content">
734 <div class="ultp-overview-text">
735 <h3 class="ultp-title"><?php esc_html_e( 'Quick Overview', 'ultimate-post' ); ?></h3>
736 <?php esc_html_e('Gutenberg Post Blocks is a Gutenberg post block plugins for creating beautiful Gutenberg post grid blocks, post listing blocks, post slider blocks and post carousel blocks within a few seconds.', 'ultimate-post'); ?>
737 <div>
738 <a href="https://www.wpxpo.com/" class="button button-primary"><?php esc_html_e('Plugin Details', 'ultimate-post'); ?></a>
739 <a class="button button-success" target="_blank" href="https://demo.wpxpo.com/layouts/"><?php esc_html_e('Free Layout Pack', 'ultimate-post'); ?></a>
740 </div>
741 </div><!--/.ultp-about-text-->
742 <div class="ultp-overview-feature">
743 <h3 class="ultp-title"><?php esc_html_e( 'Core Features', 'ultimate-post' ); ?></h3>
744 <ul class="ultp-dashboard-list">
745 <li><?php esc_html_e( 'Infinite Load More', 'ultimate-post' ); ?></li>
746 <li><?php esc_html_e( 'Advanced Pagination', 'ultimate-post' ); ?></li>
747 <li><?php esc_html_e( 'Advanced Query', 'ultimate-post' ); ?></li>
748 <li><?php esc_html_e( 'Premade Layouts', 'ultimate-post' ); ?></li>
749 <li><?php esc_html_e( 'Premade Blocks', 'ultimate-post' ); ?></li>
750 <li><?php esc_html_e( 'Post List View', 'ultimate-post' ); ?></li>
751 <li><?php esc_html_e( 'Post Grid View', 'ultimate-post' ); ?></li>
752 <li><?php esc_html_e( 'Filter Option', 'ultimate-post' ); ?></li>
753 <li><?php esc_html_e( 'Post Carousel', 'ultimate-post' ); ?></li>
754 <li><?php esc_html_e( 'Image Overlay', 'ultimate-post' ); ?></li>
755 </ul>
756 </div><!--/.ultp-overview-feature-->
757 </div><!--/.ultp-overview-content-->
758 <div class="ultp-overview-video">
759 <h3 class="ultp-title"><?php esc_html_e( 'Getting started', 'ultimate-post' ); ?></h3>
760 <iframe width="500" height="315" src="https://www.youtube.com/embed/JZxIflYKOuM" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
761 </div>
762 </div><!--/.ultp-dashboard-->
763
764 </div>
765 <div class="ultp-tab-content<?php if($section == 'settings'){ echo ' active'; } ?>"><!-- #Settings Content -->
766 <div class="ultp-overview ultp-admin-card"><!-- #Settings Content -->
767 <?php self::get_settings_data(); ?>
768 </div>
769 </div>
770 <div class="ultp-tab-content<?php if($section == 'recommended'){ echo ' active'; } ?>"><!-- #Recommended Theme Content -->
771 <div class="ultp-admin-themes"><!-- #Settings Content -->
772 <?php self::get_recommended_themes(); ?>
773 </div>
774 </div>
775 <div class="ultp-tab-content<?php if($section == 'tutorials'){ echo ' active'; } ?>"><!-- #Video Tutorial -->
776 <div class="ultp-video-tutorials">
777 <div class="ultp-video-tutorial">
778 <iframe src="https://www.youtube.com/embed/S0kU_FSa2wc" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
779 <h4><?php esc_html_e('How to Import Layouts','ultimate-post'); ?></h4>
780 </div>
781 <div class="ultp-video-tutorial">
782 <iframe src="https://www.youtube.com/embed/lvRO359JuPw" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
783 <h4><?php esc_html_e('How to use advaced query builder','ultimate-post'); ?></h4>
784 </div>
785 <div class="ultp-video-tutorial">
786 <iframe width="560" height="315" src="https://www.youtube.com/embed/Eoz5yr8BAWY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
787 <h4><?php esc_html_e('How to use Post Slider','ultimate-post'); ?></h4>
788 </div>
789 <div class="ultp-video-tutorial">
790 <iframe src="https://www.youtube.com/embed/gqaXZ9nQEV8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
791 <h4><?php esc_html_e('How to use Advanced Pagination','ultimate-post'); ?></h4>
792 </div>
793 <div class="ultp-video-tutorial">
794 <iframe width="560" height="315" src="https://www.youtube.com/embed/kwGhNfBD6AA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
795 <h4><?php esc_html_e('How to use Pre-made Blocks','ultimate-post'); ?></h4>
796 </div>
797 <div class="ultp-video-tutorial">
798 <iframe src="https://www.youtube.com/embed/bcZJt2aN7hM" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
799 <h4><?php esc_html_e('How to use Image Overlay','ultimate-post'); ?></h4>
800 </div>
801 <div class="ultp-video-tutorial">
802 <iframe src="https://www.youtube.com/embed/2yIcx-2QkiE" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
803 <h4><?php esc_html_e('How to use Category','ultimate-post'); ?></h4>
804 </div>
805 <div class="ultp-video-tutorial">
806 <iframe src="https://www.youtube.com/embed/WGRy7CHcMFU" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
807 <h4><?php esc_html_e('How to use Meta','ultimate-post'); ?></h4>
808 </div>
809 </div>
810 </div>
811 <div class="ultp-tab-content<?php if($section == 'changelog'){ echo ' active'; } ?>"><!-- #Changelog Content -->
812 <?php self::get_changelog_data(); ?>
813 </div>
814 </div>
815 <?php self::get_support_data(); ?>
816 </div>
817 </div>
818
819 <script type="text/javascript">
820 jQuery( document ).ready(function() {
821 jQuery( document ).on( "click", '.ultp-tab-title', function(e){
822 jQuery(this).closest('.ultp-tab-wrap').find('.ultp-tab-title').removeClass('active').eq(jQuery(this).index()).addClass('active')
823 jQuery(this).closest('.ultp-tab-wrap').find('.ultp-tab-content').removeClass('active').eq(jQuery(this).index()).addClass('active');
824 let refresh = window.location.protocol + "//" + window.location.host + window.location.pathname + '?page=ultp-settings&tab='+jQuery(this).data('title');
825 window.history.pushState({ path: refresh }, '', refresh);
826 jQuery('input[name=_wp_http_referer]').val(window.location.pathname + '?page=ultp-settings&tab=settings');
827 });
828 });
829 </script>
830 </div>
831
832 <?php }
833 }
834
835