PluginProbe
Countdown Timer – Widget Countdown / 2.4.4
Countdown Timer – Widget Countdown v2.4.4
2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5.0 All 182 releases
widget-countdown / includes / admin_menu.php

admin_menu.php in Countdown Timer – Widget Countdown 2.4.4, at includes/admin_menu.php

813 lines 34.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*############################### Admin Menu ########################################*/
4
5 class wpdevart_countdown_admin_menu{
6
7 private $menu_name;
8 private $databese_parametrs;
9 private $plugin_url;
10 private $plugin_path;
11
12 /*###################### Construct parameters function ##################*/
13
14 function __construct($param){
15
16 $this->menu_name=$param['menu_name'];
17 if(isset($param['databese_parametrs']))
18 $this->databese_parametrs=$param['databese_parametrs'];
19 if(isset($params['plugin_url']))
20 $this->plugin_url=$params['plugin_url'];
21 else
22 $this->plugin_url=trailingslashit(dirname(plugins_url('',__FILE__)));
23 if(isset($params['plugin_path']))
24 $this->plugin_path=$params['plugin_url'];
25 else
26 $this->plugin_path=trailingslashit(dirname( plugin_dir_path( __FILE__ )));
27 // include requered files
28 $this->include_files();
29 // Insert button code
30 add_action('media_buttons', array($this,'wpdevart_countdown_button'));
31 add_action( 'wp_ajax_wpdevart_countdown_window_manager', array($this,'wpdevart_countdown_window_insert_content') );
32 /*gutenberg editor integration*/
33 $this->integrete_gutenberg();
34 }
35
36 /*############################### Insert button function ########################################*/
37
38 private function include_files(){
39 require_once($this->plugin_path.'includes/gutenberg/gutenberg.php');
40 }
41
42 private function integrete_gutenberg(){
43 $wpdevart_countdown = new wpda_countdown_gutenberg($this->plugin_url);
44 }
45 /*############################### Insert button function ########################################*/
46
47 public function wpdevart_countdown_button() {
48
49 $img = $this->plugin_url. 'images/post_button.jpg';
50
51 $title = 'Add Countdown';
52 $context = '<a class="button thickbox" title="Create countdown and insert in posts/pages" href="'.admin_url("admin-ajax.php").'?action=wpdevart_countdown_window_manager&height=750&width=640">
53 <span class="wp-media-buttons-icon" style="background: url('.$img.'); background-repeat: no-repeat; background-position: left bottom;"></span>
54 Add Countdown
55 </a>';
56 echo $context;
57 }
58
59 /*############ Insert countdown - content function ################*/
60
61 public function wpdevart_countdown_window_insert_content(){
62 //wp_enqueue_script('jquery-ui-slider');
63 ?>
64 <style>
65 .wp-picker-container{
66 position:relative;
67 }
68 #miain_wpdevart_countdown_window_manager > tbody > tr:nth-child(odd) {
69 background-color: rgba(176, 176, 176, 0.07);
70 }
71 #miain_wpdevart_countdown_window_manager>tfoot>tr>td{
72 border-top:1px solid #ccc;
73 }
74 #TB_window{
75 overflow-y: auto;
76 }
77 #TB_ajaxContent{
78 width:95% !important;
79 }
80 .wp-picker-holder{
81 position: absolute;
82 z-index: 100000;
83 }
84 .desription_class{
85 float: right;
86 cursor: default;
87 color: #0074a2;
88 font-size: 18px;
89 font-weight: bold;
90 border: 1px solid #000000;
91 border-radius: 200px;
92 height: 20px;
93 padding-left: 6px;
94 padding-right: 6px;
95 margin-left: 15px;
96 }
97 .pro_feature {
98 font-size: 13px;
99 font-weight: bold;
100 color: #7052fb;
101 }
102 </style>
103 <table id="miain_wpdevart_countdown_window_manager" class="wp-list-table widefat fixed posts section_parametrs_table">
104 <tbody>
105 <tr>
106 <td>
107 Day field text <span title="Type here text for Day field." class="desription_class">?</span>
108 </td>
109 <td>
110 <input type="text" name="countdown_days_text" id="countdown_days_text" value="Days">
111 </td>
112 </tr>
113 <tr>
114 <td>
115 Hour field text <span title="Type here text for Hour field." class="desription_class">?</span>
116 </td>
117 <td>
118 <input type="text" name="countdown_hourse_text" id="countdown_hourse_text" value="Hours">
119 </td>
120 </tr>
121 <tr>
122 <td>
123 Minute field text <span title="Type here text for Minute field." class="desription_class">?</span>
124 </td>
125 <td>
126 <input type="text" name="countdown_minuts_text" id="countdown_minuts_text" value="Minutes">
127 </td>
128 </tr>
129 <tr>
130 <td>
131 Second field text <span title="Type here text for Second field." class="desription_class">?</span>
132 </td>
133 <td>
134 <input type="text" name="countdown_seconds_text" id="countdown_seconds_text" value="Seconds">
135 </td>
136 </tr>
137 <tr>
138 <td>
139 Countdown date picker type <span title="Select the Countdown date picker type." class="desription_class">?</span>
140
141 </td>
142 <td>
143 <select class="show_hide_experet_type" id="countdown_experet_type">
144 <option selected="selected" value="time">Time</option>
145 <option value="date">Date</option>
146 </select>
147 </td>
148 </tr>
149 <tr class="expert_type_date" style="display:none">
150 <td>
151 Countdown expire date: <span title="Select Countdown expire date." class="desription_class">?</span>
152 </td>
153 <td>
154 <input type="text" value="<?php echo date('d-m-Y 23:59') ?>" id="countdown_experet_date" /><small>dd-mm-yyyy hh:ii</small>
155 </td>
156 </tr>
157 <tr class="expert_type_time">
158 <td>
159 Countdown expire time <span title="Type the Countdown expire time." class="desription_class">?</span>
160 </td>
161 <td style="vertical-align: top !important;">
162 <span style="display:inline-block; margin-right:3px; width:70px; float:left;">
163 <input type="text" placeholder="Day" id="countdownday" size="3" value="0"/>
164 <small style="display:block">Day</small>
165 </span>
166 <span style="display:inline-block; width:72px; float:left;">
167 <input type="text" placeholder="Hour" id="countdownhour" size="3" value="1"/>
168 <small>Hour</small>
169 </span>
170 <span style="display:inline-block; width:55px;">
171 <input type="text" placeholder="Minut" id="countdownminute" size="3" value="1"/>
172 <small>Minute</small>
173 </span>
174 <input type="hidden" value='<?php echo mktime (date("H"), date("i"), date("s"),date("n"), date("j"),date("Y")); ?>' id="countdown_start_date" name="countdown_start_date" />
175 </td>
176 </tr>
177 <tr>
178 <td>
179 <span>Mobile devices</span> <span title="This option allow to show or hide countdown on mobile devices." class="desription_class">?</span>
180 </td>
181 <td>
182 <select id="countdown_hide_on_mobile" >
183 <option selected="selected" value="show">Show</option>
184 <option value="hide">Hide</option>
185 </select>
186 </td>
187 </tr>
188 <tr>
189 <td>
190 <span style="color:red">After Countdown expire</span> <span title="Select the action you prefere after Countdown time expire." class="desription_class">?</span>
191 </td>
192 <td>
193 <select id="countdownstart_on" >
194 <option selected="selected" value="hide">Hide countdown</option>
195 <option value="show_text">Show text</option>
196 <option value="redirect">Redirect</option>
197 </select>
198 </td>
199 </tr>
200 </tr>
201 <tr>
202 <td>
203 Message after countdown expire <span title="Type the message that will appear after countdown time expire. " class="desription_class">?</span>
204 </td>
205 <td>
206 <textarea type="text" name="expeiret_text" id="expeiret_text"></textarea>
207 </td>
208 </tr>
209 <tr>
210 <td>
211 Redirect URL <span title="Type the redirect URL. " class="desription_class">?</span>
212 </td>
213 <td>
214 <input type="text" id="redirect_url" size="25" placeholder="http://www.example.com" value=""/>
215 </td>
216 </tr>
217 <tr>
218 <td>
219 Countdown timer position <span title="Select the Countdown Timer position." class="desription_class">?</span>
220 </td>
221 <td>
222 <select id="countdown_in_content_position">
223 <option value="left">Left</option>
224 <option selected="selected" value="center">Center</option>
225 <option value="right">Right</option>
226 </select>
227 </td>
228 </tr>
229 <tr>
230 <td>
231 Countdown distance from top <span title="Type the Countdown distance from top(px)." class="desription_class">?</span>
232 </td>
233 <td>
234 <input type="text" name="countdown_top_distance" id="countdown_top_distance" value="10">(Px)
235 </td>
236 </tr>
237 <tr>
238 <td>
239 Countdown distance from bottom <span title="Type the Countdown distance from bottom(px)." class="desription_class">?</span>
240 </td>
241 <td>
242 <input type="text" name="countdown_bottom_distance" id="countdown_bottom_distance" value="10">(Px)
243 </td>
244 </tr>
245 <tr>
246 <td>
247 Countdown timer buttons type <span class="pro_feature"> (pro)</span> <span title="Choose the Countdown buttons type." class="desription_class">?</span>
248 </td>
249 <td>
250 <select onChange="alert(countdown_pro_text)" id="countdown_type" class="coming_set_hiddens">
251 <option selected="selected" value="button">Button</option>
252 <option value="circle">Circle</option>
253 <option value="vertical_slide">Vertical Slider</option>
254 </select>
255 </td>
256 </tr>
257
258 <tr class="tr_button tr_circle tr_vertical_slide">
259 <td>
260 Countdown timer text color <span title="Choose the Countdown text color." class="desription_class">?</span>
261 </td>
262 <td>
263 <input type="text" class="color_option" id="countdown_font_color" name="countdown_font_color" value="#000000"/>
264 </td>
265 </tr>
266 <tr class="tr_button tr_circle tr_vertical_slide">
267 <td>
268 Countdown timer background color <span class="pro_feature"> (pro)</span> <span title="Select the Countdown background color." class="desription_class">?</span>
269 </td>
270 <td>
271 <div onClick="alert(countdown_pro_text)">
272 <div class="wp-picker-container disabled_picker">
273 <button type="button" class="button wp-color-result" aria-expanded="false" style="background-color: rgb(62, 89, 165);"><span class="wp-color-result-text">Select Color</span></button>
274 </div>
275 </div>
276 </td>
277 </tr>
278 <tr class="tr_circle">
279 <td>
280 Countdown timer size <span class="pro_feature"> (pro)</span> <span title="Type the Countdown size." class="desription_class">?</span>
281 </td>
282 <td>
283 <input onClick="alert(countdown_pro_text)" type="text" name="countdown_circle_size" id="countdown_circle_size" value="130">(Px)
284 </td>
285 </tr>
286
287 <tr class="tr_circle">
288 <td>
289 Countdown timer border width <span class="pro_feature"> (pro)</span> <span title="Type the Countdown border width(px)." class="desription_class">?</span>
290 </td>
291 <td>
292 <input onClick="alert(countdown_pro_text)" type="text" size="3" name="countdown_circle_border" value="5" id="countdown_circle_border" style="font-weight:bold; width:35px" >(0-100)%
293
294 </td>
295 </tr>
296 <tr class="tr_button">
297 <td>
298 Countdown timer border radius <span class="pro_feature"> (pro)</span> <span title="Type the Countdown border radius(px)." class="desription_class">?</span>
299 </td>
300 <td>
301 <input onClick="alert(countdown_pro_text)" type="text" name="countdown_border_radius" id="countdown_border_radius" value="8">(Px)
302 </td>
303 </tr>
304 <tr class="tr_button tr_vertical_slide">
305 <td>
306 Countdown timer font size <span class="pro_feature"> (pro)</span> <span title="Type the Countdown font-size(px)." class="desription_class">?</span>
307 </td>
308 <td>
309 <input onClick="alert(countdown_pro_text)" type="text" name="countdown_font_size" id="countdown_font_size" value="30">(Px)
310 </td>
311 </tr>
312
313 <tr class="tr_button tr_circle tr_vertical_slide">
314 <td>
315 Countdown timer Font Family <span class="pro_feature"> (pro)</span> <span title="Select the Countdown Font family." class="desription_class">?</span>
316 </td>
317 <td>
318 <?php wpdevart_countdown_setting::generete_fonts('countdown_font_famaly',"monospace") ?>
319 </td>
320 </tr>
321 <tr>
322 <td>
323 Countdown animation type <span class="pro_feature"> (pro)</span> <span title="Select the Countdown animation type." class="desription_class">?</span>
324 </td>
325 <td>
326 <?php wpdevart_countdown_setting::generete_animation_select('countdown_animation_type','none'); ?>
327 </td>
328 </tr>
329 </tbody>
330 <tfoot>
331 <tr>
332 <td colspan="2">
333 <div style="display:inline-block; float:left;" class="mceActionPanel"><input type="button" id="cancel" name="cancel" value="Insert Countdown" class="button button-primary" onClick="insert_countdown();"/></div>
334 <span style="float:right"><a href="http://wpdevart.com/wordpress-countdown-plugin" target="_blank" style="color: #7052fb; font-weight: bold; font-size: 18px; text-decoration: none;">Upgrade to Pro Version</a><br></span>
335 </td>
336 </tr>
337 </tfoot>
338 </table>
339
340
341
342 <script type="text/javascript">
343
344 var countdown_pro_text="If you want to use this feature upgrade to Countdown Pro"
345 jQuery('#TB_window').css('max-height',(jQuery('#miain_wpdevart_countdown_window_manager').height()+66)+'px');
346 jQuery('#TB_ajaxContent').css('max-height',(jQuery('#miain_wpdevart_countdown_window_manager').height()+16)+'px');
347 jQuery('#miain_wpdevart_countdown_window_manager').ready(function(e) {
348 jQuery(".color_option").wpColorPicker();
349 });
350 jQuery('.coming_set_hiddens').change(function(){
351 jQuery(this).find('option').each(function(index, element) {
352 jQuery('.tr_'+jQuery(this).val()).hide();
353 });
354 jQuery('.tr_'+jQuery(this).val()).show();
355 })
356 jQuery('.coming_set_hiddens option').each(function(index, element) {
357 jQuery('.tr_'+jQuery(this).val()).hide();
358 });
359 jQuery('.coming_set_hiddens').each(function(index, element) {
360 jQuery('.tr_'+jQuery(this).val()).show();
361 });
362 //Show hidden countdown timer in the end of date type
363 jQuery('.show_hide_experet_type').change(function(){
364 if(jQuery(this).val()=='date'){
365 jQuery('.expert_type_date').show();
366 jQuery('.expert_type_time').hide();
367 }else{
368 jQuery('.expert_type_date').hide();
369 jQuery('.expert_type_time').show();
370 }
371 })
372 var nowTemp = new Date();
373 var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0);
374 jQuery('#countdown_experet_date').fdatepicker({
375 format: 'dd-mm-yyyy hh:ii',
376 pickTime: true,
377 onRender: function (date) {
378 return date.valueOf() < now.valueOf() ? 'disabled' : '';
379 }
380 });
381
382 jQuery( '.slider_div' ).slider({
383 orientation: "horizontal",
384 range: "min",
385 value: 5,
386 min: 0,
387 max: 100,
388 slide: function( event, ui ) {
389 jQuery( loc_this ).val( ui.value );
390 }
391 });
392 function insert_countdown() {
393
394 var tagtext;
395 var variables='';
396
397 if(jQuery('#countdown_days_text').length)
398 variables=variables+'text_for_day="'+jQuery('#countdown_days_text').val()+'" ';
399
400 if(jQuery('#countdown_hourse_text').length)
401 variables=variables+'text_for_hour="'+jQuery('#countdown_hourse_text').val()+'" ';
402
403 if(jQuery('#countdown_minuts_text').length)
404 variables=variables+'text_for_minut="'+jQuery('#countdown_minuts_text').val()+'" ';
405
406 if(jQuery('#countdown_seconds_text').length)
407 variables=variables+'text_for_second="'+jQuery('#countdown_seconds_text').val()+'" ';
408
409 if(jQuery('#countdown_experet_type').length)
410 variables=variables+'countdown_end_type="'+jQuery('#countdown_experet_type').val()+'" ';
411
412 if(jQuery('#countdown_font_color').length)
413 variables=variables+'font_color="'+jQuery('#countdown_font_color').val()+'" ';
414
415 if(jQuery('#countdown_hide_on_mobile').length)
416 variables=variables+'hide_on_mobile="'+jQuery('#countdown_hide_on_mobile').val()+'" ';
417
418 if(jQuery('#redirect_url').length)
419 variables=variables+'redirect_url="'+jQuery('#redirect_url').val()+'" ';
420
421 if(jQuery('#countdown_experet_date').length)
422 variables=variables+'end_date="'+jQuery('#countdown_experet_date').val()+'" ';
423
424 if(jQuery('#countdown_start_date').length)
425 variables=variables+'start_time="'+jQuery('#countdown_start_date').val()+'" ';
426
427 variables=variables+'end_time="'+jQuery('#countdownday').val()+','+jQuery('#countdownhour').val()+','+jQuery('#countdownminute').val()+'" ';
428
429 if(jQuery('#countdownstart_on').length)
430 variables=variables+'action_end_time="'+jQuery('#countdownstart_on').val()+'" ';
431
432 if(jQuery('#countdown_in_content_position').length)
433 variables=variables+'content_position="'+jQuery('#countdown_in_content_position').val()+'" ';
434
435 if(jQuery('#countdown_top_distance').length)
436 variables=variables+'top_ditance="'+jQuery('#countdown_top_distance').val()+'" ';
437
438 if(jQuery('#countdown_bottom_distance').length)
439 variables=variables+'bottom_distance="'+jQuery('#countdown_bottom_distance').val()+'" ';
440 tagtext = '[wpdevart_countdown '+variables+']'+jQuery('#expeiret_text').val()+'[/wpdevart_countdown]';
441 window.send_to_editor(tagtext);
442 tb_remove()
443 }
444
445 </script>
446 </body>
447 </html>
448 <?php
449 die;
450 }
451
452 /*###################### Create menu function ##################*/
453
454 public function create_menu(){
455 global $submenu;
456 $sub_men_cap=str_replace( ' ', '-', $this->menu_name);
457 $main_page = add_menu_page( $this->menu_name, $this->menu_name, 'manage_options', str_replace( ' ', '-', $this->menu_name), array($this, 'main_menu_function'),$this->plugin_url.'images/timer.png');
458 $page_countdown = add_submenu_page($this->menu_name, $this->menu_name, $this->menu_name, 'manage_options', str_replace( ' ', '-', $this->menu_name), array($this, 'main_menu_function'));
459 $page_countdown = add_submenu_page( $sub_men_cap, 'Featured Plugins', 'Featured Plugins', 'manage_options', 'countdown-featured-plugins', array($this, 'featured_plugins'));
460 if(isset($submenu[$sub_men_cap]))
461 add_submenu_page( $sub_men_cap, "Support or Any Ideas?", "<span style='color:#00ff66' >Support or Any Ideas?</span>", 'manage_options',"any_ideas",array($this, 'any_ideas'),155);
462 add_action('admin_print_styles-' .$main_page, array($this,'menu_requeried_scripts'));
463 add_action('admin_print_styles-' .$page_countdown, array($this,'menu_requeried_scripts'));
464 if(isset($submenu[$sub_men_cap]))
465 $submenu[$sub_men_cap][2][2]=wpdevart_countdown_support_url;
466 }
467
468 /*###################### Any ideas function ##################*/
469
470 public function any_ideas(){
471
472 }
473 /*###################### Menu scripts required function ##################*/
474
475 public function menu_requeried_scripts(){
476 wp_enqueue_style('wpdevart-countdown-admin-style');
477 }
478
479 /*###################### Main menu function ##################*/
480
481 public function main_menu_function(){
482 ?>
483 <style>
484 .wpdevart_plugins_get_pro {
485 border-radius: 10px;
486 background: #ffffff;
487 padding: 15px 20px;
488 box-sizing: border-box;
489 float: left;
490 box-shadow: 1px 1px 7px rgba(0,0,0,0.04);
491 }
492 .wpdevart_plugins_get_pro_info {
493 float: left;
494 margin-right: 30px;
495 }
496 .wpdevart_plugins_get_pro_info h3 {
497 margin: 0 0 5px 0;
498 font-size: 17px;
499 font-weight: 500;
500 }
501 .wpdevart_plugins_get_pro_info p {
502 margin: 0;
503 font-size: 14px;
504 font-weight: 200;
505 }
506 .wpdevart_support, .wpdevart_upgrade {
507 display: inline-block;
508 font-size: 16px;
509 text-decoration: none;
510 border-radius: 5px;
511 border: 0;
512 color: #ffffff;
513 font-weight: 400;
514 opacity: 1;
515 -webkit-transition: opacity 0.3s;
516 -moz-transition: opacity 0.3s;
517 transition: opacity 0.3s;
518 background-image: linear-gradient(141deg, #7052fb, #00a0d2);
519 }
520 .wpdevart_upgrade {
521 float: left;
522 padding: 11px 25px 12px;
523 text-transform: uppercase;
524 }
525 .wpdevart_support {
526 float: right;
527 padding: 11px 20px 12px 50px;
528 margin-right:20px;
529 margin-top:15px;
530 position: relative;
531 }
532 .wpdevart_support:before {
533 content: "";
534 background: url(<?php echo $this->plugin_url ?>images/support-white.png) no-repeat;
535 width: 25px;
536 height: 25px;
537 background-size: 25px;
538 top: 8px;
539 position: absolute;
540 left: 15px;
541 }
542 .div-for-clear:after {
543 content: '';
544 clear: both;
545 display: table;
546 }
547 .wpdevart_support:hover,
548 .wpdevart_upgrade:hover,
549 .wpdevart_support:focus,
550 .wpdevart_upgrade:focus {
551 color:#ffffff;
552 opacity:0.85;
553 box-shadow: none;
554 outline: none;
555 text-decoration:none;
556 }
557 #wpwrap{
558 background-color: white;
559 }
560 </style>
561 <div class="wpdevart_plugins_header div-for-clear">
562 <div class="wpdevart_plugins_get_pro div-for-clear">
563 <div class="wpdevart_plugins_get_pro_info">
564 <h3>WpDevArt Countdown Premium</h3>
565 <p>Powerful and Customizable Countdown</p>
566 </div>
567 <a target="blank" href="https://wpdevart.com/wordpress-countdown-plugin/" class="wpdevart_upgrade">Upgrade</a>
568 </div>
569 <a target="blank" href="<?php echo wpdevart_countdown_support_url; ?>" class="wpdevart_support">Have any Questions? Get a quick support!</a>
570 </div>
571 <h1 style="text-align:center; font-size:35px">Quick guideline for the Countdown plugin</h1>
572 <br>
573 <div class="image_width_description">
574 <h2 style="font-size: 20px; text-align: center; ">Adding a countdown in post or page</h2><br>
575 <div style="font-size:15px; text-align: center; max-width: 1024px; margin: 0 auto;">If you are using Classic Editor, then click on shortcode button and set Countdown timer options, then click on "Insert Countdown" button. Check the left screenshot below. If you are using Block-Enabled Editor, then click on Plus button and open Common Blocks tab, then click on WpDevArt countdown and configure settings. Check the right screenshot below.</div>
576 <br/>
577 <div style="text-align:center"><img class="image" style="max-width:35%;margin-right:10px;border: 1px solid #000000;" src="<?php echo $this->plugin_url.'images/clasic_editor_button_place.jpg' ?>"><img style="max-width:35%; border: 1px solid #000000;" class="image" src="<?php echo $this->plugin_url.'images/gutenberg_button_place.jpg' ?>"></div>
578 </div>
579 <div class="image_width_description">
580 <h2 style="font-size: 20px; text-align:center;">Adding a countdown in widget</h2><br>
581 <div style="font-size:15px; text-align: center; max-width: 1024px; margin: 0 auto;">For adding countdown timer into your website Sidebars go to your website Widgets page, pick and drop Countdown widget into your sidebar. Then set the Countdown timer options, then save changes. Look the screenshot below</div><br>
582 <div style="text-align:center"><img style="max-width:35%; border: 1px solid #000000;" class="image" src="<?php echo $this->plugin_url.'images/widget_place.jpg' ?>"></div>
583 </div>
584
585 <?php
586 }
587
588 /*############################### Featured plugins function ########################################*/
589 public function featured_plugins(){
590 $plugins_array=array(
591 'Countdown_Extended'=>array(
592 'image_url' => $this->plugin_url.'images/featured_plugins/icon-128x128.png',
593 'site_url' => 'https://wpdevart.com/wordpress-countdown-extended-version/',
594 'title' => 'WordPress Countdown Extended',
595 'description' => 'WordPress Countdown Extended (CountUp, WooCommerce Sales Timer) is a great tool. You can easily create countdown and countup timers for WordPress your website.'
596 ),
597 'gallery_album'=>array(
598 'image_url' => $this->plugin_url.'images/featured_plugins/gallery-album-icon.png',
599 'site_url' => 'https://wpdevart.com/wordpress-gallery-plugin/',
600 'title' => 'WordPress Gallery plugin',
601 'description' => 'Gallery plugin is an useful tool that will help you to create Galleries and Albums. Try our nice Gallery views and awesome animations.'
602 ),
603 'coming_soon'=>array(
604 'image_url' => $this->plugin_url.'images/featured_plugins/coming_soon.png',
605 'site_url' => 'https://wpdevart.com/wordpress-coming-soon-plugin/',
606 'title' => 'Coming soon and Maintenance mode',
607 'description' => 'Coming soon and Maintenance mode plugin is an awesome tool to show your visitors that you are working on your website to make it better.'
608 ),
609 'Contact forms'=>array(
610 'image_url' => $this->plugin_url.'images/featured_plugins/contact_forms.png',
611 'site_url' => 'https://wpdevart.com/wordpress-contact-form-plugin/',
612 'title' => 'Contact Form Builder',
613 'description' => 'Contact Form Builder plugin is an handy tool for creating different types of contact forms on your WordPress websites.'
614 ),
615 'Booking Calendar'=>array(
616 'image_url' => $this->plugin_url.'images/featured_plugins/Booking_calendar_featured.png',
617 'site_url' => 'https://wpdevart.com/wordpress-booking-calendar-plugin/',
618 'title' => 'WordPress Booking Calendar',
619 'description' => 'WordPress Booking Calendar plugin is an awesome tool to create a booking system for your website. Create booking calendars in a few minutes.'
620 ),
621 'Pricing Table'=>array(
622 'image_url' => $this->plugin_url.'images/featured_plugins/Pricing-table.png',
623 'site_url' => 'https://wpdevart.com/wordpress-pricing-table-plugin/',
624 'title' => 'WordPress Pricing Table',
625 'description' => 'WordPress Pricing Table plugin is a nice tool for creating beautiful pricing tables. Use WpDevArt pricing table themes and create tables just in a few minutes.'
626 ),
627 'chart'=>array(
628 'image_url' => $this->plugin_url.'images/featured_plugins/chart-featured.png',
629 'site_url' => 'https://wpdevart.com/wordpress-organization-chart-plugin/',
630 'title' => 'WordPress Organization Chart',
631 'description' => 'WordPress organization chart plugin is a great tool for adding organizational charts to your WordPress websites.'
632 ),
633 'youtube'=>array(
634 'image_url' => $this->plugin_url.'images/featured_plugins/youtube.png',
635 'site_url' => 'https://wpdevart.com/wordpress-youtube-embed-plugin',
636 'title' => 'WordPress YouTube Embed',
637 'description' => 'YouTube Embed plugin is an convenient tool for adding videos to your website. Use YouTube Embed plugin for adding YouTube videos in posts/pages, widgets.'
638 ),
639 'facebook-comments'=>array(
640 'image_url' => $this->plugin_url.'images/featured_plugins/facebook-comments-icon.png',
641 'site_url' => 'https://wpdevart.com/wordpress-facebook-comments-plugin/',
642 'title' => 'Wpdevart Social comments',
643 'description' => 'WordPress Facebook comments plugin will help you to display Facebook Comments on your website. You can use Facebook Comments on your pages/posts.'
644 ),
645 'lightbox'=>array(
646 'image_url' => $this->plugin_url.'images/featured_plugins/lightbox.png',
647 'site_url' => 'https://wpdevart.com/wordpress-lightbox-plugin',
648 'title' => 'WordPress Lightbox plugin',
649 'description' => 'WordPress Lightbox Popup is an high customizable and responsive plugin for displaying images and videos in popup.'
650 ),
651 'facebook'=>array(
652 'image_url' => $this->plugin_url.'images/featured_plugins/facebook.png',
653 'site_url' => 'https://wpdevart.com/wordpress-facebook-like-box-plugin',
654 'title' => 'Social Like Box',
655 'description' => 'Facebook like box plugin will help you to display Facebook like box on your website, just add Facebook Like box widget to sidebar or insert it into posts/pages and use it.'
656 ),
657 'vertical_menu'=>array(
658 'image_url' => $this->plugin_url.'images/featured_plugins/Vertical-menu.png',
659 'site_url' => 'https://wpdevart.com/wordpress-vertical-menu-plugin/',
660 'title' => 'WordPress Vertical Menu',
661 'description' => 'WordPress Vertical Menu is a handy tool for adding nice vertical menus. You can add icons for your website vertical menus using our plugin.'
662 ),
663 'poll'=>array(
664 'image_url' => $this->plugin_url.'images/featured_plugins/poll.png',
665 'site_url' => 'https://wpdevart.com/wordpress-polls-plugin',
666 'title' => 'WordPress Polls system',
667 'description' => 'WordPress Polls system is an handy tool for creating polls and survey forms for your visitors. You can use our polls on widgets, posts and pages.'
668 ),
669 'duplicate_page'=>array(
670 'image_url' => $this->plugin_url.'images/featured_plugins/featured-duplicate.png',
671 'site_url' => 'https://wpdevart.com/wordpress-duplicate-page-plugin-easily-clone-posts-and-pages/',
672 'title' => 'WordPress Duplicate page',
673 'description' => 'Duplicate Page or Post is a great tool that allows duplicating pages and posts. Now you can do it with one click.'
674 ),
675
676
677 );
678 ?>
679 <style>
680 .featured_plugin_main{
681 background-color: #ffffff;
682 -webkit-box-sizing: border-box;
683 -moz-box-sizing: border-box;
684 box-sizing: border-box;
685 float: left;
686 margin-right: 30px;
687 margin-bottom: 30px;
688 width: calc((100% - 90px)/3);
689 border-radius: 15px;
690 box-shadow: 1px 1px 7px rgba(0,0,0,0.04);
691 padding: 20px 25px;
692 text-align: center;
693 -webkit-transition:-webkit-transform 0.3s;
694 -moz-transition:-moz-transform 0.3s;
695 transition:transform 0.3s;
696 -webkit-transform: translateY(0);
697 -moz-transform: translateY0);
698 transform: translateY(0);
699 min-height: 420px;
700 }
701 .featured_plugin_main:hover{
702 -webkit-transform: translateY(-2px);
703 -moz-transform: translateY(-2px);
704 transform: translateY(-2px);
705 }
706 .featured_plugin_image{
707 max-width: 128px;
708 margin: 0 auto;
709 }
710 .blue_button{
711 display: inline-block;
712 font-size: 15px;
713 text-decoration: none;
714 border-radius: 5px;
715 color: #ffffff;
716 font-weight: 400;
717 opacity: 1;
718 -webkit-transition: opacity 0.3s;
719 -moz-transition: opacity 0.3s;
720 transition: opacity 0.3s;
721 background-color: #7052fb;
722 padding: 10px 22px;
723 text-transform: uppercase;
724 }
725 .blue_button:hover,
726 .blue_button:focus {
727 color:#ffffff;
728 box-shadow: none;
729 outline: none;
730 }
731 .featured_plugin_image img{
732 max-width: 100%;
733 }
734 .featured_plugin_image a{
735 display: inline-block;
736 }
737 .featured_plugin_information{
738
739 }
740 .featured_plugin_title{
741 color: #7052fb;
742 font-size: 18px;
743 display: inline-block;
744 }
745 .featured_plugin_title a{
746 text-decoration:none;
747 font-size: 19px;
748 line-height: 22px;
749 color: #7052fb;
750
751 }
752 .featured_plugin_title h4{
753 margin: 0px;
754 margin-top: 20px;
755 min-height: 44px;
756 }
757 .featured_plugin_description{
758 font-size: 14px;
759 min-height: 63px;
760 }
761 @media screen and (max-width: 1460px){
762 .featured_plugin_main {
763 margin-right: 20px;
764 margin-bottom: 20px;
765 width: calc((100% - 60px)/3);
766 padding: 20px 10px;
767 }
768 .featured_plugin_description {
769 font-size: 13px;
770 min-height: 63px;
771 }
772 }
773 @media screen and (max-width: 1279px){
774 .featured_plugin_main {
775 width: calc((100% - 60px)/2);
776 padding: 20px 20px;
777 min-height: 420px;
778 }
779 }
780 @media screen and (max-width: 768px){
781 .featured_plugin_main {
782 width: calc(100% - 30px);
783 padding: 20px 20px;
784 min-height: auto;
785 margin: 0 auto 20px;
786 float: none;
787 }
788 .featured_plugin_title h4{
789 min-height: auto;
790 }
791 .featured_plugin_description{
792 min-height: auto;
793 font-size: 14px;
794 }
795 }
796
797 </style>
798
799 <h1 style="text-align: center;font-size: 50px;font-weight: 700;color: #2b2350;margin: 20px auto 25px;line-height: 1.2;">Featured Plugins</h1>
800 <?php foreach($plugins_array as $key=>$plugin) { ?>
801 <div class="featured_plugin_main">
802 <div class="featured_plugin_image"><a target="_blank" href="<?php echo $plugin['site_url'] ?>"><img src="<?php echo $plugin['image_url'] ?>"></a></div>
803 <div class="featured_plugin_information">
804 <div class="featured_plugin_title"><h4><a target="_blank" href="<?php echo $plugin['site_url'] ?>"><?php echo $plugin['title'] ?></a></h4></div>
805 <p class="featured_plugin_description"><?php echo $plugin['description'] ?></p>
806 <a target="_blank" href="<?php echo $plugin['site_url'] ?>" class="blue_button">Check The Plugin</a>
807 </div>
808 <div style="clear:both"></div>
809 </div>
810 <?php }
811
812 }
813 }