Premium Portfolio Features for Phlox theme - Version 1.7.5

Version Description

Download this release

Release Info

Developer averta
Plugin Icon 128x128 Premium Portfolio Features for Phlox theme
Version 1.7.5
Comparing to
See all releases

Code changes from version 1.7.4 to 1.7.5

README.txt CHANGED
@@ -7,7 +7,7 @@ Tags: phlox, gallery, elementor, siteorigin, portfolio, averta, auxin, fullwidth
7
  Requires PHP: 5.4
8
  Requires at least: 4.6
9
  Tested up to: 4.9.8
10
- Stable tag: 1.7.4
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl.html
13
 
@@ -136,6 +136,10 @@ Bugs can be reported in our [support forums](http://support.averta.net/en/item/p
136
 
137
  == Changelog ==
138
 
 
 
 
 
139
  = Version 1.7.4 / (16.09.2018) =
140
  - [Fix]: Minor bugs fixed.
141
 
@@ -228,5 +232,6 @@ Bugs can be reported in our [support forums](http://support.averta.net/en/item/p
228
 
229
  == Upgrade Notice ==
230
 
231
- = 1.6.9 =
 
232
  - [Fix]: Minor bugs fixed.
7
  Requires PHP: 5.4
8
  Requires at least: 4.6
9
  Tested up to: 4.9.8
10
+ Stable tag: 1.7.5
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl.html
13
 
136
 
137
  == Changelog ==
138
 
139
+ = Version 1.7.5 / (14.11.2018) =
140
+ - [Fix]: Introducing new portfolio element and new filter options.
141
+ - [Fix]: Minor bugs fixed.
142
+
143
  = Version 1.7.4 / (16.09.2018) =
144
  - [Fix]: Minor bugs fixed.
145
 
232
 
233
  == Upgrade Notice ==
234
 
235
+ = 1.7.5 =
236
+ - [Fix]: Introducing new portfolio element and new filter options.
237
  - [Fix]: Minor bugs fixed.
admin/includes/admin-ajax.php CHANGED
@@ -17,13 +17,14 @@ function auxin_recent_portfolios_ajax_handler() {
17
  }
18
 
19
  $args = $_POST['args'];
20
- $args['terms'] = 'all' === $_POST['term'] ? '' : $_POST['term'];
 
21
  $args['skip_wrappers'] = true;
22
 
23
  include auxin_get_template_file( $args['template_part_file'], '', $args['extra_template_path'] );
24
 
25
- echo auxin_recent_portfolio( $args );
26
-
27
  exit();
28
 
29
  }
17
  }
18
 
19
  $args = $_POST['args'];
20
+
21
+ $args['term'] = 'all' === $_POST['term'] ? $args['term']: $_POST['term'];
22
  $args['skip_wrappers'] = true;
23
 
24
  include auxin_get_template_file( $args['template_part_file'], '', $args['extra_template_path'] );
25
 
26
+ $output = auxin_widget_recent_portfolios_grid_callback( $args );
27
+ wp_send_json_success( $output );
28
  exit();
29
 
30
  }
auxin-portfolio.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Phlox Portfolio
13
  * Plugin URI: http://phlox.pro/
14
  * Description: Showcase your projects beautifully in Phlox theme
15
- * Version: 1.7.4
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * License: GPL2
@@ -51,7 +51,7 @@ if( is_admin() || false === get_transient( 'auxpfo_plugin_requirements_check' )
51
  'name' => __('Phlox Core Elements', 'auxin-portfolio'), // The plugin name.
52
  'basename' => 'auxin-elements/auxin-elements.php', // The plugin basename (typically the folder name and main php file)
53
  'required' => true, // If true, the user will be notified with a notice to install the plugin.
54
- 'version' => '2.2.16', // E.g. 1.0.0. If set, the active plugin must be this version or higher.
55
  'dependency' => true, // If true, and the plugin is activated, the plugin will be loaded before as a dependeny.
56
  'is_callable' => 'AUXELS' // If set, this callable will be be checked for availability to determine if a plugin is active.
57
  )
@@ -61,7 +61,7 @@ if( is_admin() || false === get_transient( 'auxpfo_plugin_requirements_check' )
61
  array(
62
  'name' => __('Phlox Pro', 'auxin-portfolio'), // The theme name.
63
  'id' => 'phlox-pro', // The theme id name.
64
- 'version' => '5.0.5', // E.g. 1.0.0. If set, the active theme must be this version or higher.
65
  'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active.
66
  'theme_requires_const' => 'AUXPFO_REQUIRED_VERSION',
67
  'file_required' => array( get_template_directory() . '/auxin-content/init/dependency.php', get_template_directory() . '/auxin-content/init/constant.php' )
@@ -70,7 +70,7 @@ if( is_admin() || false === get_transient( 'auxpfo_plugin_requirements_check' )
70
  'name' => __('Phlox', 'auxin-portfolio'), // The theme name.
71
  'id' => 'phlox', // The theme id name.
72
  'update_link' => 'themes.php?theme=phlox',
73
- 'version' => '2.2.16', // E.g. 1.0.0. If set, the active theme must be this version or higher.
74
  'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active.
75
  'theme_requires_const' => 'AUXPFO_REQUIRED_VERSION',
76
  'file_required' => array( get_template_directory() . '/auxin-content/init/dependency.php', get_template_directory() . '/auxin-content/init/constant.php' )
12
  * Plugin Name: Phlox Portfolio
13
  * Plugin URI: http://phlox.pro/
14
  * Description: Showcase your projects beautifully in Phlox theme
15
+ * Version: 1.7.5
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * License: GPL2
51
  'name' => __('Phlox Core Elements', 'auxin-portfolio'), // The plugin name.
52
  'basename' => 'auxin-elements/auxin-elements.php', // The plugin basename (typically the folder name and main php file)
53
  'required' => true, // If true, the user will be notified with a notice to install the plugin.
54
+ 'version' => '2.3.0', // E.g. 1.0.0. If set, the active plugin must be this version or higher.
55
  'dependency' => true, // If true, and the plugin is activated, the plugin will be loaded before as a dependeny.
56
  'is_callable' => 'AUXELS' // If set, this callable will be be checked for availability to determine if a plugin is active.
57
  )
61
  array(
62
  'name' => __('Phlox Pro', 'auxin-portfolio'), // The theme name.
63
  'id' => 'phlox-pro', // The theme id name.
64
+ 'version' => '5.1.0', // E.g. 1.0.0. If set, the active theme must be this version or higher.
65
  'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active.
66
  'theme_requires_const' => 'AUXPFO_REQUIRED_VERSION',
67
  'file_required' => array( get_template_directory() . '/auxin-content/init/dependency.php', get_template_directory() . '/auxin-content/init/constant.php' )
70
  'name' => __('Phlox', 'auxin-portfolio'), // The theme name.
71
  'id' => 'phlox', // The theme id name.
72
  'update_link' => 'themes.php?theme=phlox',
73
+ 'version' => '2.3.0', // E.g. 1.0.0. If set, the active theme must be this version or higher.
74
  'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active.
75
  'theme_requires_const' => 'AUXPFO_REQUIRED_VERSION',
76
  'file_required' => array( get_template_directory() . '/auxin-content/init/dependency.php', get_template_directory() . '/auxin-content/init/constant.php' )
includes/classes/class-auxpfo-post-type-portfolio.php CHANGED
@@ -118,6 +118,7 @@ class Auxpfo_Post_Type_Portfolio extends Auxin_Post_Type_Base {
118
  apply_filters( "auxin_taxonomy_post_types_for_{$tax_cat_name}" , array( $this->post_type ) ),
119
  apply_filters( "auxin_taxonomy_args_{$tax_cat_name}" , array(
120
  'hierarchical' => true,
 
121
  'label' => __( 'Portfolio Categories', 'auxin-portfolio' ),
122
  'labels' => $cat_labels,
123
  'show_ui' => true,
118
  apply_filters( "auxin_taxonomy_post_types_for_{$tax_cat_name}" , array( $this->post_type ) ),
119
  apply_filters( "auxin_taxonomy_args_{$tax_cat_name}" , array(
120
  'hierarchical' => true,
121
+ 'tax_position' => true,
122
  'label' => __( 'Portfolio Categories', 'auxin-portfolio' ),
123
  'labels' => $cat_labels,
124
  'show_ui' => true,
includes/define.php CHANGED
@@ -15,7 +15,7 @@ if( ! defined( 'THEME_NAME' ) ){
15
 
16
 
17
 
18
- define( 'AUXPFO_VERSION' , '1.7.4' );
19
 
20
  define( 'AUXPFO_SLUG' , 'auxin-portfolio' );
21
 
15
 
16
 
17
 
18
+ define( 'AUXPFO_VERSION' , '1.7.5' );
19
 
20
  define( 'AUXPFO_SLUG' , 'auxin-portfolio' );
21
 
includes/elements/recent-portfolios-grid-carousel.php CHANGED
@@ -71,7 +71,7 @@ function auxin_widget_recent_portfolios_grid_carousel_callback( $atts, $shortcod
71
  $exclude_without_media = auxin_is_true( $exclude_without_media );
72
  $display_like = auxin_is_true( $display_like );
73
  $deeplink = auxin_is_true( $deeplink );
74
- $show_title = auxin_is_true( $show_title );
75
  $show_info = auxin_is_true( $show_info );
76
 
77
  ob_start();
71
  $exclude_without_media = auxin_is_true( $exclude_without_media );
72
  $display_like = auxin_is_true( $display_like );
73
  $deeplink = auxin_is_true( $deeplink );
74
+ $display_title = auxin_is_true( $show_title );
75
  $show_info = auxin_is_true( $show_info );
76
 
77
  ob_start();
includes/elements/recent-portfolios.php CHANGED
@@ -885,11 +885,11 @@ function auxin_widget_recent_portfolios_grid_callback( $atts, $shortcode_content
885
  'extra_classes' => '',
886
  'extra_column_classes' => '',
887
  'custom_el_id' => '',
888
- 'template_part_file' => 'recent-portfolio',
889
- 'extra_template_path' => AUXPFO_PUB_DIR . '/templates/elements',
890
  'universal_id' => '',
891
  'query_args' => array(),
892
- 'terms' => ' ',
893
  'reset_query' => true,
894
  'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
895
  'wp_query_args' => array(), // additional wp_query args
@@ -905,26 +905,34 @@ function auxin_widget_recent_portfolios_grid_callback( $atts, $shortcode_content
905
  extract( $result['parsed_atts'] );
906
 
907
  ob_start();
908
-
909
  // widget header ------------------------------
910
  echo $result['widget_header'];
911
  echo $result['widget_title'];
912
 
913
- if ( auxin_is_true($show_filters) && ! $skip_wrappers ) {
914
-
915
- // Filter Markup
916
- auxin_filter_output( array(
917
- 'taxonomy' => $filter_by,
918
- 'meta_query' => array(
919
- 'relation' => 'OR',
920
- array(
921
- 'meta_key' => 'tax_position',
922
- )
923
- ),
924
- 'orderby' => 'tax_position',
925
- 'hide_empty' => true,
926
- 'include' => $cat,
927
- ), $filter_style, $filter_align, 'aux-ajax-filters' );
 
 
 
 
 
 
 
 
928
 
929
  }
930
 
885
  'extra_classes' => '',
886
  'extra_column_classes' => '',
887
  'custom_el_id' => '',
888
+ 'template_part_file' => 'recent-portfolio',
889
+ 'extra_template_path' => AUXPFO_PUB_DIR . '/templates/elements',
890
  'universal_id' => '',
891
  'query_args' => array(),
892
+ 'term' => '',
893
  'reset_query' => true,
894
  'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
895
  'wp_query_args' => array(), // additional wp_query args
905
  extract( $result['parsed_atts'] );
906
 
907
  ob_start();
908
+
909
  // widget header ------------------------------
910
  echo $result['widget_header'];
911
  echo $result['widget_title'];
912
 
913
+ $filter_args = array(
914
+ 'taxonomy' => $filter_by,
915
+ 'meta_query' => array(
916
+ 'relation' => 'OR',
917
+ array(
918
+ 'meta_key' => 'tax_position'
919
+ )
920
+ ),
921
+ 'orderby' => 'tax_position',
922
+ 'hide_empty' => true,
923
+ );
924
+
925
+ $filter_args['include'] = 'portfolio-cat' === $filter_by ? $cat : '';
926
+
927
+ if ( function_exists('auxin_filter_output') && auxin_is_true ( $show_filters ) && ! $skip_wrappers ) {
928
+
929
+ // Filter Markup
930
+ auxin_filter_output(
931
+ $filter_args,
932
+ $filter_style,
933
+ $filter_align,
934
+ 'aux-ajax-filters'
935
+ );
936
 
937
  }
938
 
includes/general-hooks.php CHANGED
@@ -3006,7 +3006,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php' ) ) {
3006
 
3007
  function auxpfo_respond_for_liked_data( $value, $id ) {
3008
 
3009
- if( get_post_type( $id ) === 'portfolio' ){
3010
  return __( 'Likes', 'auxin-portfolio' ) . ' (' . $value . ')' ;
3011
  } else {
3012
  return $value;
3006
 
3007
  function auxpfo_respond_for_liked_data( $value, $id ) {
3008
 
3009
+ if( get_post_type( $id ) === 'portfolio' & is_single() ){
3010
  return __( 'Likes', 'auxin-portfolio' ) . ' (' . $value . ')' ;
3011
  } else {
3012
  return $value;
public/assets/js/portfolio.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Auxin portfolio - v1.7.2 (2018-09-16)
2
  * All required plugins
3
  * http://averta.net/phlox/
4
  */
@@ -18,7 +18,7 @@
18
  e.preventDefault();
19
  var $this = $(this),
20
  $container = $this.parents('.aux-widget-recent-portfolios').find('.aux-ajax-view'),
21
- $ajaxSpinner = $this.parents('.aux-widget-recent-portfolios').find('.aux-items-loading');
22
  data = {
23
  action : 'aux_recent_portfolio_filter_content',
24
  term : $this.data('filter'),
@@ -29,22 +29,39 @@
29
  n : $container.data('n'),
30
  args : eval($container.data('element-id') + 'AjaxConfig')
31
  };
 
 
32
 
33
  $.post( auxpfo.ajax_url, data, function(res){
34
 
35
  if ( res ) {
36
 
 
 
 
 
37
  setTimeout(function() {
38
- $container.AuxIsotope( 'removeAll' );
39
- $newItems = $(res);
40
 
41
- $newItems.each( function( index, element ) {
42
  $item = $(element);
43
- $container.AuxIsotope( 'insert', $item );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  });
45
 
46
- $container.find('.aux-hover-twoway').AuxTwoWayHover();
47
-
48
  }, 1000);
49
  }
50
 
1
+ /*! Auxin portfolio - v1.7.5 (2018-11-19)
2
  * All required plugins
3
  * http://averta.net/phlox/
4
  */
18
  e.preventDefault();
19
  var $this = $(this),
20
  $container = $this.parents('.aux-widget-recent-portfolios').find('.aux-ajax-view'),
21
+
22
  data = {
23
  action : 'aux_recent_portfolio_filter_content',
24
  term : $this.data('filter'),
29
  n : $container.data('n'),
30
  args : eval($container.data('element-id') + 'AjaxConfig')
31
  };
32
+
33
+ $container.AuxIsotope( 'showLoading' );
34
 
35
  $.post( auxpfo.ajax_url, data, function(res){
36
 
37
  if ( res ) {
38
 
39
+ var $data = $(res.data)
40
+
41
+ $container.AuxIsotope( 'removeAll' );
42
+
43
  setTimeout(function() {
 
 
44
 
45
+ $data.each( function( index, element ) {
46
  $item = $(element);
47
+
48
+ if ( $item.hasClass('aux-iso-item') ) {
49
+
50
+ $container.AuxIsotope( 'insert', $item );
51
+
52
+ $item.AuxTwoWayHover();
53
+
54
+ $item.photoSwipe({
55
+ target: '.aux-lightbox-btn',
56
+ bgOpacity: 0.97,
57
+ shareEl: true
58
+ }
59
+ );
60
+
61
+ }
62
+
63
  });
64
 
 
 
65
  }, 1000);
66
  }
67
 
public/assets/js/portfolio.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Auxin portfolio - v1.7.2 (2018-09-16)
2
  * All required plugins
3
  * http://averta.net/phlox/
4
  */
@@ -6,4 +6,4 @@
6
  *
7
  * ================== public/assets/js/src/init.general.js ===================
8
  **/
9
- !function($){var filterList=$(".aux-widget-recent-portfolios .aux-ajax-filters li[data-filter]");filterList.on("click",function(e){e.preventDefault();var $this=$(this),$container=$this.parents(".aux-widget-recent-portfolios").find(".aux-ajax-view"),$ajaxSpinner=$this.parents(".aux-widget-recent-portfolios").find(".aux-items-loading");data={action:"aux_recent_portfolio_filter_content",term:$this.data("filter"),taxonomy:$container.data("taxonomy"),num:$container.data("num"),order:$container.data("order"),orderby:$container.data("orderby"),n:$container.data("n"),args:eval($container.data("element-id")+"AjaxConfig")},$.post(auxpfo.ajax_url,data,function(res){res&&setTimeout(function(){$container.AuxIsotope("removeAll"),$newItems=$(res),$newItems.each(function(index,element){$item=$(element),$container.AuxIsotope("insert",$item)}),$container.find(".aux-hover-twoway").AuxTwoWayHover()},1e3)})})}(jQuery);
1
+ /*! Auxin portfolio - v1.7.5 (2018-11-19)
2
  * All required plugins
3
  * http://averta.net/phlox/
4
  */
6
  *
7
  * ================== public/assets/js/src/init.general.js ===================
8
  **/
9
+ !function($){var filterList=$(".aux-widget-recent-portfolios .aux-ajax-filters li[data-filter]");filterList.on("click",function(e){e.preventDefault();var $this=$(this),$container=$this.parents(".aux-widget-recent-portfolios").find(".aux-ajax-view"),data={action:"aux_recent_portfolio_filter_content",term:$this.data("filter"),taxonomy:$container.data("taxonomy"),num:$container.data("num"),order:$container.data("order"),orderby:$container.data("orderby"),n:$container.data("n"),args:eval($container.data("element-id")+"AjaxConfig")};$container.AuxIsotope("showLoading"),$.post(auxpfo.ajax_url,data,function(res){if(res){var $data=$(res.data);$container.AuxIsotope("removeAll"),setTimeout(function(){$data.each(function(index,element){$item=$(element),$item.hasClass("aux-iso-item")&&($container.AuxIsotope("insert",$item),$item.AuxTwoWayHover(),$item.photoSwipe({target:".aux-lightbox-btn",bgOpacity:.97,shareEl:!0}))})},1e3)}})})}(jQuery);
public/assets/js/src/init.general.js CHANGED
@@ -6,7 +6,7 @@
6
  e.preventDefault();
7
  var $this = $(this),
8
  $container = $this.parents('.aux-widget-recent-portfolios').find('.aux-ajax-view'),
9
- $ajaxSpinner = $this.parents('.aux-widget-recent-portfolios').find('.aux-items-loading');
10
  data = {
11
  action : 'aux_recent_portfolio_filter_content',
12
  term : $this.data('filter'),
@@ -17,22 +17,39 @@
17
  n : $container.data('n'),
18
  args : eval($container.data('element-id') + 'AjaxConfig')
19
  };
 
 
20
 
21
  $.post( auxpfo.ajax_url, data, function(res){
22
 
23
  if ( res ) {
24
 
 
 
 
 
25
  setTimeout(function() {
26
- $container.AuxIsotope( 'removeAll' );
27
- $newItems = $(res);
28
 
29
- $newItems.each( function( index, element ) {
30
  $item = $(element);
31
- $container.AuxIsotope( 'insert', $item );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  });
33
 
34
- $container.find('.aux-hover-twoway').AuxTwoWayHover();
35
-
36
  }, 1000);
37
  }
38
 
6
  e.preventDefault();
7
  var $this = $(this),
8
  $container = $this.parents('.aux-widget-recent-portfolios').find('.aux-ajax-view'),
9
+
10
  data = {
11
  action : 'aux_recent_portfolio_filter_content',
12
  term : $this.data('filter'),
17
  n : $container.data('n'),
18
  args : eval($container.data('element-id') + 'AjaxConfig')
19
  };
20
+
21
+ $container.AuxIsotope( 'showLoading' );
22
 
23
  $.post( auxpfo.ajax_url, data, function(res){
24
 
25
  if ( res ) {
26
 
27
+ var $data = $(res.data)
28
+
29
+ $container.AuxIsotope( 'removeAll' );
30
+
31
  setTimeout(function() {
 
 
32
 
33
+ $data.each( function( index, element ) {
34
  $item = $(element);
35
+
36
+ if ( $item.hasClass('aux-iso-item') ) {
37
+
38
+ $container.AuxIsotope( 'insert', $item );
39
+
40
+ $item.AuxTwoWayHover();
41
+
42
+ $item.photoSwipe({
43
+ target: '.aux-lightbox-btn',
44
+ bgOpacity: 0.97,
45
+ shareEl: true
46
+ }
47
+ );
48
+
49
+ }
50
+
51
  });
52
 
 
 
53
  }, 1000);
54
  }
55
 
public/templates/elements/recent-portfolio.php CHANGED
@@ -50,7 +50,7 @@ function auxin_recent_portfolio( $args= array() ) {
50
  'template_part_file' => 'recent-portfolio',
51
  'extra_template_path' => AUXPFO_PUB_DIR . '/templates/elements',
52
  'universal_id' => '',
53
- 'terms' => ' ',
54
  'query_args' => array(),
55
  'reset_query' => true,
56
  'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
@@ -113,7 +113,7 @@ function auxin_recent_portfolio( $args= array() ) {
113
  $space = 0;
114
  $desktop_cnum = 4;
115
  $column_media_height = '';
116
- $column_media_width = auxin_get_content_column_width( 4, $space, $content_width );
117
  break;
118
  default:
119
  $is_grid = true;
@@ -176,19 +176,45 @@ function auxin_recent_portfolio( $args= array() ) {
176
  $isoxin_attrs .= $ajaxAttrs;
177
 
178
  $wrapper_classes .= $show_lightbox ? ' aux-lightbox-gallery' : '';
 
 
 
 
 
 
179
 
180
- if( gettype( $terms ) === "string" ) {
181
- if( empty( $terms ) || $terms == " " ) {
 
182
  $tax_args = array();
183
- } else {
 
 
 
 
 
 
 
 
184
  $tax_args = array(
185
  array(
186
- 'taxonomy' => $filter_by,
187
  'field' => 'slug',
188
- 'terms' => explode( ",", $terms)
189
  )
190
  );
191
  }
 
 
 
 
 
 
 
 
 
 
 
192
  }
193
 
194
  $query_arg = array(
@@ -253,8 +279,8 @@ function auxin_recent_portfolio( $args= array() ) {
253
  );
254
 
255
  $item_classes = $tile_pattern_info['classname'];
256
- $item_inner_classes = 'aux-keep-aspect';
257
-
258
  } else {
259
 
260
  $post_vars = auxpfo_get_portfolio_config(
50
  'template_part_file' => 'recent-portfolio',
51
  'extra_template_path' => AUXPFO_PUB_DIR . '/templates/elements',
52
  'universal_id' => '',
53
+ 'term' => '',
54
  'query_args' => array(),
55
  'reset_query' => true,
56
  'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
113
  $space = 0;
114
  $desktop_cnum = 4;
115
  $column_media_height = '';
116
+ $column_media_width = $content_width;
117
  break;
118
  default:
119
  $is_grid = true;
176
  $isoxin_attrs .= $ajaxAttrs;
177
 
178
  $wrapper_classes .= $show_lightbox ? ' aux-lightbox-gallery' : '';
179
+
180
+ $filter_by = auxin_is_true( $show_filters ) || 'archive' === $called_from || 'taxonomy' === $called_from ? $filter_by : 'portfolio-cat';
181
+
182
+ /**
183
+ * if the Request is from ajax , $term variable will be empty
184
+ */
185
 
186
+ if ( empty ( $term ) ) {
187
+
188
+ if ( empty( $cat ) || $cat == " " || ( is_array( $cat ) && ( sizeof( $cat ) == 1 && in_array( ' ', $cat ) ) ) ) {
189
  $tax_args = array();
190
+ } else if ( is_array( $cat ) ) {
191
+ $tax_args = array(
192
+ array(
193
+ 'taxonomy' => 'portfolio-cat',
194
+ 'field' => 'term_id',
195
+ 'terms' => $cat
196
+ )
197
+ );
198
+ } else if ( 'string' === gettype( $cat ) ) {
199
  $tax_args = array(
200
  array(
201
+ 'taxonomy' => 'portfolio-cat',
202
  'field' => 'slug',
203
+ 'terms' => $cat
204
  )
205
  );
206
  }
207
+
208
+ } else {
209
+
210
+ $tax_args = array(
211
+ array(
212
+ 'taxonomy' => $filter_by,
213
+ 'field' => 'slug',
214
+ 'terms' => $term
215
+ )
216
+ );
217
+
218
  }
219
 
220
  $query_arg = array(
279
  );
280
 
281
  $item_classes = $tile_pattern_info['classname'];
282
+ $item_inner_classes = '';
283
+
284
  } else {
285
 
286
  $post_vars = auxpfo_get_portfolio_config(
public/templates/taxonomy-portfolio-filter.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /* Loops through all portfolio, taxes, .. and display posts */
2
+
3
+ /**
4
+ * The template for displaying taxonomies
5
+ *
6
+ *
7
+ * @package Auxin
8
+ * @license LICENSE.txt
9
+ * @author
10
+ * @link http://averta.net/phlox/
11
+ * @copyright (c) 2010-2018
12
+ */
13
+ include 'taxonomy-portfolio-cat.php';
public/templates/theme-parts/loop-portfolio.php CHANGED
@@ -10,7 +10,6 @@ $template_type = strstr( $template_type_id, '-', true );
10
  // posts perpage
11
  $per_page = get_option( 'posts_per_page' );
12
 
13
-
14
  if( in_array( $template_type, array('grid', 'masonry', 'tiles') ) ){
15
 
16
  $args = array(
@@ -38,7 +37,11 @@ if( in_array( $template_type, array('grid', 'masonry', 'tiles') ) ){
38
  'custom_el_id' => '',
39
  'reset_query' => false,
40
  'use_wp_query' => true, // true to use the global wp_query, false to use internal custom query
41
- 'base_class' => 'aux-widget-recent-portfolios'
 
 
 
 
42
  );
43
 
44
  if( 'masonry' == $template_type ){
10
  // posts perpage
11
  $per_page = get_option( 'posts_per_page' );
12
 
 
13
  if( in_array( $template_type, array('grid', 'masonry', 'tiles') ) ){
14
 
15
  $args = array(
37
  'custom_el_id' => '',
38
  'reset_query' => false,
39
  'use_wp_query' => true, // true to use the global wp_query, false to use internal custom query
40
+ 'base_class' => 'aux-widget-recent-portfolios',
41
+ 'called_from' => 'archive',
42
+ 'term' => '',
43
+ 'filter_by' => '',
44
+ 'cat' => '',
45
  );
46
 
47
  if( 'masonry' == $template_type ){
public/templates/theme-parts/tax-portfolio.php CHANGED
@@ -13,7 +13,6 @@ $template_type = strstr( $portfolio_taxonomy_template, '-', true );
13
  // posts perpage
14
  $per_page = get_option( 'posts_per_page' );
15
 
16
-
17
  // if template type is masonry
18
  if( in_array( $template_type, array('grid', 'masonry', 'tiles') ) ){
19
  global $query_string;
@@ -34,7 +33,8 @@ if( in_array( $template_type, array('grid', 'masonry', 'tiles') ) ){
34
  'show_title' => true,
35
  'show_info' => true,
36
  'filter_by' => $query_string[0],
37
- 'terms' => $query_string[1],
 
38
  'image_aspect_ratio' => auxin_get_option( 'portfolio_taxonomy_image_aspect_ratio'),
39
  'space' => auxin_get_option( 'portfolio_taxonomy_grid_space') ,
40
  'desktop_cnum' => auxin_get_option( 'portfolio_taxonomy_column_number' ),
@@ -46,7 +46,8 @@ if( in_array( $template_type, array('grid', 'masonry', 'tiles') ) ){
46
  'custom_el_id' => '',
47
  'reset_query' => false,
48
  'use_wp_query' => true, // true to use the global wp_query, false to use internal custom query
49
- 'base_class' => 'aux-widget-recent-portfolios'
 
50
  );
51
 
52
  if( 'masonry' == $template_type ){
13
  // posts perpage
14
  $per_page = get_option( 'posts_per_page' );
15
 
 
16
  // if template type is masonry
17
  if( in_array( $template_type, array('grid', 'masonry', 'tiles') ) ){
18
  global $query_string;
33
  'show_title' => true,
34
  'show_info' => true,
35
  'filter_by' => $query_string[0],
36
+ 'term' => $query_string[1],
37
+ 'cat' => '',
38
  'image_aspect_ratio' => auxin_get_option( 'portfolio_taxonomy_image_aspect_ratio'),
39
  'space' => auxin_get_option( 'portfolio_taxonomy_grid_space') ,
40
  'desktop_cnum' => auxin_get_option( 'portfolio_taxonomy_column_number' ),
46
  'custom_el_id' => '',
47
  'reset_query' => false,
48
  'use_wp_query' => true, // true to use the global wp_query, false to use internal custom query
49
+ 'base_class' => 'aux-widget-recent-portfolios',
50
+ 'called_from' => 'taxonomy'
51
  );
52
 
53
  if( 'masonry' == $template_type ){