TemplatesNext ToolKit - Version 1.1.1

Version Description

Download this release

Release Info

Developer marsian
Plugin Icon 128x128 TemplatesNext ToolKit
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1.0 to 1.1.1

css/tx-admin-style.css CHANGED
@@ -132,11 +132,31 @@ ul.tx-fa-icons > li.active {
132
  #tx-spacer-form,
133
  #tx-wooprods-form,
134
  #tx-heading-form,
135
- #tx-slider-form {
 
136
  padding: 12px 16px;
137
  min-width: 480px;
138
  }
139
 
140
  .nx-sh-cancel {
141
  padding-top: 16px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  }
132
  #tx-spacer-form,
133
  #tx-wooprods-form,
134
  #tx-heading-form,
135
+ #tx-slider-form,
136
+ #tx-image-form {
137
  padding: 12px 16px;
138
  min-width: 480px;
139
  }
140
 
141
  .nx-sh-cancel {
142
  padding-top: 16px;
143
+ }
144
+
145
+ .tx-button {
146
+ background: transparent;
147
+ border: 1px solid #cccccc;
148
+ background-color: #e7e7e7;
149
+ font-size: 12px;
150
+ line-height: 1;
151
+ padding: 8px 16px;
152
+ color: #373737;
153
+ font-weight: 500;
154
+ margin-top: 4px;
155
+ cursor: pointer;
156
+ }
157
+
158
+ .tx-button:hover {
159
+ border: 1px solid #373737;
160
+ background-color: #373737;
161
+ color: #FFFFFF;
162
  }
css/tx-style.css CHANGED
@@ -317,6 +317,12 @@
317
  margin-right: -16px;
318
  }
319
 
 
 
 
 
 
 
320
  .tx-post-row:after {
321
  content: " ";
322
  display: block;
@@ -353,6 +359,11 @@
353
  width: 25%;
354
  }
355
 
 
 
 
 
 
356
  .tx-carousel .tx-post-col-1,
357
  .tx-carousel .tx-post-col-2,
358
  .tx-carousel .tx-post-col-3,
@@ -364,6 +375,10 @@
364
  padding-bottom: 32px;
365
  }
366
 
 
 
 
 
367
  .tx-post-row .tx-folio-title {
368
  font-size: 24px;
369
  font-weight: 500;
@@ -384,6 +399,53 @@
384
  margin-bottom: 16px;
385
  }
386
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
387
  .tx-post-row a.moretag,
388
  .tx-post-row a.moretag:visited {
389
  display: block;
@@ -440,11 +502,27 @@
440
  visibility: hidden;
441
  }
442
 
 
 
 
 
 
 
 
 
 
 
443
  .tx-folio-img:hover .folio-links {
444
  bottom: 0px;
445
  visibility: visible;
446
  }
447
 
 
 
 
 
 
 
448
  .tx-folio-img .folio-links .folio-linkico,
449
  .tx-folio-img .folio-links .folio-zoomico {
450
  display: inline-block;
@@ -462,6 +540,32 @@
462
  transition-delay: 0.3s;
463
  }
464
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
465
  .tx-folio-img .folio-links .folio-linkico {
466
  margin-right: 64px;
467
  opacity: 0;
@@ -471,11 +575,13 @@
471
  opacity: 0;
472
  }
473
 
474
- .tx-folio-img:hover .folio-links .folio-linkico {
 
475
  margin-right: 2px;
476
  opacity: 1;
477
  }
478
- .tx-folio-img:hover .folio-links .folio-zoomico {
 
479
  margin-left: 2px;
480
  opacity: 1;
481
  }
@@ -492,20 +598,28 @@
492
 
493
  .tx-blog-img {
494
  margin-bottom: 16px;
 
 
495
  }
496
 
497
  .tx-blog-imgpad {
498
  height: 16px;
499
  }
500
 
501
- .tx-blog .tx-blog-item .tx-border-box h3.tx-folio-title a {}
502
-
503
  .tx-blog .tx-blog-item {
504
  margin-bottom: 32px;
505
  }
506
 
507
  .tx-blog-item .blog-image {
508
  width: 100%;
 
 
 
 
 
 
 
 
509
  }
510
 
511
  .tx-blog .tx-blog-item .tx-post-title {
@@ -543,6 +657,46 @@
543
  border: 1px solid #e7e7e7;
544
  }
545
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
546
  /* testimonials */
547
  .entry-content .owl-theme .owl-controls .owl-page span {
548
  background-color: rgba(0,0,0,0.5);
@@ -656,8 +810,6 @@
656
  text-align: center;
657
  }
658
 
659
-
660
-
661
  .tx-animate,
662
  .tx-service-icon span,
663
  .tx-service-icon span i,
@@ -673,8 +825,8 @@
673
 
674
  .tx-service-icon span {
675
  display: inline-block;
676
- width: 88px;
677
- height: 88px;
678
  border: 2px solid #069;
679
  border-radius: 50%;
680
  text-align: center;
@@ -702,6 +854,16 @@
702
  color: #FFF;
703
  }
704
 
 
 
 
 
 
 
 
 
 
 
705
  .tx-service-title {
706
  text-align: center;
707
  font-size: 24px;
@@ -1145,6 +1307,120 @@
1145
  display: none;
1146
  }
1147
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1148
  @media (max-width: 999px) {
1149
  .folio-col-1 {
1150
  display: block;
317
  margin-right: -16px;
318
  }
319
 
320
+ .tx-post-row.folio-style-gallery {
321
+ width : 100%;
322
+ margin-left: 0px;
323
+ margin-right: 0px;
324
+ }
325
+
326
  .tx-post-row:after {
327
  content: " ";
328
  display: block;
359
  width: 25%;
360
  }
361
 
362
+ .tx-post-row.folio-style-gallery .tx-portfolio-item {
363
+ padding: 0px;
364
+ /* overflow: hidden; */
365
+ }
366
+
367
  .tx-carousel .tx-post-col-1,
368
  .tx-carousel .tx-post-col-2,
369
  .tx-carousel .tx-post-col-3,
375
  padding-bottom: 32px;
376
  }
377
 
378
+ .folio-style-gallery.tx-post-row .tx-portfolio-item .tx-border-box {
379
+ padding-bottom: 0px;
380
+ }
381
+
382
  .tx-post-row .tx-folio-title {
383
  font-size: 24px;
384
  font-weight: 500;
399
  margin-bottom: 16px;
400
  }
401
 
402
+
403
+
404
+
405
+
406
+ .folio-style-gallery.tx-post-row .tx-folio-title {
407
+ position: absolute;
408
+ left: 12px;
409
+ bottom: -20px;
410
+ margin-bottom: 0px;
411
+ opacity: 0;
412
+ transition-property: all;
413
+ transition-duration: 0.3s;
414
+ transition-timing-function: ease-in-out;
415
+ transition-delay: 0.4s;
416
+ }
417
+
418
+ .folio-style-gallery.tx-post-row .tx-folio-title a,
419
+ .folio-style-gallery.tx-post-row .tx-folio-title a:visited {
420
+ color: #FFFFFF;
421
+ }
422
+
423
+ .folio-style-gallery.tx-post-row .tx-folio-category {
424
+ color: #ddd;
425
+ position: absolute;
426
+ left: 12px;
427
+ bottom: -32px;
428
+ margin-bottom: 0px;
429
+ opacity: 0;
430
+ transition-property: all;
431
+ transition-duration: 0.3s;
432
+ transition-timing-function: ease-in-out;
433
+ transition-delay: 0.6s;
434
+ }
435
+
436
+ .folio-style-gallery.tx-post-row .tx-portfolio-item:hover .tx-folio-title {
437
+ bottom: 32px;
438
+ opacity: 1;
439
+ }
440
+
441
+ .folio-style-gallery.tx-post-row .tx-portfolio-item:hover .tx-folio-category {
442
+ bottom: 12px;
443
+ opacity: 1;
444
+ }
445
+
446
+
447
+
448
+
449
  .tx-post-row a.moretag,
450
  .tx-post-row a.moretag:visited {
451
  display: block;
502
  visibility: hidden;
503
  }
504
 
505
+ .folio-style-gallery .tx-folio-img .folio-links {
506
+ position: absolute;
507
+ bottom: 0px;
508
+ left: 0px;
509
+ width: 100%;
510
+ height: 100%;
511
+ bottom: 0px;
512
+ background-color: rgba(0,0,0,0.0);
513
+ }
514
+
515
  .tx-folio-img:hover .folio-links {
516
  bottom: 0px;
517
  visibility: visible;
518
  }
519
 
520
+ .folio-style-gallery .tx-portfolio-item:hover .tx-folio-img .folio-links {
521
+ background-color: rgba(0,0,0,0.4);
522
+ bottom: 0px;
523
+ visibility: visible;
524
+ }
525
+
526
  .tx-folio-img .folio-links .folio-linkico,
527
  .tx-folio-img .folio-links .folio-zoomico {
528
  display: inline-block;
540
  transition-delay: 0.3s;
541
  }
542
 
543
+ .folio-style-gallery .tx-folio-img .folio-links span,
544
+ .folio-style-gallery .tx-folio-img .folio-links span {
545
+ display: block;
546
+ width: 100%;
547
+ position: absolute;
548
+ left: 0px;
549
+ top: 50%;
550
+ margin-top: -22px;
551
+ }
552
+
553
+ .folio-style-gallery .folio-head {
554
+ display: block;
555
+ width: 100%;
556
+ position: absolute;
557
+ left: 0px;
558
+ bottom: 0px;
559
+ padding: 0px 12px;
560
+ z-index: 102;
561
+ }
562
+
563
+
564
+ .folio-style-gallery .tx-post-row .tx-folio-title a,
565
+ .folio-style-gallery .tx-post-row .tx-folio-title a:visited {}
566
+
567
+ .folio-style-gallery .tx-folio-category {}
568
+
569
  .tx-folio-img .folio-links .folio-linkico {
570
  margin-right: 64px;
571
  opacity: 0;
575
  opacity: 0;
576
  }
577
 
578
+ .tx-folio-img:hover .folio-links .folio-linkico,
579
+ .folio-style-gallery .tx-portfolio-item:hover .tx-folio-img .folio-links .folio-linkico {
580
  margin-right: 2px;
581
  opacity: 1;
582
  }
583
+ .tx-folio-img:hover .folio-links .folio-zoomico,
584
+ .folio-style-gallery .tx-portfolio-item:hover .tx-folio-img .folio-links .folio-zoomico {
585
  margin-left: 2px;
586
  opacity: 1;
587
  }
598
 
599
  .tx-blog-img {
600
  margin-bottom: 16px;
601
+ position: relative;
602
+ overflow: hidden;
603
  }
604
 
605
  .tx-blog-imgpad {
606
  height: 16px;
607
  }
608
 
 
 
609
  .tx-blog .tx-blog-item {
610
  margin-bottom: 32px;
611
  }
612
 
613
  .tx-blog-item .blog-image {
614
  width: 100%;
615
+ transition-property: all;
616
+ transition-duration: 0.4s;
617
+ transition-timing-function: ease-in-out;
618
+ transition-delay: 0.0s;
619
+ }
620
+
621
+ .tx-blog-item .blog-image:hover {
622
+ transform:scale(1.1);
623
  }
624
 
625
  .tx-blog .tx-blog-item .tx-post-title {
657
  border: 1px solid #e7e7e7;
658
  }
659
 
660
+ .tx-post-comm {
661
+ display: block;
662
+ position: absolute;
663
+ bottom: 12px;
664
+ right: 12px;
665
+ height: 32px;
666
+ width: 32px;
667
+ text-align: center;
668
+ line-height: 32px;
669
+ color: #FFFFFF;
670
+ }
671
+
672
+ .tx-post-comm span {
673
+ display: block;
674
+ position: relative;
675
+ height: 32px;
676
+ width: 32px;
677
+ text-align: center;
678
+ z-index: 107;
679
+ }
680
+
681
+ .tx-post-comm:after {
682
+ content: '\f075';
683
+ font-family: FontAwesome;
684
+ font-weight: normal;
685
+ font-style: normal;
686
+ margin:0px;
687
+ text-decoration:none;
688
+ height: 32px;
689
+ line-height: 32px;
690
+ font-size: 32px;
691
+ position: absolute;
692
+ left: 0px;
693
+ top: 0px;
694
+ color: #f00;
695
+ z-index: 106;
696
+ width: 32px;
697
+ text-align: center;
698
+ }
699
+
700
  /* testimonials */
701
  .entry-content .owl-theme .owl-controls .owl-page span {
702
  background-color: rgba(0,0,0,0.5);
810
  text-align: center;
811
  }
812
 
 
 
813
  .tx-animate,
814
  .tx-service-icon span,
815
  .tx-service-icon span i,
825
 
826
  .tx-service-icon span {
827
  display: inline-block;
828
+ width: 92px;
829
+ height: 92px;
830
  border: 2px solid #069;
831
  border-radius: 50%;
832
  text-align: center;
854
  color: #FFF;
855
  }
856
 
857
+ .tx-service.curved .tx-service-icon span {
858
+ border-radius: 12px;
859
+ margin-bottom: 12px;
860
+ }
861
+
862
+ .tx-service.square .tx-service-icon span {
863
+ border-radius: 0px;
864
+ margin-bottom: 12px;
865
+ }
866
+
867
  .tx-service-title {
868
  text-align: center;
869
  font-size: 24px;
1307
  display: none;
1308
  }
1309
 
1310
+ /*
1311
+ * Widgets
1312
+ */
1313
+
1314
+ .site .widget .recent-comments-list li.nx-comment {
1315
+ display: block;
1316
+ clear: both;
1317
+ height: auto;
1318
+ border: none;
1319
+ }
1320
+
1321
+ .site .widget .recent-comments-list li.nx-comment .comment-wrap {
1322
+ padding-top: 6px;
1323
+ padding-bottom: 6px;
1324
+ }
1325
+
1326
+ .widget .recent-comments-list li.nx-comment .comment-wrap .comment-avatar {
1327
+ display: inline-block;
1328
+ }
1329
+
1330
+ .widget .recent-comments-list li.nx-comment .comment-wrap .comment-avatar img {
1331
+ border-radius: 3px;
1332
+ }
1333
+
1334
+ .widget .recent-comments-list li.nx-comment .comment-wrap .comment-content {
1335
+ width: 72%;
1336
+ width: calc( 100% - 64px );
1337
+ border: 1px solid rgba(154,154,154,0.4);
1338
+ border-radius: 3px;
1339
+ padding: 6px 6px 0px 6px;
1340
+ }
1341
+
1342
+ .widget .recent-comments-list li.nx-comment .comment-wrap .comment-content .comment-meta {
1343
+ color: #999;
1344
+ font-size: 12px;
1345
+ line-height: 1;
1346
+ }
1347
+
1348
+ .widget .recent-comments-list li.nx-comment .comment-wrap .comment-content .comment-body {
1349
+ padding-top: 8px;
1350
+ padding-bottom: 0px;
1351
+ }
1352
+
1353
+ .widget .recent-comments-list li.nx-comment .comment-wrap .comment-content .comment-body p {
1354
+ margin: 0px;
1355
+ margin-bottom: 12px;
1356
+ }
1357
+
1358
+ .widget .recent-posts-list li.nx-recent-post {
1359
+ display: block;
1360
+ clear: both;
1361
+ min-height: 96px;
1362
+ }
1363
+
1364
+ .widget .recent-posts-list li.nx-recent-post a.recent-post-image img {
1365
+ width: 72px;
1366
+ display: block;
1367
+ float: left;
1368
+ padding-top: 4px;
1369
+ border-radius: 6px;
1370
+ }
1371
+
1372
+ .widget .recent-posts-list li.nx-recent-post .recent-post-details.thumbyes {
1373
+ display: inline-block;
1374
+ width: 60%;
1375
+ width: calc( 100% - 72px);
1376
+ padding-left: 12px;
1377
+ }
1378
+
1379
+ .widget .recent-posts-list li.nx-recent-post .recent-post-title {
1380
+ display: block;
1381
+ clear: both;
1382
+ }
1383
+
1384
+ .widget .recent-posts-list li.nx-recent-post .recent-post-details.thumbyes span.post-meta {
1385
+ font-size: 11px;
1386
+ }
1387
+
1388
+ .widget .portfolio-grid {
1389
+ padding-top: 12px;
1390
+ }
1391
+
1392
+ .widget .portfolio-grid li a.grid-image img {}
1393
+
1394
+ .widget .portfolio-grid li {
1395
+ display: block;
1396
+ float: left;
1397
+ margin: 0px;
1398
+ width: 33.33%;
1399
+ border: none;
1400
+ border-bottom: none!important;
1401
+ padding: 1px!important;
1402
+ }
1403
+
1404
+ .widget .portfolio-grid li a.grid-image img {}
1405
+
1406
+ .nx-wide .tx-fullwidthrow {
1407
+ position: relative;
1408
+ }
1409
+
1410
+ .nx-boxed .tx-fullwidthrow {}
1411
+
1412
+ .nx-wide .tx-fullwidthrow .tx-fullwidthinner {
1413
+ display: block;
1414
+ clear: both;
1415
+ }
1416
+
1417
+ .nx-wide .tx-fullwidthrow .tx-fullwidthinner:after {
1418
+ content: "";
1419
+ display: table;
1420
+ clear: both;
1421
+ background-color: #f00;
1422
+ }
1423
+
1424
  @media (max-width: 999px) {
1425
  .folio-col-1 {
1426
  display: block;
inc/tnext-meta.php CHANGED
@@ -209,6 +209,60 @@ function tx_register_meta_boxes( $meta_boxes )
209
  )
210
  );
211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
 
213
 
214
  return $meta_boxes;
209
  )
210
  );
211
 
212
+ $meta_boxes[] = array(
213
+ // Meta box id, UNIQUE per meta box. Optional since 4.1.5
214
+ 'id' => 'testimonialmeta',
215
+
216
+ // Meta box title - Will appear at the drag and drop handle bar. Required.
217
+ 'title' => __( 'Testimonial Meta', 'ispirit' ),
218
+
219
+ // Post types, accept custom post types as well - DEFAULT is array('post'). Optional.
220
+ 'pages' => array( 'testimonials' ),
221
+
222
+ // Where the meta box appear: normal (default), advanced, side. Optional.
223
+ 'context' => 'normal',
224
+
225
+ // Order of meta box: high (default), low. Optional.
226
+ 'priority' => 'high',
227
+
228
+ // Auto save: true, false (default). Optional.
229
+ 'autosave' => true,
230
+
231
+ // List of meta fields
232
+ 'fields' => array(
233
+
234
+ // name
235
+ array(
236
+ 'name' => __( 'Testimonial Cite', 'nx-admin' ),
237
+ 'id' => "{$prefix}testi_name",
238
+ 'type' => 'text',
239
+ 'std' => __( '', 'nx-admin' ),
240
+ 'desc' => __('Enter the testimonial cite name.', 'nx-admin'),
241
+ ),
242
+
243
+ // designation
244
+ array(
245
+ 'name' => __( 'Testimonial Cite Designation/position', 'nx-admin' ),
246
+ 'id' => "{$prefix}testi_desig",
247
+ 'type' => 'text',
248
+ 'std' => __( '', 'nx-admin' ),
249
+ 'desc' => __('Enter the cite designation or position', 'nx-admin'),
250
+ ),
251
+ // company name
252
+ array(
253
+ 'name' => __( 'Company name', 'nx-admin' ),
254
+ 'id' => "{$prefix}testi_company",
255
+ 'type' => 'text',
256
+ 'std' => __( '', 'nx-admin' ),
257
+ 'desc' => __('Enter the cite company name', 'nx-admin'),
258
+ ),
259
+
260
+
261
+
262
+ )
263
+ );
264
+
265
+
266
 
267
 
268
  return $meta_boxes;
inc/widgets/widget-advertgrid.php ADDED
@@ -0,0 +1,271 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ *
5
+ * nx Advert Grid Widget
6
+ * ------------------------------------------------
7
+ * TemplatesNext
8
+ * Copyright TemplatesNext 2014 - http://www.TemplatesNext.org
9
+ */
10
+
11
+ /*
12
+ * Plugin Name: NX Advert Grid Widget
13
+ * Plugin URI: http://www.TemplatesNext.org
14
+ * Description: NX Advert Grid Widget
15
+ * Author: templatesNext
16
+ * Version: 1.0
17
+ * Author URI: http://www.TemplatesNext.org
18
+ */
19
+
20
+ class nx_advert_grid_widget extends WP_Widget {
21
+
22
+ function nx_advert_grid_widget() {
23
+ $widget_ops = array( 'classname' => 'widget-advert-grid', 'description' => 'Styled advert grid of up to eight 125x125 adverts' );
24
+ $control_ops = array( 'width' => 250, 'height' => 200, 'id_base' => 'advert-grid-widget' ); //default width = 250
25
+ $this->WP_Widget( 'advert-grid-widget', 'NX Advert Grid Widget', $widget_ops, $control_ops );
26
+ }
27
+
28
+ function form($instance) {
29
+ $defaults = array( 'title' => '', 'image_1' => '', 'image_1_url' => '', 'image_2' => '', 'image_2_url' => '', 'image_3' => '', 'image_3_url' => '', 'image_4' => '', 'image_4_url' => '', 'image_5' => '', 'image_5_url' => '', 'image_6' => '', 'image_6_url' => '', 'image_7' => '', 'image_7_url' => '', 'image_8' => '', 'image_8_url' => '');
30
+ $instance = wp_parse_args( (array) $instance, $defaults );
31
+
32
+ ?>
33
+ <div class="widget-content">
34
+ <p>
35
+ <label><?php _e('Title', 'nx-admin');?>:</label>
36
+ <input id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" class="widefat" type="text" />
37
+ </p>
38
+ <p>
39
+ <label><?php _e('Image 1 URL', 'nx-admin');?>:</label>
40
+ <input id="<?php echo $this->get_field_id( 'image_1' ); ?>" name="<?php echo $this->get_field_name( 'image_1' ); ?>" value="<?php echo $instance['image_1']; ?>" class="widefat" type="text"/>
41
+ </p>
42
+ <p>
43
+ <label><?php _e('Image 1 Link', 'nx-admin');?>:</label>
44
+ <input id="<?php echo $this->get_field_id( 'image_1_url' ); ?>" name="<?php echo $this->get_field_name( 'image_1_url' ); ?>" value="<?php echo $instance['image_1_url']; ?>" class="widefat" type="text"/>
45
+ </p>
46
+ <p>
47
+ <label><?php _e('Image 2 URL', 'nx-admin');?>:</label>
48
+ <input id="<?php echo $this->get_field_id( 'image_2' ); ?>" name="<?php echo $this->get_field_name( 'image_2' ); ?>" value="<?php echo $instance['image_2']; ?>" class="widefat" type="text"/>
49
+ </p>
50
+ <p>
51
+ <label><?php _e('Image 2 Link', 'nx-admin');?>:</label>
52
+ <input id="<?php echo $this->get_field_id( 'image_2_url' ); ?>" name="<?php echo $this->get_field_name( 'image_2_url' ); ?>" value="<?php echo $instance['image_2_url']; ?>" class="widefat" type="text"/>
53
+ </p>
54
+ <p>
55
+ <label><?php _e('Image 3 URL', 'nx-admin');?>:</label>
56
+ <input id="<?php echo $this->get_field_id( 'image_3' ); ?>" name="<?php echo $this->get_field_name( 'image_3' ); ?>" value="<?php echo $instance['image_3']; ?>" class="widefat" type="text"/>
57
+ </p>
58
+ <p>
59
+ <label><?php _e('Image 3 Link', 'nx-admin');?>:</label>
60
+ <input id="<?php echo $this->get_field_id( 'image_3_url' ); ?>" name="<?php echo $this->get_field_name( 'image_3_url' ); ?>" value="<?php echo $instance['image_3_url']; ?>" class="widefat" type="text"/>
61
+ </p>
62
+ <p>
63
+ <label><?php _e('Image 4 URL', 'nx-admin');?>:</label>
64
+ <input id="<?php echo $this->get_field_id( 'image_4' ); ?>" name="<?php echo $this->get_field_name( 'image_4' ); ?>" value="<?php echo $instance['image_4']; ?>" class="widefat" type="text"/>
65
+ </p>
66
+ <p>
67
+ <label><?php _e('Image 4 Link', 'nx-admin');?>:</label>
68
+ <input id="<?php echo $this->get_field_id( 'image_4_url' ); ?>" name="<?php echo $this->get_field_name( 'image_4_url' ); ?>" value="<?php echo $instance['image_4_url']; ?>" class="widefat" type="text"/>
69
+ </p>
70
+ <p>
71
+ <label><?php _e('Image 5 URL', 'nx-admin');?>:</label>
72
+ <input id="<?php echo $this->get_field_id( 'image_5' ); ?>" name="<?php echo $this->get_field_name( 'image_5' ); ?>" value="<?php echo $instance['image_5']; ?>" class="widefat" type="text"/>
73
+ </p>
74
+ <p>
75
+ <label><?php _e('Image 5 Link', 'nx-admin');?>:</label>
76
+ <input id="<?php echo $this->get_field_id( 'image_5_url' ); ?>" name="<?php echo $this->get_field_name( 'image_5_url' ); ?>" value="<?php echo $instance['image_5_url']; ?>" class="widefat" type="text"/>
77
+ </p>
78
+ <p>
79
+ <label><?php _e('Image 6 URL', 'nx-admin');?>:</label>
80
+ <input id="<?php echo $this->get_field_id( 'image_6' ); ?>" name="<?php echo $this->get_field_name( 'image_6' ); ?>" value="<?php echo $instance['image_6']; ?>" class="widefat" type="text"/>
81
+ </p>
82
+ <p>
83
+ <label><?php _e('Image 6 Link', 'nx-admin');?>:</label>
84
+ <input id="<?php echo $this->get_field_id( 'image_6_url' ); ?>" name="<?php echo $this->get_field_name( 'image_6_url' ); ?>" value="<?php echo $instance['image_6_url']; ?>" class="widefat" type="text"/>
85
+ </p>
86
+ <p>
87
+ <label><?php _e('Image 7 URL', 'nx-admin');?>:</label>
88
+ <input id="<?php echo $this->get_field_id( 'image_7' ); ?>" name="<?php echo $this->get_field_name( 'image_7' ); ?>" value="<?php echo $instance['image_7']; ?>" class="widefat" type="text"/>
89
+ </p>
90
+ <p>
91
+ <label><?php _e('Image 7 Link', 'nx-admin');?>:</label>
92
+ <input id="<?php echo $this->get_field_id( 'image_7_url' ); ?>" name="<?php echo $this->get_field_name( 'image_7_url' ); ?>" value="<?php echo $instance['image_7_url']; ?>" class="widefat" type="text"/>
93
+ </p>
94
+ <p>
95
+ <label><?php _e('Image 8 URL', 'nx-admin');?>:</label>
96
+ <input id="<?php echo $this->get_field_id( 'image_8' ); ?>" name="<?php echo $this->get_field_name( 'image_8' ); ?>" value="<?php echo $instance['image_8']; ?>" class="widefat" type="text"/>
97
+ </p>
98
+ <p>
99
+ <label><?php _e('Image 8 Link', 'nx-admin');?>:</label>
100
+ <input id="<?php echo $this->get_field_id( 'image_8_url' ); ?>" name="<?php echo $this->get_field_name( 'image_8_url' ); ?>" value="<?php echo $instance['image_8_url']; ?>" class="widefat" type="text"/>
101
+ </p>
102
+ </div>
103
+ <?php
104
+ }
105
+
106
+ function update($new_instance, $old_instance) {
107
+ $instance = $old_instance;
108
+
109
+ $instance['title'] = strip_tags( $new_instance['title'] );
110
+ $instance['image_1'] = strip_tags( $new_instance['image_1'] );
111
+ $instance['image_1_url'] = strip_tags( $new_instance['image_1_url'] );
112
+ $instance['image_2'] = strip_tags( $new_instance['image_2'] );
113
+ $instance['image_2_url'] = strip_tags( $new_instance['image_2_url'] );
114
+ $instance['image_3'] = strip_tags( $new_instance['image_3'] );
115
+ $instance['image_3_url'] = strip_tags( $new_instance['image_3_url'] );
116
+ $instance['image_4'] = strip_tags( $new_instance['image_4'] );
117
+ $instance['image_4_url'] = strip_tags( $new_instance['image_4_url'] );
118
+ $instance['image_5'] = strip_tags( $new_instance['image_5'] );
119
+ $instance['image_5_url'] = strip_tags( $new_instance['image_5_url'] );
120
+ $instance['image_6'] = strip_tags( $new_instance['image_6'] );
121
+ $instance['image_6_url'] = strip_tags( $new_instance['image_6_url'] );
122
+ $instance['image_7'] = strip_tags( $new_instance['image_7'] );
123
+ $instance['image_7_url'] = strip_tags( $new_instance['image_7_url'] );
124
+ $instance['image_8'] = strip_tags( $new_instance['image_8'] );
125
+ $instance['image_8_url'] = strip_tags( $new_instance['image_8_url'] );
126
+
127
+ return $instance;
128
+ }
129
+
130
+ function widget($args, $instance) {
131
+
132
+ extract( $args );
133
+
134
+ $title = apply_filters('widget_title', $instance['title'] );
135
+ $image_1 = $instance['image_1'];
136
+ $image_1_url = $instance['image_1_url'];
137
+ $image_2 = $instance['image_2'];
138
+ $image_2_url = $instance['image_2_url'];
139
+ $image_3 = $instance['image_3'];
140
+ $image_3_url = $instance['image_3_url'];
141
+ $image_4 = $instance['image_4'];
142
+ $image_4_url = $instance['image_4_url'];
143
+ $image_5 = $instance['image_5'];
144
+ $image_5_url = $instance['image_5_url'];
145
+ $image_6 = $instance['image_6'];
146
+ $image_6_url = $instance['image_6_url'];
147
+ $image_7 = $instance['image_7'];
148
+ $image_7_url = $instance['image_7_url'];
149
+ $image_8 = $instance['image_8'];
150
+ $image_8_url = $instance['image_8_url'];
151
+
152
+ $output = '';
153
+
154
+ echo $before_widget;
155
+ if ( $title ) echo $before_title . $title . $after_title;
156
+
157
+ $output .= '<div class="sidebar-ad-grid"><ul class="clearfix">';
158
+
159
+ if ($image_1 != "") {
160
+ $output .= '<li>';
161
+ if ($image_1_url != "") {
162
+ $output .= '<a href="'.$image_1_url.'" target="_blank">';
163
+ $output .= '<img src="'.$image_1.'" alt="advert" />';
164
+ $output .= '</a>';
165
+ } else {
166
+ $output .= '<img src="'.$image_1.'" alt="advert" />';
167
+ }
168
+ $output .= '</li>';
169
+ }
170
+
171
+ if ($image_2 != "") {
172
+ $output .= '<li>';
173
+ if ($image_2_url != "") {
174
+ $output .= '<a href="'.$image_2_url.'" target="_blank">';
175
+ $output .= '<img src="'.$image_2.'" alt="advert" />';
176
+ $output .= '</a>';
177
+ } else {
178
+ $output .= '<img src="'.$image_2.'" alt="advert" />';
179
+ }
180
+ $output .= '</li>';
181
+ }
182
+
183
+ if ($image_3 != "") {
184
+ $output .= '<li>';
185
+ if ($image_3_url != "") {
186
+ $output .= '<a href="'.$image_3_url.'" target="_blank">';
187
+ $output .= '<img src="'.$image_3.'" alt="advert" />';
188
+ $output .= '</a>';
189
+ } else {
190
+ $output .= '<img src="'.$image_3.'" alt="advert" />';
191
+ }
192
+ $output .= '</li>';
193
+ }
194
+
195
+ if ($image_4 != "") {
196
+ $output .= '<li>';
197
+ if ($image_4_url != "") {
198
+ $output .= '<a href="'.$image_4_url.'" target="_blank">';
199
+ $output .= '<img src="'.$image_4.'" alt="advert" />';
200
+ $output .= '</a>';
201
+ } else {
202
+ $output .= '<img src="'.$image_4.'" alt="advert" />';
203
+ }
204
+ $output .= '</li>';
205
+ }
206
+
207
+ if ($image_5 != "") {
208
+ $output .= '<li>';
209
+ if ($image_5_url != "") {
210
+ $output .= '<a href="'.$image_5_url.'" target="_blank">';
211
+ $output .= '<img src="'.$image_5.'" alt="advert" />';
212
+ $output .= '</a>';
213
+ } else {
214
+ $output .= '<img src="'.$image_5.'" alt="advert" />';
215
+ }
216
+ $output .= '</li>';
217
+ }
218
+
219
+ if ($image_6 != "") {
220
+ $output .= '<li>';
221
+ if ($image_6_url != "") {
222
+ $output .= '<a href="'.$image_6_url.'" target="_blank">';
223
+ $output .= '<img src="'.$image_6.'" alt="advert" />';
224
+ $output .= '</a>';
225
+ } else {
226
+ $output .= '<img src="'.$image_6.'" alt="advert" />';
227
+ }
228
+ $output .= '</li>';
229
+ }
230
+
231
+ if ($image_7 != "") {
232
+ $output .= '<li>';
233
+ if ($image_7_url != "") {
234
+ $output .= '<a href="'.$image_7_url.'" target="_blank">';
235
+ $output .= '<img src="'.$image_7.'" alt="advert" />';
236
+ $output .= '</a>';
237
+ } else {
238
+ $output .= '<img src="'.$image_7.'" alt="advert" />';
239
+ }
240
+ $output .= '</li>';
241
+ }
242
+
243
+ if ($image_8 != "") {
244
+ $output .= '<li>';
245
+ if ($image_8_url != "") {
246
+ $output .= '<a href="'.$image_8_url.'" target="_blank">';
247
+ $output .= '<img src="'.$image_8.'" alt="advert" />';
248
+ $output .= '</a>';
249
+ } else {
250
+ $output .= '<img src="'.$image_8.'" alt="advert" />';
251
+ }
252
+ $output .= '</li>';
253
+ }
254
+
255
+ $output .= '</ul></div>';
256
+
257
+ echo $output;
258
+
259
+ echo $after_widget;
260
+
261
+ }
262
+
263
+ }
264
+
265
+ add_action( 'widgets_init', 'nx_load_advert_grid_widget' );
266
+
267
+ function nx_load_advert_grid_widget() {
268
+ register_widget('nx_advert_grid_widget');
269
+ }
270
+
271
+ ?>
inc/widgets/widget-comments.php ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ *
5
+ * NX Comments Widget
6
+ * ------------------------------------------------
7
+ * TemplatesNext
8
+ * Copyright TemplatesNext 2014 - http://www.TemplatesNext.org
9
+ */
10
+
11
+ /*
12
+ * Plugin Name: NX Recent Comments
13
+ * Plugin URI: http://www.TemplatesNext.org
14
+ * Description: NX Recent Comments
15
+ * Author: templatesNext
16
+ * Version: 1.0
17
+ * Author URI: http://www.TemplatesNext.org
18
+ */
19
+
20
+ // Register widget
21
+ add_action( 'widgets_init', 'init_nx_recent_comments' );
22
+ function init_nx_recent_comments() { return register_widget('nx_recent_comments'); }
23
+
24
+ class nx_recent_comments extends WP_Widget {
25
+ function nx_recent_comments() {
26
+ parent::WP_Widget( 'nx_recent_custom_comments', $name = 'NX Recent Comments', array( 'description' => __( 'NX Widget for Recent Comments', 'tx' ) ) );
27
+ }
28
+
29
+ function widget( $args, $instance ) {
30
+ global $post;
31
+ extract($args);
32
+
33
+ // Widget Options
34
+ $title = apply_filters('widget_title', $instance['title'] ); // Title
35
+ $number = $instance['number']; // Number of posts to show
36
+
37
+ echo $before_widget;
38
+
39
+ if ( $title ) echo $before_title . $title . $after_title;
40
+
41
+ $args = array(
42
+ 'number' => $number,
43
+ );
44
+
45
+ $comments = get_comments( $args );
46
+
47
+ if( $comments ) :
48
+
49
+ ?>
50
+
51
+ <ul class="recent-comments-list">
52
+
53
+ <?php foreach($comments as $comment) : ?>
54
+ <li class="comment nx-comment">
55
+ <div class="comment-wrap clearfix">
56
+ <div class="comment-avatar">
57
+ <?php if(function_exists('get_avatar')) {
58
+ echo get_avatar($comment, '48');
59
+ } ?>
60
+ </div>
61
+ <div class="comment-content">
62
+ <div class="arrpoint"></div>
63
+ <div class="comment-meta">
64
+ <?php
65
+ $comment_date = get_comment_date('', $comment->comment_ID);
66
+ $comment_date = mysql2date('U', $comment_date);
67
+
68
+ printf('<span class="comment-author">%1$s</span> <span class="comment-date">%2$s</span>',
69
+ $comment->comment_author,
70
+ human_time_diff( $comment_date, current_time('timestamp') ) . ' ' . __("ago", "tx")
71
+ );
72
+ ?>
73
+ </div>
74
+ <div class="comment-body">
75
+ <?php
76
+ $length = 60;
77
+ $comment_text = $comment->comment_content;
78
+ if ( strlen($comment_text) > $length ) {
79
+ $comment_text = substr($comment_text, 0, $length);
80
+ $comment_text = $comment_text .' ...';
81
+ }
82
+ ?>
83
+ <a href="<?php echo get_comments_link($comment->comment_post_ID); ?>"><?php echo apply_filters('the_content', $comment_text); ?></a>
84
+ </div>
85
+
86
+ </div>
87
+ </div>
88
+
89
+ </li>
90
+
91
+ <?php endforeach; ?>
92
+
93
+ </ul>
94
+
95
+ <?php endif; ?>
96
+
97
+ <?php
98
+
99
+ echo $after_widget;
100
+ }
101
+
102
+ /* Widget control update */
103
+ function update( $new_instance, $old_instance ) {
104
+ $instance = $old_instance;
105
+
106
+ $instance['title'] = strip_tags( $new_instance['title'] );
107
+ $instance['number'] = strip_tags( $new_instance['number'] );
108
+ return $instance;
109
+ }
110
+
111
+ /* Widget settings */
112
+ function form( $instance ) {
113
+
114
+ // Set defaults if instance doesn't already exist
115
+ if ( $instance ) {
116
+ $title = $instance['title'];
117
+ $number = $instance['number'];
118
+ } else {
119
+ // Defaults
120
+ $title = '';
121
+ $number = '5';
122
+ }
123
+
124
+ // The widget form
125
+ ?>
126
+ <p>
127
+ <label for="<?php echo $this->get_field_id('title'); ?>"><?php echo __( 'Title:', 'nx-admin' ); ?></label>
128
+ <input id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" class="widefat" />
129
+ </p>
130
+ <p>
131
+ <label for="<?php echo $this->get_field_id('number'); ?>"><?php echo __( 'Number of posts to show:', 'nx-admin' ); ?></label>
132
+ <input id="<?php echo $this->get_field_id('number'); ?>" name="<?php echo $this->get_field_name('number'); ?>" type="text" value="<?php echo $number; ?>" size="3" />
133
+ </p>
134
+ <?php
135
+ }
136
+
137
+ }
138
+
139
+ ?>
inc/widgets/widget-image.php ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ *
5
+ * nx Image Widget
6
+ * ------------------------------------------------
7
+ * TemplatesNext
8
+ * Copyright TemplatesNext 2014 - http://www.TemplatesNext.org
9
+ */
10
+
11
+ /*
12
+ * Plugin Name: NX Image Widget
13
+ * Plugin URI: http://www.TemplatesNext.org
14
+ * Description: NX Image Widget
15
+ * Author: templatesNext
16
+ * Version: 1.0
17
+ * Author URI: http://www.TemplatesNext.org
18
+ */
19
+
20
+ class nx_image_widget extends WP_Widget {
21
+
22
+ function nx_image_widget() {
23
+ $widget_ops = array( 'classname' => 'widget-nx-image', 'description' => 'Simple image widget' );
24
+ $control_ops = array( 'width' => 250, 'height' => 200, 'id_base' => 'nx-image-widget' ); //default width = 250
25
+ $this->WP_Widget( 'nx-image-widget', 'NX Image Widget', $widget_ops, $control_ops );
26
+ }
27
+
28
+ function form($instance) {
29
+ $defaults = array( 'title' => '', 'image_1' => '', 'image_1_url' => '');
30
+ $instance = wp_parse_args( (array) $instance, $defaults );
31
+
32
+ ?>
33
+ <div class="widget-content">
34
+ <p>
35
+ <label><?php _e('Title', 'nx-admin');?>:</label>
36
+ <input id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" class="widefat" type="text" />
37
+ </p>
38
+ <p>
39
+ <label><?php _e('Image 1 URL', 'nx-admin');?>:</label>
40
+ <input id="<?php echo $this->get_field_id( 'image_1' ); ?>" name="<?php echo $this->get_field_name( 'image_1' ); ?>" value="<?php echo $instance['image_1']; ?>" class="widefat" type="text"/>
41
+ </p>
42
+ <p>
43
+ <label><?php _e('Image 1 Link', 'nx-admin');?>:</label>
44
+ <input id="<?php echo $this->get_field_id( 'image_1_url' ); ?>" name="<?php echo $this->get_field_name( 'image_1_url' ); ?>" value="<?php echo $instance['image_1_url']; ?>" class="widefat" type="text"/>
45
+ </p>
46
+ </div>
47
+ <?php
48
+ }
49
+
50
+ function update($new_instance, $old_instance) {
51
+ $instance = $old_instance;
52
+
53
+ $instance['title'] = strip_tags( $new_instance['title'] );
54
+ $instance['image_1'] = strip_tags( $new_instance['image_1'] );
55
+ $instance['image_1_url'] = strip_tags( $new_instance['image_1_url'] );
56
+ return $instance;
57
+ }
58
+
59
+ function widget($args, $instance) {
60
+
61
+ extract( $args );
62
+
63
+ $title = apply_filters('widget_title', $instance['title'] );
64
+ $image_1 = $instance['image_1'];
65
+ $image_1_url = $instance['image_1_url'];
66
+
67
+ $output = '';
68
+
69
+ echo $before_widget;
70
+ if ( $title ) echo $before_title . $title . $after_title;
71
+
72
+ $output .= '<div class="sidebar-ad-grid"><ul class="clearfix">';
73
+
74
+ if ($image_1 != "") {
75
+ $output .= '<li>';
76
+ if ($image_1_url != "") {
77
+ $output .= '<a href="'.$image_1_url.'" target="_blank">';
78
+ $output .= '<img src="'.$image_1.'" alt="advert" />';
79
+ $output .= '</a>';
80
+ } else {
81
+ $output .= '<img src="'.$image_1.'" alt="advert" />';
82
+ }
83
+ $output .= '</li>';
84
+ }
85
+
86
+ $output .= '</ul></div>';
87
+
88
+ echo $output;
89
+
90
+ echo $after_widget;
91
+
92
+ }
93
+
94
+ }
95
+
96
+ add_action( 'widgets_init', 'nx_load_image_widget' );
97
+
98
+ function nx_load_image_widget() {
99
+ register_widget('nx_image_widget');
100
+ }
101
+
102
+ ?>
inc/widgets/widget-portfolio-grid.php ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * nx Portfolio Widget
5
+ * ------------------------------------------------
6
+ * TemplatesNext
7
+ * Copyright TemplatesNext 2014 - http://www.TemplatesNext.org
8
+ */
9
+
10
+ /*
11
+ * Plugin Name: NX Portfolio Grid
12
+ * Plugin URI: http://www.TemplatesNext.org
13
+ * Description: NX Portfolio Grid
14
+ * Author: templatesNext
15
+ * Version: 1.0
16
+ * Author URI: http://www.TemplatesNext.org
17
+ */
18
+
19
+ // Register widget
20
+ add_action( 'widgets_init', 'init_nx_portfolio_grid' );
21
+ function init_nx_portfolio_grid() { return register_widget('nx_portfolio_grid'); }
22
+
23
+ class nx_portfolio_grid extends WP_Widget {
24
+ function nx_portfolio_grid() {
25
+ parent::WP_Widget( 'nx_custom_portfolio_grid', $name = 'NX Portfolio Grid', array( 'description' => __( 'NX Widget for Portofolio in grid format', 'tx' ) ) );
26
+ }
27
+
28
+ function widget( $args, $instance ) {
29
+ global $post;
30
+ extract($args);
31
+
32
+ // Widget Options
33
+ $title = apply_filters('widget_title', $instance['title'] ); // Title
34
+ $number = $instance['number']; // Number of posts to show
35
+
36
+ echo $before_widget;
37
+
38
+ if ( $title ) echo $before_title . $title . $after_title;
39
+
40
+ $recent_portfolio = new WP_Query(
41
+ array(
42
+ 'post_type' => 'portfolio',
43
+ 'posts_per_page' => $number
44
+ )
45
+ );
46
+
47
+ $count = 0;
48
+
49
+ if( $recent_portfolio->have_posts() ) :
50
+
51
+ ?>
52
+
53
+ <ul class="portfolio-grid clearfix">
54
+
55
+ <?php while( $recent_portfolio->have_posts()) : $recent_portfolio->the_post();
56
+
57
+ $post_title = get_the_title();
58
+ $post_permalink = get_permalink();
59
+
60
+ $thumb_image = get_post_thumbnail_id();
61
+ $thumb_img_url = wp_get_attachment_url( $thumb_image, 'small' );
62
+ $image = tx_image_resize( $thumb_img_url, 96, 96, true, false);
63
+ ?>
64
+ <?php if ($image) { ?>
65
+ <li class="grid-item-<?php echo $count; ?>">
66
+ <a href="<?php echo $post_permalink; ?>" class="grid-image tooltip2" title="<?php echo $post_title; ?>">
67
+ <img src="<?php echo $image['url']; ?>" width="<?php echo $image[1]; ?>" alt="<?php echo $post_title; ?>" />
68
+ </a>
69
+ </li>
70
+ <?php } ?>
71
+
72
+ <?php $count++; wp_reset_query(); endwhile; ?>
73
+ </ul>
74
+
75
+ <?php endif; ?>
76
+
77
+ <?php
78
+
79
+ echo $after_widget;
80
+ }
81
+
82
+ /* Widget control update */
83
+ function update( $new_instance, $old_instance ) {
84
+ $instance = $old_instance;
85
+
86
+ $instance['title'] = strip_tags( $new_instance['title'] );
87
+ $instance['number'] = strip_tags( $new_instance['number'] );
88
+ return $instance;
89
+ }
90
+
91
+ /* Widget settings */
92
+ function form( $instance ) {
93
+
94
+ // Set defaults if instance doesn't already exist
95
+ if ( $instance ) {
96
+ $title = $instance['title'];
97
+ $number = $instance['number'];
98
+ } else {
99
+ // Defaults
100
+ $title = '';
101
+ $number = '6';
102
+ }
103
+
104
+ // The widget form
105
+ ?>
106
+ <div class="widget-content">
107
+ <p>
108
+ <label for="<?php echo $this->get_field_id('title'); ?>"><?php echo __( 'Title:', 'nx-admin' ); ?></label>
109
+ <input id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" class="widefat" />
110
+ </p>
111
+ <p>
112
+ <label for="<?php echo $this->get_field_id('number'); ?>"><?php echo __( 'Number of items to show:', 'nx-admin' ); ?></label>
113
+ <input id="<?php echo $this->get_field_id('number'); ?>" name="<?php echo $this->get_field_name('number'); ?>" type="text" value="<?php echo $number; ?>" size="3" />
114
+ </p>
115
+ </div>
116
+ <?php
117
+ }
118
+
119
+ }
120
+
121
+ ?>
inc/widgets/widget-portfolio.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * nx Portfolio Widget
5
+ * ------------------------------------------------
6
+ * TemplatesNext
7
+ * Copyright TemplatesNext 2014 - http://www.TemplatesNext.org
8
+ */
9
+ /*
10
+ * Plugin Name: NX Portfolio List
11
+ * Plugin URI: http://www.TemplatesNext.org
12
+ * Description: NX Portfolio List
13
+ * Author: templatesNext
14
+ * Version: 1.0
15
+ * Author URI: http://www.TemplatesNext.org
16
+ */
17
+
18
+ // Register widget
19
+ add_action( 'widgets_init', 'init_nx_recent_portfolio' );
20
+ function init_nx_recent_portfolio() { return register_widget('nx_recent_portfolio'); }
21
+
22
+ class nx_recent_portfolio extends WP_Widget {
23
+ function nx_recent_portfolio() {
24
+ parent::WP_Widget( 'nx_recent_custom_portfolio', $name = 'NX Portfolio List', array( 'description' => __( 'NX Widget for Portofolio in list format', 'tx' ) ) );
25
+ }
26
+
27
+ function widget( $args, $instance ) {
28
+ global $post;
29
+ extract($args);
30
+
31
+ // Widget Options
32
+ $title = apply_filters('widget_title', $instance['title'] ); // Title
33
+ $number = $instance['number']; // Number of posts to show
34
+
35
+ echo $before_widget;
36
+
37
+ if ( $title ) echo $before_title . $title . $after_title;
38
+
39
+ $recent_portfolio = new WP_Query(
40
+ array(
41
+ 'post_type' => 'portfolio',
42
+ 'posts_per_page' => $number
43
+ )
44
+ );
45
+
46
+ if( $recent_portfolio->have_posts() ) :
47
+
48
+ ?>
49
+
50
+ <ul class="recent-posts-list portfolio-list">
51
+
52
+ <?php while( $recent_portfolio->have_posts()) : $recent_portfolio->the_post();
53
+
54
+ $post_title = get_the_title();
55
+ $post_permalink = get_permalink();
56
+ $thumb_image = get_post_thumbnail_id();
57
+ $thumb_img_url = wp_get_attachment_url( $thumb_image, 'widget-image' );
58
+ $image = tx_image_resize( $thumb_img_url, 94, 75, true, false);
59
+ ?>
60
+ <li>
61
+ <a href="<?php echo $post_permalink; ?>" class="recent-post-image">
62
+ <?php if ($image) { ?>
63
+ <img src="<?php echo $image['url']; ?>" width="<?php echo $image[1]; ?>" height="<?php echo $image[2]; ?>" alt=" " />
64
+ <?php } ?>
65
+ </a>
66
+ <div class="recent-post-details">
67
+ <a class="recent-post-title" href="<?php echo $post_permalink; ?>" title="<?php echo $post_title; ?>"><?php echo $post_title; ?></a>
68
+ </div>
69
+ </li>
70
+
71
+ <?php wp_reset_query(); endwhile; ?>
72
+ </ul>
73
+
74
+ <?php endif; ?>
75
+
76
+ <?php
77
+
78
+ echo $after_widget;
79
+ }
80
+
81
+ /* Widget control update */
82
+ function update( $new_instance, $old_instance ) {
83
+ $instance = $old_instance;
84
+
85
+ $instance['title'] = strip_tags( $new_instance['title'] );
86
+ $instance['number'] = strip_tags( $new_instance['number'] );
87
+ return $instance;
88
+ }
89
+
90
+ /* Widget settings */
91
+ function form( $instance ) {
92
+
93
+ // Set defaults if instance doesn't already exist
94
+ if ( $instance ) {
95
+ $title = $instance['title'];
96
+ $number = $instance['number'];
97
+ } else {
98
+ // Defaults
99
+ $title = '';
100
+ $number = '5';
101
+ }
102
+
103
+ // The widget form
104
+ ?>
105
+ <div class="widget-content">
106
+ <p>
107
+ <label for="<?php echo $this->get_field_id('title'); ?>"><?php echo __( 'Title:', 'nx-admin' ); ?></label>
108
+ <input id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" class="widefat" />
109
+ </p>
110
+ <p>
111
+ <label for="<?php echo $this->get_field_id('number'); ?>"><?php echo __( 'Number of items to show:', 'nx-admin' ); ?></label>
112
+ <input id="<?php echo $this->get_field_id('number'); ?>" name="<?php echo $this->get_field_name('number'); ?>" type="text" value="<?php echo $number; ?>" size="3" />
113
+ </p>
114
+ </div>
115
+ <?php
116
+ }
117
+
118
+ }
119
+
120
+ ?>
inc/widgets/widget-posts.php ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ *
5
+ * nx Posts Widget
6
+ * ------------------------------------------------
7
+ * TemplatesNext
8
+ * Copyright TemplatesNext 2014 - http://www.TemplatesNext.org
9
+ */
10
+ /*
11
+ * Plugin Name: NX Recent posts
12
+ * Plugin URI: http://www.TemplatesNext.org
13
+ * Description: NX Widget for Recent Posts
14
+ * Author: templatesNext
15
+ * Version: 1.0
16
+ * Author URI: http://www.TemplatesNext.org
17
+ */
18
+
19
+ // Register widget
20
+ add_action( 'widgets_init', 'init_nx_recent_posts' );
21
+ function init_nx_recent_posts() { return register_widget('nx_recent_posts'); }
22
+
23
+ class nx_recent_posts extends WP_Widget {
24
+ function nx_recent_posts() {
25
+ parent::WP_Widget( 'nx_recent_custom_posts', $name = 'NX Recent Posts', array( 'description' => __( 'NX Widget for Recent Posts', 'tx' ) ) );
26
+ }
27
+
28
+ function widget( $args, $instance ) {
29
+ global $post;
30
+ extract($args);
31
+
32
+ // Widget Options
33
+ $title = apply_filters('widget_title', $instance['title'] ); // Title
34
+ $number = $instance['number']; // Number of posts to show
35
+
36
+ echo $before_widget;
37
+
38
+ if ( $title ) echo $before_title . $title . $after_title;
39
+
40
+ $atts['posts_per_page'] = $number;
41
+ $atts['post_type'] = 'post';
42
+ $atts['ignore_sticky_posts'] = 1;
43
+
44
+ $recent_posts = new WP_Query($atts);
45
+
46
+ /*
47
+ $recent_posts = new WP_Query(
48
+ array(
49
+ 'post_type' => 'post',
50
+ 'posts_per_page' => 5,
51
+ 'post_count' => 5,
52
+ 'post_status' => 'publish'
53
+ )
54
+ );
55
+ */
56
+
57
+ if( $recent_posts->have_posts() ) :
58
+
59
+ ?>
60
+
61
+ <ul class="recent-posts-list">
62
+
63
+ <?php while( $recent_posts->have_posts()) : $recent_posts->the_post();
64
+
65
+ $thumb_stat = "";
66
+ $post_title = get_the_title();
67
+ $post_author = get_the_author_link();
68
+ $post_date = get_the_date('M j, Y');
69
+ $post_categories = get_the_category_list();
70
+ $post_comments = get_comments_number();
71
+ $post_permalink = get_permalink();
72
+
73
+ $thumb_image = get_post_thumbnail_id();
74
+ $thumb_img_url = wp_get_attachment_url( $thumb_image, 'small' );
75
+ $image = tx_image_resize( $thumb_img_url, 96, 96, true, false);
76
+
77
+ if ($image) {
78
+ $thumb_stat = "thumbyes";
79
+ } else
80
+ {
81
+ $thumb_stat = "thumbno";
82
+ }
83
+ ?>
84
+ <li class="clearfix nx-recent-post">
85
+
86
+ <a href="<?php echo $post_permalink; ?>" class="recent-post-image">
87
+ <?php if ($image) { ?>
88
+ <img src="<?php echo $image['url']; ?>" alt=" " />
89
+ <?php } ?>
90
+ </a>
91
+ <div class="recent-post-details <?php echo $thumb_stat; ?>">
92
+ <a class="recent-post-title" href="<?php echo $post_permalink; ?>" title="<?php echo $post_title; ?>"><?php echo $post_title; ?></a>
93
+ <span class="post-meta"><?php printf(__('By %1$s on %2$s', 'tx'), $post_author, $post_date); ?></span>
94
+ </div>
95
+ </li>
96
+
97
+ <?php wp_reset_query(); endwhile; ?>
98
+ </ul>
99
+
100
+ <?php endif; ?>
101
+
102
+ <?php
103
+
104
+ echo $after_widget;
105
+ }
106
+
107
+ /* Widget control update */
108
+ function update( $new_instance, $old_instance ) {
109
+ $instance = $old_instance;
110
+
111
+ $instance['title'] = strip_tags( $new_instance['title'] );
112
+ $instance['number'] = strip_tags( $new_instance['number'] );
113
+ return $instance;
114
+ }
115
+
116
+ /* Widget settings */
117
+ function form( $instance ) {
118
+
119
+ // Set defaults if instance doesn't already exist
120
+ if ( $instance ) {
121
+ $title = $instance['title'];
122
+ $number = $instance['number'];
123
+ } else {
124
+ // Defaults
125
+ $title = '';
126
+ $number = '5';
127
+ }
128
+
129
+ // The widget form
130
+ ?>
131
+ <p>
132
+ <label for="<?php echo $this->get_field_id('title'); ?>"><?php echo __( 'Title:', 'nx-admin' ); ?></label>
133
+ <input id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" class="widefat" />
134
+ </p>
135
+ <p>
136
+ <label for="<?php echo $this->get_field_id('number'); ?>"><?php echo __( 'Number of posts to show:', 'nx-admin'); ?></label>
137
+ <input id="<?php echo $this->get_field_id('number'); ?>" name="<?php echo $this->get_field_name('number'); ?>" type="text" value="<?php echo $number; ?>" size="3" />
138
+ </p>
139
+ <?php
140
+ }
141
+
142
+ }
143
+
144
+ ?>
js/tx-script.js CHANGED
@@ -2,6 +2,14 @@ jQuery(document).ready(function ($) {
2
 
3
  "use strict";
4
 
 
 
 
 
 
 
 
 
5
 
6
 
7
  //client carousel
@@ -140,6 +148,70 @@ jQuery(document).ready(function ($) {
140
  */
141
 
142
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
 
144
 
145
  });
2
 
3
  "use strict";
4
 
5
+ var $window = jQuery(window),
6
+ body = jQuery('body'),
7
+ //windowheight = page.getViewportHeight(),
8
+ sitewidth = $('.site').width(),
9
+ maxwidth = $('.site-main').width(),
10
+ windowheight = $window.height(),
11
+ pageheight = $( document ).height(),
12
+ windowwidth = $window.width();
13
 
14
 
15
  //client carousel
148
  */
149
 
150
 
151
+ /////////////////////////////////////////////
152
+ // Forcing Wide
153
+ /////////////////////////////////////////////
154
+
155
+ $.fn.widify = function() {
156
+
157
+ this.each( function() {
158
+ var _this = $(this);
159
+ var fwheight = $(this).children('div').outerHeight();
160
+ var extrawidth = (sitewidth-maxwidth)/2+32;
161
+
162
+ if(sitewidth > 1200)
163
+ {
164
+ _this.wrapInner( "<div class='tx-fullwidthinner'></div>" );
165
+
166
+ _this.css({"overflow":"visible"});
167
+ _this.children('.tx-fullwidthinner').css({"width":sitewidth+"px","position":"relative","margin-left":"-"+extrawidth+"px","overflow":"hidden"});
168
+
169
+ //console.log ("yo max width : "+maxwidth+" sitewidth : "+sitewidth+" left: "+extrawidth);
170
+
171
+ }
172
+
173
+
174
+ $(window).resize(function() {
175
+ //console.log("resized : "+$('.site').width()+", Site width : "+sitewidth+", max width : "+maxwidth);
176
+ maxwidth = $('.site-main').width();
177
+ sitewidth = $('.site').width();
178
+ extrawidth = (sitewidth-maxwidth)/2+32;
179
+
180
+ if(sitewidth > 1200) {
181
+
182
+ if(!_this.children('div').hasClass('tx-fullwidthinner'))
183
+ {
184
+ _this.wrapInner( "<div style='position: relative; overflow: hidden;' class='tx-fullwidthinner'></div>" );
185
+ console.log("added");
186
+ }
187
+
188
+ _this.css({"overflow":"visible"});
189
+ _this.children('.tx-fullwidthinner').css({"width":sitewidth+"px","position":"relative","margin-left":"-"+extrawidth+"px"});
190
+ } else
191
+ {
192
+
193
+ if(_this.children('div').hasClass('tx-fullwidthinner'))
194
+ {
195
+ _this.children('.tx-fullwidthinner').children().unwrap();
196
+ }
197
+ _this.css({"height":"auto","overflow":"hidden"});
198
+ console.log("should be here");
199
+ }
200
+
201
+ });
202
+
203
+ });
204
+ };
205
+
206
+ // forcing wide
207
+ $('.tx-fullwidthrow').each(function () {
208
+ if( $('body.tx-boxed').length < 1 && $('.has-left-sidebar').length < 1 && $('.has-right-sidebar').length < 1 )
209
+ {
210
+ $(this).widify();
211
+ }
212
+ });
213
+
214
+
215
 
216
 
217
  });
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: marsian
4
  Tags: shortcode, shortcodes, columns, column, section, sections, portfolio, testimonial, border, borders, button, buttons, masonry, posts, post_type, font awesome, icons, fontawesome
5
  Requires at least: 3.6
6
  Tested up to: 4.1
7
- Stable tag: 1.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -25,9 +25,6 @@ Install the plugin into the `/wp-content/plugins/` folder, and activate it.
25
 
26
  == Changelog ==
27
 
28
- = 1.0.9 =
29
- * CSS fix for mobile devices.
30
- * Portfolio on image link added.
31
 
32
  = 1.0.7 =
33
  * Added pagination for recent posts (blog) shortcode.
4
  Tags: shortcode, shortcodes, columns, column, section, sections, portfolio, testimonial, border, borders, button, buttons, masonry, posts, post_type, font awesome, icons, fontawesome
5
  Requires at least: 3.6
6
  Tested up to: 4.1
7
+ Stable tag: 1.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
25
 
26
  == Changelog ==
27
 
 
 
 
28
 
29
  = 1.0.7 =
30
  * Added pagination for recent posts (blog) shortcode.
shortcodes.php CHANGED
@@ -40,6 +40,7 @@ function tx_blog_function($atts, $content = null) {
40
  ), $atts);
41
 
42
  $post_in_cat = tx_shortcodes_comma_delim_to_array( $atts['category_id'] );
 
43
 
44
  $posts_per_page = intval( $atts['items'] );
45
  $total_column = intval( $atts['columns'] );
@@ -80,6 +81,8 @@ function tx_blog_function($atts, $content = null) {
80
 
81
  if ( have_posts() ) : while ( have_posts() ) : the_post();
82
 
 
 
83
  if (in_array("tx-medium", get_intermediate_image_sizes())) {
84
  $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'tx-medium' );
85
  } else
@@ -94,7 +97,7 @@ function tx_blog_function($atts, $content = null) {
94
 
95
  if ( has_post_thumbnail() ) {
96
  $return_string .= '<div class="tx-blog-img"><a href="'.esc_url($full_image_url[0]).'" class="tx-colorbox">';
97
- $return_string .= '<img src="'.esc_url($large_image_url[0]).'" alt="" class="blog-image" /></a></div>';
98
  } else
99
  {
100
  $return_string .= '<div class="tx-blog-imgpad"></div>';
@@ -275,16 +278,14 @@ function tx_testimonial_function($atts, $content = null) {
275
  'orderby' => 'date',
276
  'order' => 'DESC'
277
  );
278
- //$args['paging'] = true;
279
- /**/
280
  query_posts( $args );
281
 
282
  if ( have_posts() ) : while ( have_posts() ) : the_post();
283
 
284
- $testi_name = esc_attr(rwmb_meta('icreate_testi_name'));
285
- $testi_desig = esc_attr(rwmb_meta('icreate_testi_desig'));
286
- $testi_organ = esc_attr(rwmb_meta('icreate_testi_company'));
287
-
288
 
289
  $return_string .= '<div class="tx-testi-item">';
290
  $return_string .= '<span class="tx-testi-text">'.get_the_content().'</span>';
@@ -349,18 +350,22 @@ function tx_calltoact_function($atts, $content = null) {
349
  function tx_services_function($atts, $content = null) {
350
 
351
  $atts = shortcode_atts(array(
 
352
  'title' => '',
353
  'icon' => '',
354
  'class' => '',
355
  ), $atts);
356
 
 
 
357
  $service_text = do_shortcode($content);
358
  $service_icon = esc_attr($atts['icon']);
359
  $service_title = esc_attr($atts['title']);
 
360
 
361
  $return_string ='';
362
 
363
- $return_string .= '<div class="tx-service" style="">';
364
  $return_string .= '<div class="tx-service-icon"><span><i class="fa '.$service_icon.'"></i></span></div>';
365
  $return_string .= '<div class="tx-service-title">'.$service_title.'</div>';
366
  $return_string .= '<div class="tx-service-text">'.$service_text.'</div>';
@@ -374,6 +379,7 @@ function tx_services_function($atts, $content = null) {
374
  function tx_portfolio_function($atts, $content = null) {
375
 
376
  $atts = shortcode_atts(array(
 
377
  'items' => 4,
378
  'columns' => 4,
379
  'hide_cat' => 'no',
@@ -383,15 +389,21 @@ function tx_portfolio_function($atts, $content = null) {
383
  ), $atts);
384
 
385
 
 
386
  $posts_per_page = intval( $atts['items'] );
387
  $total_column = intval( $atts['columns'] );
388
  $tx_carousel = $atts['carousel'];
 
 
 
 
 
389
 
390
 
391
  $return_string = '';
392
 
393
  if( $tx_carousel == 'no' ) {
394
- $return_string .= '<div class="tx-portfolio tx-post-row tx-masonry">';
395
  } else
396
  {
397
  $return_string .= '<div class="tx-portfolio tx-post-row tx-carousel" data-columns="'.$total_column.'">';
@@ -435,13 +447,14 @@ function tx_portfolio_function($atts, $content = null) {
435
  if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
436
  $return_string .= '<div class="tx-folio-img">';
437
  $return_string .= '<div class="tx-folio-img-wrap"><img src="'.esc_url($large_image_url[0]).'" alt="" class="folio-img" /></div>';
438
- $return_string .= '<div class="folio-links">';
439
  $return_string .= '<a href="'.esc_url(get_permalink()).'" class="folio-linkico"><i class="fa fa-link"></i></a>';
440
  $return_string .= '<a href="'.esc_url($full_image_url[0]).'" class="tx-colorbox folio-zoomico"><i class="fa fa-search-plus"></i></a>';
441
- $return_string .= '</div>';
442
  $return_string .= '</div>';
443
  }
444
 
 
445
  $return_string .= '<h3 class="tx-folio-title"><a href="'.get_permalink().'">'.get_the_title().'</a></h3>';
446
  if ( $atts['hide_cat'] == 'no' ) { // check if the post has a Post Thumbnail assigned to it.
447
  $return_string .= '<div class="tx-folio-category">'.tx_folio_term( 'portfolio-category' ).'</div>';
@@ -449,7 +462,8 @@ function tx_portfolio_function($atts, $content = null) {
449
  {
450
  $return_string .= '<div style="display: block; clear: both; height: 16px;"></div>';
451
  }
452
- if ( $atts['hide_excerpt'] == 'no' ) { // check if the post has a Post Thumbnail assigned to it.
 
453
  $return_string .= '<div class="tx-folio-content">'.get_the_excerpt().'</div>';
454
  }
455
 
@@ -598,7 +612,7 @@ function tx_slider_function($atts, $content = null) {
598
  }
599
 
600
 
601
- function register_shortcodes(){
602
  add_shortcode('tx_recentposts', 'tx_recentposts_function');
603
  add_shortcode('tx_row', 'tx_row_function');
604
  add_shortcode('tx_column', 'tx_column_function');
@@ -615,7 +629,7 @@ function register_shortcodes(){
615
  add_shortcode('tx_slider', 'tx_slider_function');
616
  }
617
 
618
- add_action( 'init', 'register_shortcodes');
619
 
620
 
621
 
40
  ), $atts);
41
 
42
  $post_in_cat = tx_shortcodes_comma_delim_to_array( $atts['category_id'] );
43
+ $post_comments = '';
44
 
45
  $posts_per_page = intval( $atts['items'] );
46
  $total_column = intval( $atts['columns'] );
81
 
82
  if ( have_posts() ) : while ( have_posts() ) : the_post();
83
 
84
+ $post_comments = get_comments_number();
85
+
86
  if (in_array("tx-medium", get_intermediate_image_sizes())) {
87
  $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'tx-medium' );
88
  } else
97
 
98
  if ( has_post_thumbnail() ) {
99
  $return_string .= '<div class="tx-blog-img"><a href="'.esc_url($full_image_url[0]).'" class="tx-colorbox">';
100
+ $return_string .= '<img src="'.esc_url($large_image_url[0]).'" alt="" class="blog-image" /></a><span class="tx-post-comm"><span>'.$post_comments.'</span></span></div>';
101
  } else
102
  {
103
  $return_string .= '<div class="tx-blog-imgpad"></div>';
278
  'orderby' => 'date',
279
  'order' => 'DESC'
280
  );
281
+
 
282
  query_posts( $args );
283
 
284
  if ( have_posts() ) : while ( have_posts() ) : the_post();
285
 
286
+ $testi_name = esc_attr(rwmb_meta('tx_testi_name'));
287
+ $testi_desig = esc_attr(rwmb_meta('tx_testi_desig'));
288
+ $testi_organ = esc_attr(rwmb_meta('tx_testi_company'));
 
289
 
290
  $return_string .= '<div class="tx-testi-item">';
291
  $return_string .= '<span class="tx-testi-text">'.get_the_content().'</span>';
350
  function tx_services_function($atts, $content = null) {
351
 
352
  $atts = shortcode_atts(array(
353
+ 'style' => 'default',
354
  'title' => '',
355
  'icon' => '',
356
  'class' => '',
357
  ), $atts);
358
 
359
+ $style_class = '';
360
+
361
  $service_text = do_shortcode($content);
362
  $service_icon = esc_attr($atts['icon']);
363
  $service_title = esc_attr($atts['title']);
364
+ $style_class = $atts['style'];
365
 
366
  $return_string ='';
367
 
368
+ $return_string .= '<div class="tx-service '.$style_class.'" style="">';
369
  $return_string .= '<div class="tx-service-icon"><span><i class="fa '.$service_icon.'"></i></span></div>';
370
  $return_string .= '<div class="tx-service-title">'.$service_title.'</div>';
371
  $return_string .= '<div class="tx-service-text">'.$service_text.'</div>';
379
  function tx_portfolio_function($atts, $content = null) {
380
 
381
  $atts = shortcode_atts(array(
382
+ 'style' => 'default',
383
  'items' => 4,
384
  'columns' => 4,
385
  'hide_cat' => 'no',
389
  ), $atts);
390
 
391
 
392
+ $style_class = '';
393
  $posts_per_page = intval( $atts['items'] );
394
  $total_column = intval( $atts['columns'] );
395
  $tx_carousel = $atts['carousel'];
396
+
397
+ if ( $atts['style'] == 'gallery' )
398
+ {
399
+ $style_class = 'folio-style-gallery';
400
+ }
401
 
402
 
403
  $return_string = '';
404
 
405
  if( $tx_carousel == 'no' ) {
406
+ $return_string .= '<div class="tx-portfolio tx-post-row tx-masonry '.$style_class.'">';
407
  } else
408
  {
409
  $return_string .= '<div class="tx-portfolio tx-post-row tx-carousel" data-columns="'.$total_column.'">';
447
  if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
448
  $return_string .= '<div class="tx-folio-img">';
449
  $return_string .= '<div class="tx-folio-img-wrap"><img src="'.esc_url($large_image_url[0]).'" alt="" class="folio-img" /></div>';
450
+ $return_string .= '<div class="folio-links"><span>';
451
  $return_string .= '<a href="'.esc_url(get_permalink()).'" class="folio-linkico"><i class="fa fa-link"></i></a>';
452
  $return_string .= '<a href="'.esc_url($full_image_url[0]).'" class="tx-colorbox folio-zoomico"><i class="fa fa-search-plus"></i></a>';
453
+ $return_string .= '</span></div>';
454
  $return_string .= '</div>';
455
  }
456
 
457
+ $return_string .= '<span class="folio-head">';
458
  $return_string .= '<h3 class="tx-folio-title"><a href="'.get_permalink().'">'.get_the_title().'</a></h3>';
459
  if ( $atts['hide_cat'] == 'no' ) { // check if the post has a Post Thumbnail assigned to it.
460
  $return_string .= '<div class="tx-folio-category">'.tx_folio_term( 'portfolio-category' ).'</div>';
462
  {
463
  $return_string .= '<div style="display: block; clear: both; height: 16px;"></div>';
464
  }
465
+ $return_string .= '</span>';
466
+ if ( $atts['hide_excerpt'] == 'no' && $atts['style'] != 'gallery' ) { // check if the post has a Post Thumbnail assigned to it.
467
  $return_string .= '<div class="tx-folio-content">'.get_the_excerpt().'</div>';
468
  }
469
 
612
  }
613
 
614
 
615
+ function tx_register_shortcodes(){
616
  add_shortcode('tx_recentposts', 'tx_recentposts_function');
617
  add_shortcode('tx_row', 'tx_row_function');
618
  add_shortcode('tx_column', 'tx_column_function');
629
  add_shortcode('tx_slider', 'tx_slider_function');
630
  }
631
 
632
+ add_action( 'init', 'tx_register_shortcodes');
633
 
634
 
635
 
tx-shortcodes.js CHANGED
@@ -41,6 +41,9 @@
41
  <tr>\
42
  <td class="shortcode-list"><span id="wooprods">Product Carousel <small>(WooCommerce)</small></span></td><td class="shortcode-list"><span id="itrans-slider">i-trans Slider</span></td>\
43
  </tr>\
 
 
 
44
  </table>\
45
  <div class="nx-sh-cancel">\
46
  <input type="button" class="modal-close button-primary" value="Cancel" name="Cancel" />\
@@ -138,7 +141,14 @@
138
  setTimeout(function() {
139
  jQuery.colorbox({inline:true, href:"#tx-slider-form"});
140
  }, 500);
141
- });
 
 
 
 
 
 
 
142
 
143
  form_tx.find('.modal-close').click(function(){
144
  jQuery.colorbox.close();
@@ -154,6 +164,14 @@
154
  <tr>\
155
  <td class="tx-heading" colspan="2"><h2>Portfolio</h2></td>\
156
  </tr>\
 
 
 
 
 
 
 
 
157
  <tr>\
158
  <th><label for="portfolio-items">Number of item</label></th>\
159
  <td><input type="number" max="12" min="0" id="portfolio-items" name="items" value="4" /><br />\
@@ -215,6 +233,7 @@
215
  // handles the click event of the submit button
216
  form_portfolio.find('#portfolio-submit').click(function(){
217
 
 
218
  var number_of_item = table.find('#portfolio-items').val();
219
  var number_of_column = table.find('#portfolio-columns').val();
220
  var hide_cat = table.find('#portfolio-hidecat').val();
@@ -223,7 +242,7 @@
223
  var show_carusel = table.find('#portfolio-carusel').val();
224
 
225
 
226
- var shortcode = '[tx_portfolio items="'+number_of_item+'" columns="'+number_of_column+'" hide_cat="'+hide_cat+'" hide_excerpt="'+hide_excerpt+'" show_pagination="'+show_page+'" carousel="'+show_carusel+'"]<br/>';
227
 
228
  // inserts the shortcode into the active editor
229
  tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
@@ -726,6 +745,15 @@
726
  <tr>\
727
  <td class="tx-heading" colspan="2"><h2>Services</h2></td>\
728
  </tr>\
 
 
 
 
 
 
 
 
 
729
  <tr>\
730
  <th><label for="services-title">Services Title</label></th>\
731
  <td><input type="text" name="title" id="services-title" value="Services Title" /><br />\
@@ -742,7 +770,7 @@
742
  </tr>\
743
  </table>\
744
  <p class="submit">\
745
- <input type="button" id="button-submit" class="button-primary" value="Insert Call to act" name="submit" />\
746
  <input type="button" id="modal-close" class="modal-close button-primary" value="Cancel" name="Cancel" />\
747
  </p>\
748
  <div class="tnext-bottom-lebel">'+tx_footer_include()+'</div>\
@@ -755,11 +783,12 @@
755
  // handles the click event of the submit button
756
  form_services.find('#button-submit').click(function(){
757
 
 
758
  var services_title = table.find('#services-title').val();
759
  var services_icon = table.find('#services-icon').val();
760
  var services_content = table.find('#services-content').val();
761
 
762
- var shortcode = '[tx_services title="'+services_title+'" icon="'+services_icon+'"]'+services_content+'[/tx_services]';
763
 
764
  // inserts the shortcode into the active editor
765
  tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
@@ -962,11 +991,107 @@
962
  jQuery.colorbox.close();
963
  });
964
 
965
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
966
 
967
 
968
 
969
- })()
970
 
971
 
972
  jQuery(window).resize( function() {
41
  <tr>\
42
  <td class="shortcode-list"><span id="wooprods">Product Carousel <small>(WooCommerce)</small></span></td><td class="shortcode-list"><span id="itrans-slider">i-trans Slider</span></td>\
43
  </tr>\
44
+ <!-- <tr>\
45
+ <td class="shortcode-list"><span id="tximage">Image</small></span></td><td class="shortcode-list">&nbsp;</td>\
46
+ </tr> -->\
47
  </table>\
48
  <div class="nx-sh-cancel">\
49
  <input type="button" class="modal-close button-primary" value="Cancel" name="Cancel" />\
141
  setTimeout(function() {
142
  jQuery.colorbox({inline:true, href:"#tx-slider-form"});
143
  }, 500);
144
+ });
145
+
146
+ //Insert Image
147
+ form_tx.find('#tximage').click(function(){
148
+ setTimeout(function() {
149
+ jQuery.colorbox({inline:true, href:"#tx-image-form"});
150
+ }, 500);
151
+ });
152
 
153
  form_tx.find('.modal-close').click(function(){
154
  jQuery.colorbox.close();
164
  <tr>\
165
  <td class="tx-heading" colspan="2"><h2>Portfolio</h2></td>\
166
  </tr>\
167
+ <tr>\
168
+ <th><label for="portfolio-style">Portfolio Style</label></th>\
169
+ <td><select name="style" id="portfolio-style">\
170
+ <option value="default">Default</option>\
171
+ <option value="gallery">Gallery</option>\
172
+ </select><br />\
173
+ <small>Specify the portfolio style, "Gallery" style will not work with carousel.</small></td>\
174
+ </tr>\
175
  <tr>\
176
  <th><label for="portfolio-items">Number of item</label></th>\
177
  <td><input type="number" max="12" min="0" id="portfolio-items" name="items" value="4" /><br />\
233
  // handles the click event of the submit button
234
  form_portfolio.find('#portfolio-submit').click(function(){
235
 
236
+ var portfolio_style = table.find('#portfolio-style').val();
237
  var number_of_item = table.find('#portfolio-items').val();
238
  var number_of_column = table.find('#portfolio-columns').val();
239
  var hide_cat = table.find('#portfolio-hidecat').val();
242
  var show_carusel = table.find('#portfolio-carusel').val();
243
 
244
 
245
+ var shortcode = '[tx_portfolio style="'+portfolio_style+'" items="'+number_of_item+'" columns="'+number_of_column+'" hide_cat="'+hide_cat+'" hide_excerpt="'+hide_excerpt+'" show_pagination="'+show_page+'" carousel="'+show_carusel+'"]<br/>';
246
 
247
  // inserts the shortcode into the active editor
248
  tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
745
  <tr>\
746
  <td class="tx-heading" colspan="2"><h2>Services</h2></td>\
747
  </tr>\
748
+ <tr>\
749
+ <th><label for="services-style">Services Style</label></th>\
750
+ <td><select name="style" id="services-style">\
751
+ <option value="default">Default (Circle)</option>\
752
+ <option value="curved">Curved Corner</option>\
753
+ <option value="square">Square</option>\
754
+ </select><br />\
755
+ <small>Specify the services style</small></td>\
756
+ </tr>\
757
  <tr>\
758
  <th><label for="services-title">Services Title</label></th>\
759
  <td><input type="text" name="title" id="services-title" value="Services Title" /><br />\
770
  </tr>\
771
  </table>\
772
  <p class="submit">\
773
+ <input type="button" id="button-submit" class="button-primary" value="Insert Services" name="submit" />\
774
  <input type="button" id="modal-close" class="modal-close button-primary" value="Cancel" name="Cancel" />\
775
  </p>\
776
  <div class="tnext-bottom-lebel">'+tx_footer_include()+'</div>\
783
  // handles the click event of the submit button
784
  form_services.find('#button-submit').click(function(){
785
 
786
+ var services_style = table.find('#services-style').val();
787
  var services_title = table.find('#services-title').val();
788
  var services_icon = table.find('#services-icon').val();
789
  var services_content = table.find('#services-content').val();
790
 
791
+ var shortcode = '[tx_services style="'+services_style+'" title="'+services_title+'" icon="'+services_icon+'"]'+services_content+'[/tx_services]';
792
 
793
  // inserts the shortcode into the active editor
794
  tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
991
  jQuery.colorbox.close();
992
  });
993
 
994
+ });
995
+
996
+
997
+ /*
998
+ * image form
999
+ */
1000
+ jQuery(function(){
1001
+ var form_image = jQuery('<div id="image-form" class="tx-sh-form"><div id="tx-image-form"><table id="image-table" class="form-table">\
1002
+ <tr>\
1003
+ <td class="tx-heading" colspan="2"><h2>Insert Image</h2></td>\
1004
+ </tr>\
1005
+ <tr>\
1006
+ <th><label for="image-width">Image Width</label></th>\
1007
+ <td><input type="number" min="60" max="1200" name="width" id="image-width" value="600" /><br />\
1008
+ </tr>\
1009
+ <tr>\
1010
+ <th><label for="image-height">Image Height</label></th>\
1011
+ <td><input type="number" min="60" max="1200" name="height" id="image-height" value="600" /><br />\
1012
+ </tr>\
1013
+ <tr>\
1014
+ <th><label for="image-alt">Alternate Text</label></th>\
1015
+ <td><input type="text" name="alttext" id="image-alt" /><br />\
1016
+ </tr>\
1017
+ <tr>\
1018
+ <th><label for="image-url">Image URL</label></th>\
1019
+ <td><input type="text" name="url" id="image-url" /><br />\
1020
+ <input type="button" class="tx-button" name="tx-img-upload" id="tx-upload-button" value="Upload Image">\
1021
+ </tr>\
1022
+ </table>\
1023
+ <p class="submit">\
1024
+ <input type="button" id="image-submit" class="button-primary" value="Insert Image" name="submit" />\
1025
+ <input type="button" id="modal-close" class="modal-close button-primary" value="Cancel" name="Cancel" />\
1026
+ </p>\
1027
+ <div class="tnext-bottom-lebel">'+tx_footer_include()+'</div>\
1028
+ </div></div>');
1029
+
1030
+ var table = form_image.find('#image-table');
1031
+ form_image.appendTo('body').hide();
1032
+
1033
+ // handles the click event of the submit button
1034
+ form_image.find('#image-submit').click(function(){
1035
+
1036
+ var image_width = table.find('#image-width').val();
1037
+ var image_height = table.find('#image-height').val();
1038
+ var image_url = table.find('#image-url').val();
1039
+
1040
+ var shortcode = '[tx_image width="'+image_width+'" height="'+image_height+'" url="'+image_url+'"]<br/>';
1041
+
1042
+ // inserts the shortcode into the active editor
1043
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
1044
+
1045
+ // closes Thickbox
1046
+ jQuery.colorbox.close();
1047
+ });
1048
+
1049
+ var file_frame;
1050
+
1051
+ form_image.find('#tx-upload-button').click(function(event){
1052
+
1053
+ event.preventDefault();
1054
+
1055
+ // If the media frame already exists, reopen it.
1056
+ if ( file_frame ) {
1057
+ file_frame.open();
1058
+ return;
1059
+ }
1060
+
1061
+ // Create the media frame.
1062
+ file_frame = wp.media.frames.file_frame = wp.media({
1063
+ title: jQuery( this ).data( 'uploader_title' ),
1064
+ button: {
1065
+ text: jQuery( this ).data( 'uploader_button_text' ),
1066
+ },
1067
+ multiple: false // Set to true to allow multiple files to be selected
1068
+ });
1069
+
1070
+ // When an image is selected, run a callback.
1071
+ file_frame.on( 'select', function() {
1072
+ // We set multiple to false so only get one image from the uploader
1073
+ attachment = file_frame.state().get('selection').first().toJSON();
1074
+
1075
+ // Do something with attachment.id and/or attachment.url here
1076
+ table.find('#image-url').val(attachment.url);
1077
+
1078
+ });
1079
+
1080
+ // Finally, open the modal
1081
+ file_frame.open();
1082
+
1083
+
1084
+ });
1085
+
1086
+ form_image.find('#modal-close').click(function(){
1087
+ jQuery.colorbox.close();
1088
+ });
1089
+
1090
+ });
1091
 
1092
 
1093
 
1094
+ })();
1095
 
1096
 
1097
  jQuery(window).resize( function() {
tx-toolkit.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: TemplatesNext ToolKit
5
  Description: Custom Portfolio and Shortcode functionality for TemplatesNext Wordpress Themes
6
- Version: 1.1.0
7
  Author: TemplatesNext
8
  Author URI: http://templatesnext.org/
9
  License: GPLv2 or later
@@ -57,7 +57,7 @@ require_once('custom-post-types/multi-post-thumbnails.php'); /* Must be located
57
  // Define additional "post thumbnails". Relies on MultiPostThumbnails to work
58
  if (class_exists('MultiPostThumbnails')) {
59
 
60
- $types = array('page', 'portfolio' ); /* 'landing_pages' adds support for landing pages CPT, 'post' adds support for blog single pages */
61
  foreach($types as $type) {
62
  new MultiPostThumbnails(array('label' => '2nd Feature Image', 'id' => 'feature-image-2', 'post_type' => $type));
63
  new MultiPostThumbnails(array('label' => '3rd Feature Image', 'id' => 'feature-image-3', 'post_type' => $type));
@@ -77,6 +77,19 @@ require_once('custom-post-types/testimonials-type.php');
77
  require_once('custom-post-types/portfolio-type.php');
78
  require_once('custom-post-types/itrans-slider.php');
79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  /*-----------------------------------------------------------------------------------*/
81
  /* Metabox
82
  /*-----------------------------------------------------------------------------------*/
3
  /*
4
  Plugin Name: TemplatesNext ToolKit
5
  Description: Custom Portfolio and Shortcode functionality for TemplatesNext Wordpress Themes
6
+ Version: 1.1.1
7
  Author: TemplatesNext
8
  Author URI: http://templatesnext.org/
9
  License: GPLv2 or later
57
  // Define additional "post thumbnails". Relies on MultiPostThumbnails to work
58
  if (class_exists('MultiPostThumbnails')) {
59
 
60
+ $types = array('portfolio' ); /* 'landing_pages' adds support for landing pages CPT, 'post' adds support for blog single pages */
61
  foreach($types as $type) {
62
  new MultiPostThumbnails(array('label' => '2nd Feature Image', 'id' => 'feature-image-2', 'post_type' => $type));
63
  new MultiPostThumbnails(array('label' => '3rd Feature Image', 'id' => 'feature-image-3', 'post_type' => $type));
77
  require_once('custom-post-types/portfolio-type.php');
78
  require_once('custom-post-types/itrans-slider.php');
79
 
80
+
81
+ /*-----------------------------------------------------------------------------------*/
82
+ /* Loading Widgets */
83
+ /*-----------------------------------------------------------------------------------*/
84
+
85
+ require_once('inc/widgets/widget-posts.php');
86
+ //require_once('inc/widgets/widget-portfolio.php');
87
+ require_once('inc/widgets/widget-portfolio-grid.php');
88
+ require_once('inc/widgets/widget-advertgrid.php');
89
+ require_once('inc/widgets/widget-comments.php');
90
+ require_once('inc/widgets/widget-image.php');
91
+
92
+
93
  /*-----------------------------------------------------------------------------------*/
94
  /* Metabox
95
  /*-----------------------------------------------------------------------------------*/