TemplatesNext ToolKit - Version 1.1.4

Version Description

  • Support for portfolio category filter
  • Deprecated constructor method for WP_Widget replaced
Download this release

Release Info

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

Code changes from version 1.1.3 to 1.1.4

inc/widgets/widget-advertgrid.php CHANGED
@@ -20,9 +20,12 @@
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) {
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
  $widget_ops = array( 'classname' => 'widget-advert-grid', 'description' => 'Styled advert grid of up to eight 125x125 adverts' );
28
+ parent::__construct( 'widget-advert-grid', 'NX Advert Grid Widget', $widget_ops );
 
29
  }
30
 
31
  function form($instance) {
inc/widgets/widget-comments.php CHANGED
@@ -23,7 +23,10 @@
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 ) {
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
+ $widget_ops = array( 'classname' => 'nx-widget-recent-comments', 'description' => 'NX Widget for Recent Comments' );
29
+ parent::__construct( 'nx-widget-recent-comments', 'NX Recent Comments', $widget_ops );
30
  }
31
 
32
  function widget( $args, $instance ) {
inc/widgets/widget-image.php CHANGED
@@ -20,9 +20,13 @@
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) {
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
  $widget_ops = array( 'classname' => 'widget-nx-image', 'description' => 'Simple image widget' );
29
+ parent::__construct( 'widget-nx-image', 'NX Image Widget', $widget_ops );
 
30
  }
31
 
32
  function form($instance) {
inc/widgets/widget-portfolio-grid.php CHANGED
@@ -22,7 +22,10 @@
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 ) {
@@ -59,12 +62,12 @@
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 } ?>
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
+ $widget_ops = array( 'classname' => 'nx-widget-portfolio-grid', 'description' => 'NX Widget for Portofolio in grid format' );
28
+ parent::__construct( 'nx-widget-portfolio-grid', 'NX Portfolio Grid', $widget_ops );
29
  }
30
 
31
  function widget( $args, $instance ) {
62
 
63
  $thumb_image = get_post_thumbnail_id();
64
  $thumb_img_url = wp_get_attachment_url( $thumb_image, 'small' );
65
+ $image = aq_resize( $thumb_img_url, 96, 96, true, false);
66
  ?>
67
  <?php if ($image) { ?>
68
  <li class="grid-item-<?php echo $count; ?>">
69
  <a href="<?php echo $post_permalink; ?>" class="grid-image tooltip2" title="<?php echo $post_title; ?>">
70
+ <img src="<?php echo $image['0']; ?>" width="<?php echo $image[1]; ?>" alt="<?php echo $post_title; ?>" />
71
  </a>
72
  </li>
73
  <?php } ?>
inc/widgets/widget-portfolio.php CHANGED
@@ -21,7 +21,10 @@
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 ) {
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
+ $widget_ops = array( 'classname' => 'nx-recent-custom-portfolio', 'description' => 'NX Widget for Portofolio in list format' );
27
+ $this->WP_Widget( 'nx-custom-portfolio-grid', 'NX Portfolio List', $widget_ops, $control_ops );
28
  }
29
 
30
  function widget( $args, $instance ) {
inc/widgets/widget-posts.php CHANGED
@@ -22,7 +22,10 @@
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 ) {
@@ -72,7 +75,7 @@
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";
@@ -82,12 +85,11 @@
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>
22
 
23
  class nx_recent_posts extends WP_Widget {
24
  function nx_recent_posts() {
25
+ //parent::WP_Widget( 'nx_recent_posts', $name = 'NX Recent Posts', array( 'description' => __( 'NX Widget for Recent Posts', 'tx' ) ) );
26
+
27
+ $widget_ops = array( 'classname' => 'nx-widget-recent-posts', 'description' => 'NX Widget for Recent Posts' );
28
+ parent::__construct( 'nx-widget-recent-posts', 'NX Recent Posts', $widget_ops );
29
  }
30
 
31
  function widget( $args, $instance ) {
75
 
76
  $thumb_image = get_post_thumbnail_id();
77
  $thumb_img_url = wp_get_attachment_url( $thumb_image, 'small' );
78
+ $image = aq_resize( $thumb_img_url, 96, 96, true, false);
79
 
80
  if ($image) {
81
  $thumb_stat = "thumbyes";
85
  }
86
  ?>
87
  <li class="clearfix nx-recent-post">
88
+ <?php if ($thumb_img_url) { ?>
89
  <a href="<?php echo $post_permalink; ?>" class="recent-post-image">
90
+ <img src="<?php echo $image['0']; ?>" alt=" " />
 
 
91
  </a>
92
+ <?php } ?>
93
  <div class="recent-post-details <?php echo $thumb_stat; ?>">
94
  <a class="recent-post-title" href="<?php echo $post_permalink; ?>" title="<?php echo $post_title; ?>"><?php echo $post_title; ?></a>
95
  <span class="post-meta"><?php printf(__('By %1$s on %2$s', 'tx'), $post_author, $post_date); ?></span>
readme.txt CHANGED
@@ -3,8 +3,8 @@
3
  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.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -25,6 +25,10 @@ Install the plugin into the `/wp-content/plugins/` folder, and activate it.
25
 
26
  == Changelog ==
27
 
 
 
 
 
28
  = 1.1.3 =
29
  * itrans slider button fix
30
  * maximum slides in a slider increased to 10
3
  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.3
7
+ Stable tag: 1.1.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
25
 
26
  == Changelog ==
27
 
28
+ = 1.1.4 =
29
+ * Support for portfolio category filter
30
+ * Deprecated constructor method for WP_Widget replaced
31
+
32
  = 1.1.3 =
33
  * itrans slider button fix
34
  * maximum slides in a slider increased to 10
shortcodes.php CHANGED
@@ -385,6 +385,7 @@ function tx_portfolio_function($atts, $content = null) {
385
  'hide_excerpt' => 'no',
386
  'show_pagination' => 'no',
387
  'carousel' => 'no',
 
388
  ), $atts);
389
 
390
 
@@ -410,7 +411,13 @@ function tx_portfolio_function($atts, $content = null) {
410
  {
411
  $return_string .= '<div class="tx-portfolio tx-post-row tx-carousel" data-columns="'.$total_column.'">';
412
  }
413
-
 
 
 
 
 
 
414
 
415
  wp_reset_query();
416
  global $post;
@@ -419,7 +426,8 @@ function tx_portfolio_function($atts, $content = null) {
419
  'posts_per_page' => $posts_per_page,
420
  'post_type' => 'portfolio',
421
  'orderby' => 'date',
422
- 'order' => 'DESC'
 
423
  );
424
 
425
  if ($atts['show_pagination'] == 'yes' && $atts['carousel'] == 'no' )
385
  'hide_excerpt' => 'no',
386
  'show_pagination' => 'no',
387
  'carousel' => 'no',
388
+ 'blog_term' => '',
389
  ), $atts);
390
 
391
 
411
  {
412
  $return_string .= '<div class="tx-portfolio tx-post-row tx-carousel" data-columns="'.$total_column.'">';
413
  }
414
+
415
+ $cat_slug = '';
416
+
417
+ if( !empty($atts['blog_term']) )
418
+ {
419
+ $cat_slug = $atts['blog_term'];
420
+ }
421
 
422
  wp_reset_query();
423
  global $post;
426
  'posts_per_page' => $posts_per_page,
427
  'post_type' => 'portfolio',
428
  'orderby' => 'date',
429
+ 'order' => 'DESC',
430
+ 'portfolio-category' => $cat_slug, //use post ids
431
  );
432
 
433
  if ($atts['show_pagination'] == 'yes' && $atts['carousel'] == 'no' )
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.3
7
  Author: TemplatesNext
8
  Author URI: http://templatesnext.org/
9
  License: GPLv2 or later
@@ -83,13 +83,14 @@ require_once('inc/aq_resizer.php');
83
  /* Loading Widgets */
84
  /*-----------------------------------------------------------------------------------*/
85
 
 
86
  require_once('inc/widgets/widget-posts.php');
87
  //require_once('inc/widgets/widget-portfolio.php');
88
  require_once('inc/widgets/widget-portfolio-grid.php');
89
  require_once('inc/widgets/widget-advertgrid.php');
90
  require_once('inc/widgets/widget-comments.php');
91
  require_once('inc/widgets/widget-image.php');
92
-
93
 
94
  /*-----------------------------------------------------------------------------------*/
95
  /* Metabox
3
  /*
4
  Plugin Name: TemplatesNext ToolKit
5
  Description: Custom Portfolio and Shortcode functionality for TemplatesNext Wordpress Themes
6
+ Version: 1.1.4
7
  Author: TemplatesNext
8
  Author URI: http://templatesnext.org/
9
  License: GPLv2 or later
83
  /* Loading Widgets */
84
  /*-----------------------------------------------------------------------------------*/
85
 
86
+
87
  require_once('inc/widgets/widget-posts.php');
88
  //require_once('inc/widgets/widget-portfolio.php');
89
  require_once('inc/widgets/widget-portfolio-grid.php');
90
  require_once('inc/widgets/widget-advertgrid.php');
91
  require_once('inc/widgets/widget-comments.php');
92
  require_once('inc/widgets/widget-image.php');
93
+ /**/
94
 
95
  /*-----------------------------------------------------------------------------------*/
96
  /* Metabox