TemplatesNext ToolKit - Version 2.0.0

Version Description

Download this release

Release Info

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

Code changes from version 1.1.9 to 2.0.0

css/tx-admin-style.css CHANGED
@@ -138,6 +138,7 @@ ul.tx-fa-icons > li.active {
138
  #tx-heading-form,
139
  #tx-slider-form,
140
  #tx-image-form,
 
141
  #tx-animation-form,
142
  #tx-fancyblock-form {
143
  padding: 12px 16px;
138
  #tx-heading-form,
139
  #tx-slider-form,
140
  #tx-image-form,
141
+ #tx-team-form,
142
  #tx-animation-form,
143
  #tx-fancyblock-form {
144
  padding: 12px 16px;
css/tx-style.css CHANGED
@@ -399,10 +399,6 @@
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;
@@ -443,9 +439,6 @@
443
  opacity: 1;
444
  }
445
 
446
-
447
-
448
-
449
  .tx-post-row a.moretag,
450
  .tx-post-row a.moretag:visited {
451
  display: block;
@@ -1462,6 +1455,127 @@ span.tx-animate {
1462
  display: inline-block;
1463
  }
1464
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1465
  @media (max-width: 999px) {
1466
  .folio-col-1 {
1467
  display: block;
399
  margin-bottom: 16px;
400
  }
401
 
 
 
 
 
402
  .folio-style-gallery.tx-post-row .tx-folio-title {
403
  position: absolute;
404
  left: 12px;
439
  opacity: 1;
440
  }
441
 
 
 
 
442
  .tx-post-row a.moretag,
443
  .tx-post-row a.moretag:visited {
444
  display: block;
1455
  display: inline-block;
1456
  }
1457
 
1458
+
1459
+ /* Divider
1460
+ ---------------------------------------------------------------*/
1461
+
1462
+ .tx-team.tx-4-column-team .tx-team-item .tx-team-box .tx-team-img img.team-image {}
1463
+ .tx-team.tx-4-column-team .tx-team-item .tx-team-box .tx-team-content .tx-team-content-inner .tx-team-socials span.tx-facebook > a > i.fa.fa-facebook {}
1464
+ .tx-team.tx-4-column-team .tx-team-item .tx-team-box .tx-team-content .tx-team-content-inner h3 {}
1465
+ .tx-team.tx-4-column-team .tx-team-item .tx-team-box .tx-team-content .tx-team-content-inner .desig {}
1466
+
1467
+
1468
+ .tx-team{}
1469
+
1470
+ .tx-team .tx-team-item {
1471
+ display: block;
1472
+ float: left;
1473
+ }
1474
+
1475
+ .tx-team.tx-2-column-team .tx-team-item {
1476
+ width: 50%;
1477
+ }
1478
+ .tx-team.tx-3-column-team .tx-team-item {
1479
+ width: 33.33%
1480
+ }
1481
+ .tx-team.tx-4-column-team .tx-team-item {
1482
+ width: 25%;
1483
+ }
1484
+
1485
+
1486
+ .tx-team {
1487
+ margin-left: -16px;
1488
+ margin-right: -16px;
1489
+ width: calc( 100% + 32px );
1490
+ }
1491
+
1492
+ .tx-team .tx-team-item .tx-team-box {
1493
+ display: block;
1494
+ position: relative;
1495
+ padding: 16px;
1496
+ }
1497
+
1498
+ .tx-team .tx-team-content {}
1499
+
1500
+ .tx-team .tx-team-content .tx-team-content-inner {
1501
+ display: block;
1502
+ position: relative;
1503
+ text-align: center;
1504
+ padding-bottom: 6px;
1505
+ }
1506
+
1507
+ .tx-team .tx-team-img {
1508
+ display: block;
1509
+ position: relative;
1510
+ text-align: center;
1511
+ overflow: hidden;
1512
+ }
1513
+
1514
+ .tx-team .tx-team-box .tx-team-img img {
1515
+ transition-property: all;
1516
+ transition-duration: 0.2s;
1517
+ transition-timing-function: ease-in-out;
1518
+ transition-delay: 0.0s;
1519
+ }
1520
+
1521
+ .tx-team .tx-team-box:hover .tx-team-img img {
1522
+ transform: scale(1.1, 1.1);
1523
+ }
1524
+
1525
+ .tx-team .tx-team-socials {
1526
+
1527
+ transition-property: all;
1528
+ transition-duration: 0.4s;
1529
+ transition-timing-function: ease-in-out;
1530
+ transition-delay: 0.2s;
1531
+
1532
+ display: block;
1533
+ position: absolute;
1534
+ left: 0px;
1535
+ bottom: 0px;
1536
+ margin-bottom: -58px;
1537
+ width: 100%;
1538
+ background-color: rgba(0,0,0,.6);
1539
+
1540
+ z-index: 101;
1541
+ }
1542
+
1543
+ .tx-team .tx-team-box:hover .tx-team-socials {
1544
+ margin-bottom: 0px;
1545
+ }
1546
+
1547
+ .tx-team .tx-team-socials span {
1548
+ color: #FFF;
1549
+ display: inline-block;
1550
+ margin: 12px 4px;
1551
+ }
1552
+
1553
+ .tx-team .tx-team-socials span > a > i {
1554
+ display: inline-table;
1555
+ color: #FFF;
1556
+ border: 1px solid #FFF;
1557
+ border-radius: 3px;
1558
+ width: 32px;
1559
+ height: 32px;
1560
+ line-height: 32px;
1561
+ font-size: 20px;
1562
+ }
1563
+
1564
+
1565
+ .tx-team .tx-team-content-inner h3 {
1566
+ font-size: 24px;
1567
+ font-weight: 500;
1568
+ margin: 6px auto 2px auto;
1569
+ padding: 0px;
1570
+ }
1571
+
1572
+ .tx-team .tx-team-content-inner .desig {
1573
+ font-size: 13px;
1574
+ font-weight: 300;
1575
+ color: #666;
1576
+ line-height: 16px;
1577
+ }
1578
+
1579
  @media (max-width: 999px) {
1580
  .folio-col-1 {
1581
  display: block;
custom-post-types/team-type.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /* ************************************************ */
4
+ /* Team Post Type Functions */
5
+ /* ************************************************ */
6
+
7
+
8
+ add_action('init', 'tx_team_register');
9
+
10
+ function tx_team_register() {
11
+
12
+ $labels = array(
13
+ 'name' => _x('Team', 'post type general name', "nx-admin"),
14
+ 'singular_name' => _x('Team Member', 'post type singular name', "nx-admin"),
15
+ 'add_new' => _x('Add New', 'team member', "nx-admin"),
16
+ 'add_new_item' => __('Add New Team Member', "nx-admin"),
17
+ 'edit_item' => __('Edit Team Member', "nx-admin"),
18
+ 'new_item' => __('New Team Member', "nx-admin"),
19
+ 'view_item' => __('View Team Member', "nx-admin"),
20
+ 'search_items' => __('Search Team Members', "nx-admin"),
21
+ 'not_found' => __('No team members have been added yet', "nx-admin"),
22
+ 'not_found_in_trash' => __('Nothing found in Trash', "nx-admin"),
23
+ 'parent_item_colon' => ''
24
+ );
25
+
26
+ $args = array(
27
+ 'labels' => $labels,
28
+ 'public' => true,
29
+ 'show_ui' => true,
30
+ 'show_in_menu' => true,
31
+ 'show_in_nav_menus' => false,
32
+ 'rewrite' => false,
33
+ 'supports' => array('title', 'editor', 'thumbnail'),
34
+ 'has_archive' => true,
35
+ 'menu_icon' => 'dashicons-groups',
36
+ 'taxonomies' => array('team-category')
37
+ );
38
+
39
+ register_post_type( 'team' , $args );
40
+
41
+ }
42
+
43
+ function tx_create_team_taxonomy() {
44
+
45
+ $atts = array(
46
+ "label" => _x('Team Categories', 'category label', "nx-admin"),
47
+ "singular_label" => _x('Team Category', 'category singular label', "nx-admin"),
48
+ 'public' => true,
49
+ 'hierarchical' => true,
50
+ 'show_ui' => true,
51
+ 'show_in_nav_menus' => false,
52
+ 'args' => array( 'orderby' => 'term_order' ),
53
+ 'rewrite' => false,
54
+ 'query_var' => true
55
+ );
56
+
57
+ register_taxonomy( 'team-category', 'team', $atts );
58
+
59
+ }
60
+ add_action( 'init', 'tx_create_team_taxonomy', 0 );
61
+
62
+
63
+ add_filter('manage_edit-team_columns', 'tx_team_edit_columns');
64
+
65
+ function tx_team_edit_columns($columns){
66
+ $columns = array(
67
+ "cb" => "<input type=\"checkbox\" />",
68
+ "thumbnail" => "",
69
+ "title" => __("Team Member", "nx-admin"),
70
+ "description" => __("Description", "nx-admin"),
71
+ "team-category" => __("Categories", "nx-admin")
72
+ );
73
+
74
+ return $columns;
75
+ }
76
+
77
+ // Replace title placeholder
78
+ function tx_change_title_text( $title ){
79
+ $screen = get_current_screen();
80
+
81
+ if ( 'team' == $screen->post_type ) {
82
+ $title = 'Enter Team Members Name';
83
+ }
84
+
85
+ return $title;
86
+ }
87
+
88
+ add_filter( 'enter_title_here', 'tx_change_title_text' );
inc/tx-meta.php CHANGED
@@ -288,7 +288,15 @@ function tx_register_meta_boxes( $meta_boxes )
288
  'type' => 'text',
289
  'std' => __( '', 'nx-admin' ),
290
  'desc' => __('Enter the team member\'s Skype user name.', 'nx-admin'),
291
- ),
 
 
 
 
 
 
 
 
292
 
293
  )
294
  );
288
  'type' => 'text',
289
  'std' => __( '', 'nx-admin' ),
290
  'desc' => __('Enter the team member\'s Skype user name.', 'nx-admin'),
291
+ ),
292
+ // Skype
293
+ array(
294
+ 'name' => __( 'Linkedin', 'nx-admin' ),
295
+ 'id' => "{$prefix}team_linkedin",
296
+ 'type' => 'text',
297
+ 'std' => __( '', 'nx-admin' ),
298
+ 'desc' => __('Enter the team member\'s Linkedin URL.', 'nx-admin'),
299
+ ),
300
 
301
  )
302
  );
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.5
7
- Stable tag: 1.1.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
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.5
7
+ Stable tag: 2.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
shortcodes.php CHANGED
@@ -698,6 +698,101 @@ function tx_slider_function($atts, $content = null) {
698
 
699
  endif;
700
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
701
  // Animate
702
  if ( !function_exists('tx_animate_function') ) :
703
 
@@ -813,6 +908,7 @@ function tx_register_shortcodes(){
813
  add_shortcode('tx_heading', 'tx_heading_function');
814
  add_shortcode('tx_slider', 'tx_slider_function');
815
 
 
816
  add_shortcode('tx_animate', 'tx_animate_function');
817
  add_shortcode('tx_fancyblock', 'tx_fancyblock_function');
818
  }
698
 
699
  endif;
700
 
701
+
702
+ // team shortcode
703
+ if ( !function_exists('tx_team_function') ) :
704
+
705
+ function tx_team_function($atts, $content = null) {
706
+
707
+ $atts = shortcode_atts(array(
708
+ 'items' => 4,
709
+ 'columns' => 4,
710
+ 'class' => '',
711
+ ), $atts);
712
+
713
+
714
+ $return_string = '';
715
+
716
+ $posts_per_page = intval( $atts['items'] );
717
+ $columns = intval( $atts['columns'] );
718
+ $tx_class = $atts['class'];
719
+
720
+
721
+ $return_string .= '<div class="tx-team tx-'.$columns.'-column-team">';
722
+
723
+ wp_reset_query();
724
+ global $post;
725
+
726
+ $args = array(
727
+ 'post_type' => 'team',
728
+ 'posts_per_page' => $posts_per_page,
729
+ 'orderby' => 'date',
730
+ 'order' => 'DESC',
731
+ 'ignore_sticky_posts' => 1,
732
+ );
733
+
734
+ $full_image_url = '';
735
+ $large_image_url = '';
736
+ $image_url = '';
737
+ $width = 400;
738
+ $height = 400;
739
+
740
+ query_posts( $args );
741
+
742
+ if ( have_posts() ) : while ( have_posts() ) : the_post();
743
+
744
+ $full_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' );
745
+ $image_url = tx_image_resize( $full_image_url[0], $width, $height, true, true );
746
+
747
+ $designation = esc_attr(rwmb_meta('tx_designation'));
748
+ $team_email = esc_attr(rwmb_meta('tx_team_email'));
749
+ $team_phone = esc_attr(rwmb_meta('tx_team_phone'));
750
+ $team_twitter = esc_url(rwmb_meta('tx_team_twitter'));
751
+ $team_facebook = esc_url(rwmb_meta('tx_team_facebook'));
752
+ $team_gplus = esc_url(rwmb_meta('tx_team_gplus'));
753
+ $team_skype = esc_attr(rwmb_meta('tx_team_skype'));
754
+ $team_linkedin = esc_url(rwmb_meta('tx_team_linkedin'));
755
+
756
+ $return_string .= '<div class="tx-team-item">';
757
+ $return_string .= '<div class="tx-team-box">';
758
+
759
+ if ( has_post_thumbnail() ) {
760
+ $return_string .= '<div class="tx-team-img">';
761
+ $return_string .= '<img src="'.esc_url($image_url["url"]).'" alt="" class="team-image" />';
762
+
763
+ /*
764
+ if($team_email) { $return_string .= '<span class="tx-temail">'.$team_email.'</span>'; }
765
+ if($team_phone) { $return_string .= '<span class="tx-phone">'.$team_phone.'</span>'; }
766
+ */
767
+ $return_string .= '<div class="tx-team-socials">';
768
+ if($team_twitter) { $return_string .= '<span class="tx-twitter"><a href="'.$team_twitter.'"><i class="fa fa-twitter"></i></a></span>'; }
769
+ if($team_facebook) { $return_string .= '<span class="tx-facebook"><a href="'.$team_facebook.'"><i class="fa fa-facebook"></i></a></span>'; }
770
+ if($team_gplus) { $return_string .= '<span class="tx-gplus"><a href="'.$team_gplus.'"><i class="fa fa-google-plus"></i></a></span>'; }
771
+ if($team_skype) { $return_string .= '<span class="tx-skype"><a href="skype:'.$team_skype.'"><i class="fa fa-skype"></i></a></span>'; }
772
+ if($team_linkedin) { $return_string .= '<span class="tx-linkedin"><a href="'.$team_linkedin.'"><i class="fa fa-linkedin"></i></a></span>'; }
773
+ $return_string .= '</div>';
774
+
775
+ $return_string .= '</div>';
776
+ }
777
+ /**/
778
+ $return_string .= '<div class="tx-team-content"><div class="tx-team-content-inner" style="">';
779
+ $return_string .= '<h3 class="">'.get_the_title().'</h3>';
780
+ $return_string .= '<div class="desig">'.$designation.'</div>';
781
+ $return_string .= '</div></div></div></div>';
782
+
783
+
784
+ endwhile; else :
785
+ $return_string .= '<p>Sorry, no slider matched your criteria.</p>';
786
+ endif;
787
+
788
+ $return_string .= '</div>';
789
+
790
+ wp_reset_query();
791
+ return $return_string;
792
+ }
793
+
794
+ endif;
795
+
796
  // Animate
797
  if ( !function_exists('tx_animate_function') ) :
798
 
908
  add_shortcode('tx_heading', 'tx_heading_function');
909
  add_shortcode('tx_slider', 'tx_slider_function');
910
 
911
+ add_shortcode('tx_team', 'tx_team_function');
912
  add_shortcode('tx_animate', 'tx_animate_function');
913
  add_shortcode('tx_fancyblock', 'tx_fancyblock_function');
914
  }
tx-shortcodes.js CHANGED
@@ -47,6 +47,9 @@
47
  <tr>\
48
  <td class="shortcode-list"><span id="animation">Animate</span></td><td class="shortcode-list"><span id="fancyblock">Fancy Block</span></td>\
49
  </tr>\
 
 
 
50
  </table>\
51
  <div class="nx-sh-cancel">\
52
  <input type="button" class="modal-close button-primary" value="Cancel" name="Cancel" />\
@@ -165,7 +168,14 @@
165
  setTimeout(function() {
166
  jQuery.colorbox({inline:true, href:"#tx-image-form"});
167
  }, 500);
168
- });
 
 
 
 
 
 
 
169
 
170
  form_tx.find('.modal-close').click(function(){
171
  jQuery.colorbox.close();
@@ -1333,6 +1343,60 @@
1333
  });
1334
 
1335
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1336
  /*
1337
  * image form
1338
  */
@@ -1426,7 +1490,7 @@
1426
  jQuery.colorbox.close();
1427
  });
1428
 
1429
- });
1430
 
1431
 
1432
 
47
  <tr>\
48
  <td class="shortcode-list"><span id="animation">Animate</span></td><td class="shortcode-list"><span id="fancyblock">Fancy Block</span></td>\
49
  </tr>\
50
+ <tr>\
51
+ <td class="shortcode-list"><span id="txteam">Team</span></td><td class="shortcode-list"><span id=""></span></td>\
52
+ </tr>\
53
  </table>\
54
  <div class="nx-sh-cancel">\
55
  <input type="button" class="modal-close button-primary" value="Cancel" name="Cancel" />\
168
  setTimeout(function() {
169
  jQuery.colorbox({inline:true, href:"#tx-image-form"});
170
  }, 500);
171
+ });
172
+
173
+ //Insert team
174
+ form_tx.find('#txteam').click(function(){
175
+ setTimeout(function() {
176
+ jQuery.colorbox({inline:true, href:"#tx-team-form"});
177
+ }, 500);
178
+ });
179
 
180
  form_tx.find('.modal-close').click(function(){
181
  jQuery.colorbox.close();
1343
  });
1344
 
1345
 
1346
+ /*
1347
+ * team form
1348
+ */
1349
+ jQuery(function(){
1350
+ var form_team = jQuery('<div id="team-form" class="tx-sh-form"><div id="tx-team-form"><table id="team-table" class="form-table">\
1351
+ <tr>\
1352
+ <td class="tx-heading" colspan="2"><h2>Insert Team</h2></td>\
1353
+ </tr>\
1354
+ <tr>\
1355
+ <th><label for="team-columns">Number of Columns</label></th>\
1356
+ <td><select name="columns" id="team-columns">\
1357
+ <option value=2>2</option>\
1358
+ <option value=3>3</option>\
1359
+ <option value=4 selected="selected">4</option>\
1360
+ </select><br />\
1361
+ <small>Number of columns</small></td>\
1362
+ </tr>\
1363
+ <tr>\
1364
+ <th><label for="team-items">Number of Item</label></th>\
1365
+ <td><input type="number" min="2" max="20" name="items" id="team-items" value="4" /><br />\
1366
+ </tr>\
1367
+ </table>\
1368
+ <p class="submit">\
1369
+ <input type="button" id="team-submit" class="button-primary" value="Insert Team" name="submit" />\
1370
+ <input type="button" id="modal-close" class="modal-close button-primary" value="Cancel" name="Cancel" />\
1371
+ </p>\
1372
+ <div class="tnext-bottom-lebel">'+tx_footer_include()+'</div>\
1373
+ </div></div>');
1374
+
1375
+ var table = form_team.find('#team-table');
1376
+ form_team.appendTo('body').hide();
1377
+
1378
+ // handles the click event of the submit button
1379
+ form_team.find('#team-submit').click(function(){
1380
+
1381
+ var team_columns = table.find('#team-columns').val();
1382
+ var team_items = table.find('#team-items').val();
1383
+
1384
+ var shortcode = '[tx_team columns="'+team_columns+'" items="'+team_items+'"]<br/>';
1385
+
1386
+ // inserts the shortcode into the active editor
1387
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
1388
+
1389
+ // closes Thickbox
1390
+ jQuery.colorbox.close();
1391
+ });
1392
+
1393
+ form_image.find('#modal-close').click(function(){
1394
+ jQuery.colorbox.close();
1395
+ });
1396
+
1397
+ });
1398
+
1399
+
1400
  /*
1401
  * image form
1402
  */
1490
  jQuery.colorbox.close();
1491
  });
1492
 
1493
+ });
1494
 
1495
 
1496
 
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.9
7
  Author: TemplatesNext
8
  Author URI: http://templatesnext.org/
9
  License: GPLv2 or later
@@ -78,6 +78,7 @@ require_once('shortcodes.php');
78
  require_once('custom-post-types/testimonials-type.php');
79
  require_once('custom-post-types/portfolio-type.php');
80
  require_once('custom-post-types/itrans-slider.php');
 
81
  require_once('inc/aq_resizer.php');
82
 
83
 
3
  /*
4
  Plugin Name: TemplatesNext ToolKit
5
  Description: Custom Portfolio and Shortcode functionality for TemplatesNext Wordpress Themes
6
+ Version: 2.0.0
7
  Author: TemplatesNext
8
  Author URI: http://templatesnext.org/
9
  License: GPLv2 or later
78
  require_once('custom-post-types/testimonials-type.php');
79
  require_once('custom-post-types/portfolio-type.php');
80
  require_once('custom-post-types/itrans-slider.php');
81
+ require_once('custom-post-types/team-type.php');
82
  require_once('inc/aq_resizer.php');
83
 
84