Version Description
Download this release
Release Info
Developer | averta |
Plugin | Premium Portfolio Features for Phlox theme |
Version | 1.7.2 |
Comparing to | |
See all releases |
Code changes from version 1.7.1 to 1.7.2
- README.txt +4 -1
- admin/includes/admin-ajax.php +30 -0
- auxin-portfolio.php +2 -2
- includes/define.php +1 -1
- includes/elements/elementor/recent-portfolios-grid-carousel.php +4 -4
- includes/elements/elementor/recent-portfolios-grid.php +5 -5
- includes/elements/elementor/recent-portfolios-masonry.php +5 -5
- includes/elements/elementor/recent-portfolios-tile-carousel.php +4 -4
- includes/elements/elementor/recent-portfolios-tile.php +5 -5
- includes/elements/recent-portfolios.php +112 -432
- public/assets/js/portfolio.js +55 -0
- public/assets/js/portfolio.min.js +9 -0
- public/assets/js/src/init.general.js +43 -0
- public/includes/class-auxpfo-frontend-assets.php +15 -2
- public/templates/elements/recent-portfolio.php +356 -0
- public/templates/theme-parts/entry/portfolio-column-overlay.php +21 -20
- public/templates/theme-parts/entry/portfolio-column.php +3 -3
- public/templates/theme-parts/entry/single-portfolio.php +1 -2
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.
|
11 |
License: GPLv3
|
12 |
License URI: http://www.gnu.org/licenses/gpl.html
|
13 |
|
@@ -136,6 +136,9 @@ Bugs can be reported in our [support forums](http://support.averta.net/en/item/p
|
|
136 |
|
137 |
== Changelog ==
|
138 |
|
|
|
|
|
|
|
139 |
= Version 1.7.0 / (09.08.2018) =
|
140 |
- [Fix]: Minor bugs fixed.
|
141 |
|
7 |
Requires PHP: 5.4
|
8 |
Requires at least: 4.6
|
9 |
Tested up to: 4.9.8
|
10 |
+
Stable tag: 1.7.2
|
11 |
License: GPLv3
|
12 |
License URI: http://www.gnu.org/licenses/gpl.html
|
13 |
|
136 |
|
137 |
== Changelog ==
|
138 |
|
139 |
+
= Version 1.7.2 / (03.09.2018) =
|
140 |
+
- [Fix]: Minor bugs fixed.
|
141 |
+
|
142 |
= Version 1.7.0 / (09.08.2018) =
|
143 |
- [Fix]: Minor bugs fixed.
|
144 |
|
admin/includes/admin-ajax.php
CHANGED
@@ -1,2 +1,32 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Admin Ajax handlers
|
4 |
+
*
|
5 |
+
*
|
6 |
+
* @package Auxin
|
7 |
+
* @license LICENSE.txt
|
8 |
+
* @author
|
9 |
+
* @link http://averta.net/phlox/
|
10 |
+
* @copyright (c) 2010-2018
|
11 |
+
*/
|
12 |
|
13 |
+
function auxin_recent_portfolios_ajax_handler() {
|
14 |
+
// Check nonce
|
15 |
+
if ( ! isset( $_POST['n'] ) || ! wp_verify_nonce( $_POST['n'], 'aux_ajax_filterable_portfolio' ) ) {
|
16 |
+
wp_send_json_error( 'Nonce check failed!', 403 );
|
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 |
+
}
|
30 |
+
|
31 |
+
add_action( 'wp_ajax_aux_recent_portfolio_filter_content', 'auxin_recent_portfolios_ajax_handler' );
|
32 |
+
add_action( 'wp_ajax_nopriv_aux_recent_portfolio_filter_content', 'auxin_recent_portfolios_ajax_handler' );
|
auxin-portfolio.php
CHANGED
@@ -12,14 +12,14 @@
|
|
12 |
* Plugin Name: Phlox Portfolio
|
13 |
* Plugin URI: http://phlox.pro/
|
14 |
* Description: Showcase your projects beautifully in Phlox theme
|
15 |
-
* Version: 1.7.
|
16 |
* Author: averta
|
17 |
* Author URI: http://averta.net
|
18 |
* License: GPL2
|
19 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
20 |
* Text Domain: auxin-portfolio
|
21 |
* Domain Path: /languages
|
22 |
-
* Tested up to: 4.9.
|
23 |
*/
|
24 |
|
25 |
// If this file is called directly, abort.
|
12 |
* Plugin Name: Phlox Portfolio
|
13 |
* Plugin URI: http://phlox.pro/
|
14 |
* Description: Showcase your projects beautifully in Phlox theme
|
15 |
+
* Version: 1.7.2
|
16 |
* Author: averta
|
17 |
* Author URI: http://averta.net
|
18 |
* License: GPL2
|
19 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
20 |
* Text Domain: auxin-portfolio
|
21 |
* Domain Path: /languages
|
22 |
+
* Tested up to: 4.9.8
|
23 |
*/
|
24 |
|
25 |
// If this file is called directly, abort.
|
includes/define.php
CHANGED
@@ -15,7 +15,7 @@ if( ! defined( 'THEME_NAME' ) ){
|
|
15 |
|
16 |
|
17 |
|
18 |
-
define( 'AUXPFO_VERSION' , '1.7.
|
19 |
|
20 |
define( 'AUXPFO_SLUG' , 'auxin-portfolio' );
|
21 |
|
15 |
|
16 |
|
17 |
|
18 |
+
define( 'AUXPFO_VERSION' , '1.7.2' );
|
19 |
|
20 |
define( 'AUXPFO_SLUG' , 'auxin-portfolio' );
|
21 |
|
includes/elements/elementor/recent-portfolios-grid-carousel.php
CHANGED
@@ -640,7 +640,7 @@ class Recent_Portfolios_Grid_Carousel extends Widget_Base {
|
|
640 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
641 |
'type' => Controls_Manager::COLOR,
|
642 |
'selectors' => array(
|
643 |
-
'{{WRAPPER}} .
|
644 |
)
|
645 |
)
|
646 |
);
|
@@ -660,7 +660,7 @@ class Recent_Portfolios_Grid_Carousel extends Widget_Base {
|
|
660 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
661 |
'type' => Controls_Manager::COLOR,
|
662 |
'selectors' => array(
|
663 |
-
'{{WRAPPER}} .
|
664 |
)
|
665 |
)
|
666 |
);
|
@@ -674,7 +674,7 @@ class Recent_Portfolios_Grid_Carousel extends Widget_Base {
|
|
674 |
array(
|
675 |
'name' => 'title_typography',
|
676 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
677 |
-
'selector' => '{{WRAPPER}} .
|
678 |
)
|
679 |
);
|
680 |
|
@@ -689,7 +689,7 @@ class Recent_Portfolios_Grid_Carousel extends Widget_Base {
|
|
689 |
),
|
690 |
),
|
691 |
'selectors' => array(
|
692 |
-
'{{WRAPPER}} .
|
693 |
)
|
694 |
)
|
695 |
);
|
640 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
641 |
'type' => Controls_Manager::COLOR,
|
642 |
'selectors' => array(
|
643 |
+
'{{WRAPPER}} .entry-header .entry-title a' => 'color: {{VALUE}};',
|
644 |
)
|
645 |
)
|
646 |
);
|
660 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
661 |
'type' => Controls_Manager::COLOR,
|
662 |
'selectors' => array(
|
663 |
+
'{{WRAPPER}} .entry-header .entry-title a:hover' => 'color:{{VALUE}};',
|
664 |
)
|
665 |
)
|
666 |
);
|
674 |
array(
|
675 |
'name' => 'title_typography',
|
676 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
677 |
+
'selector' => '{{WRAPPER}} .entry-header .entry-title a'
|
678 |
)
|
679 |
);
|
680 |
|
689 |
),
|
690 |
),
|
691 |
'selectors' => array(
|
692 |
+
'{{WRAPPER}} .entry-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
|
693 |
)
|
694 |
)
|
695 |
);
|
includes/elements/elementor/recent-portfolios-grid.php
CHANGED
@@ -757,7 +757,7 @@ class Recent_Portfolios_Grid extends Widget_Base {
|
|
757 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
758 |
'type' => Controls_Manager::COLOR,
|
759 |
'selectors' => array(
|
760 |
-
'{{WRAPPER}} .
|
761 |
),
|
762 |
'condition' => array(
|
763 |
'display_title' => 'yes'
|
@@ -783,7 +783,7 @@ class Recent_Portfolios_Grid extends Widget_Base {
|
|
783 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
784 |
'type' => Controls_Manager::COLOR,
|
785 |
'selectors' => array(
|
786 |
-
'{{WRAPPER}} .
|
787 |
),
|
788 |
'condition' => array(
|
789 |
'display_title' => 'yes'
|
@@ -800,7 +800,7 @@ class Recent_Portfolios_Grid extends Widget_Base {
|
|
800 |
array(
|
801 |
'name' => 'title_typography',
|
802 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
803 |
-
'selector' => '{{WRAPPER}} .
|
804 |
'condition' => array(
|
805 |
'display_title' => 'yes'
|
806 |
)
|
@@ -818,7 +818,7 @@ class Recent_Portfolios_Grid extends Widget_Base {
|
|
818 |
),
|
819 |
),
|
820 |
'selectors' => array(
|
821 |
-
'{{WRAPPER}}
|
822 |
),
|
823 |
'condition' => array(
|
824 |
'display_title' => 'yes'
|
@@ -1069,7 +1069,7 @@ class Recent_Portfolios_Grid extends Widget_Base {
|
|
1069 |
|
1070 |
'paginate' => $settings['paginate'],
|
1071 |
'perpage' => $settings['perpage'],
|
1072 |
-
|
1073 |
'show_info' => $settings['show_info'],
|
1074 |
'image_aspect_ratio' => $settings['image_aspect_ratio'],
|
1075 |
'space' => auxin_get_control_size( $settings['space'] ),
|
757 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
758 |
'type' => Controls_Manager::COLOR,
|
759 |
'selectors' => array(
|
760 |
+
'{{WRAPPER}} .entry-header .entry-title a' => 'color: {{VALUE}};',
|
761 |
),
|
762 |
'condition' => array(
|
763 |
'display_title' => 'yes'
|
783 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
784 |
'type' => Controls_Manager::COLOR,
|
785 |
'selectors' => array(
|
786 |
+
'{{WRAPPER}} .entry-header .entry-title a:hover' => 'color:{{VALUE}};',
|
787 |
),
|
788 |
'condition' => array(
|
789 |
'display_title' => 'yes'
|
800 |
array(
|
801 |
'name' => 'title_typography',
|
802 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
803 |
+
'selector' => '{{WRAPPER}} .entry-header .entry-title a',
|
804 |
'condition' => array(
|
805 |
'display_title' => 'yes'
|
806 |
)
|
818 |
),
|
819 |
),
|
820 |
'selectors' => array(
|
821 |
+
'{{WRAPPER}} .entry-header' => 'margin-bottom: {{SIZE}}{{UNIT}};',
|
822 |
),
|
823 |
'condition' => array(
|
824 |
'display_title' => 'yes'
|
1069 |
|
1070 |
'paginate' => $settings['paginate'],
|
1071 |
'perpage' => $settings['perpage'],
|
1072 |
+
'display_title' => $settings['display_title'],
|
1073 |
'show_info' => $settings['show_info'],
|
1074 |
'image_aspect_ratio' => $settings['image_aspect_ratio'],
|
1075 |
'space' => auxin_get_control_size( $settings['space'] ),
|
includes/elements/elementor/recent-portfolios-masonry.php
CHANGED
@@ -760,7 +760,7 @@ class Recent_Portfolios_Masonry extends Widget_Base {
|
|
760 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
761 |
'type' => Controls_Manager::COLOR,
|
762 |
'selectors' => array(
|
763 |
-
'{{WRAPPER}} .
|
764 |
),
|
765 |
'condition' => array(
|
766 |
'display_title' => 'yes'
|
@@ -786,7 +786,7 @@ class Recent_Portfolios_Masonry extends Widget_Base {
|
|
786 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
787 |
'type' => Controls_Manager::COLOR,
|
788 |
'selectors' => array(
|
789 |
-
'{{WRAPPER}} .
|
790 |
),
|
791 |
'condition' => array(
|
792 |
'display_title' => 'yes'
|
@@ -803,7 +803,7 @@ class Recent_Portfolios_Masonry extends Widget_Base {
|
|
803 |
array(
|
804 |
'name' => 'title_typography',
|
805 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
806 |
-
'selector' => '{{WRAPPER}} .
|
807 |
'condition' => array(
|
808 |
'display_title' => 'yes'
|
809 |
)
|
@@ -821,7 +821,7 @@ class Recent_Portfolios_Masonry extends Widget_Base {
|
|
821 |
),
|
822 |
),
|
823 |
'selectors' => array(
|
824 |
-
'{{WRAPPER}} .
|
825 |
),
|
826 |
'condition' => array(
|
827 |
'display_title' => 'yes'
|
@@ -1051,7 +1051,7 @@ class Recent_Portfolios_Masonry extends Widget_Base {
|
|
1051 |
|
1052 |
'paginate' => $settings['paginate'],
|
1053 |
'perpage' => $settings['perpage'],
|
1054 |
-
'
|
1055 |
'show_info' => $settings['show_info'],
|
1056 |
//'image_aspect_ratio' => $settings['image_aspect_ratio'],
|
1057 |
'space' => $settings['space'],
|
760 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
761 |
'type' => Controls_Manager::COLOR,
|
762 |
'selectors' => array(
|
763 |
+
'{{WRAPPER}} .entry-header .entry-title a' => 'color: {{VALUE}};',
|
764 |
),
|
765 |
'condition' => array(
|
766 |
'display_title' => 'yes'
|
786 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
787 |
'type' => Controls_Manager::COLOR,
|
788 |
'selectors' => array(
|
789 |
+
'{{WRAPPER}} .entry-header .entry-title a:hover' => 'color:{{VALUE}};',
|
790 |
),
|
791 |
'condition' => array(
|
792 |
'display_title' => 'yes'
|
803 |
array(
|
804 |
'name' => 'title_typography',
|
805 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
806 |
+
'selector' => '{{WRAPPER}} .entry-header .entry-title a',
|
807 |
'condition' => array(
|
808 |
'display_title' => 'yes'
|
809 |
)
|
821 |
),
|
822 |
),
|
823 |
'selectors' => array(
|
824 |
+
'{{WRAPPER}} .entry-header ' => 'margin-bottom: {{SIZE}}{{UNIT}};',
|
825 |
),
|
826 |
'condition' => array(
|
827 |
'display_title' => 'yes'
|
1051 |
|
1052 |
'paginate' => $settings['paginate'],
|
1053 |
'perpage' => $settings['perpage'],
|
1054 |
+
'display_title' => $settings['display_title'],
|
1055 |
'show_info' => $settings['show_info'],
|
1056 |
//'image_aspect_ratio' => $settings['image_aspect_ratio'],
|
1057 |
'space' => $settings['space'],
|
includes/elements/elementor/recent-portfolios-tile-carousel.php
CHANGED
@@ -566,7 +566,7 @@ class Recent_Portfolios_Tile_Carousel_Carousel extends Widget_Base {
|
|
566 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
567 |
'type' => Controls_Manager::COLOR,
|
568 |
'selectors' => array(
|
569 |
-
'{{WRAPPER}} .
|
570 |
),
|
571 |
'condition' => array(
|
572 |
'display_title' => 'yes'
|
@@ -592,7 +592,7 @@ class Recent_Portfolios_Tile_Carousel_Carousel extends Widget_Base {
|
|
592 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
593 |
'type' => Controls_Manager::COLOR,
|
594 |
'selectors' => array(
|
595 |
-
'{{WRAPPER}} .
|
596 |
),
|
597 |
'condition' => array(
|
598 |
'display_title' => 'yes'
|
@@ -609,7 +609,7 @@ class Recent_Portfolios_Tile_Carousel_Carousel extends Widget_Base {
|
|
609 |
array(
|
610 |
'name' => 'title_typography',
|
611 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
612 |
-
'selector' => '{{WRAPPER}} .
|
613 |
'condition' => array(
|
614 |
'display_title' => 'yes'
|
615 |
)
|
@@ -627,7 +627,7 @@ class Recent_Portfolios_Tile_Carousel_Carousel extends Widget_Base {
|
|
627 |
),
|
628 |
),
|
629 |
'selectors' => array(
|
630 |
-
'{{WRAPPER}} .
|
631 |
),
|
632 |
'condition' => array(
|
633 |
'display_title' => 'yes'
|
566 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
567 |
'type' => Controls_Manager::COLOR,
|
568 |
'selectors' => array(
|
569 |
+
'{{WRAPPER}} .entry-header .entry-title a' => 'color: {{VALUE}};',
|
570 |
),
|
571 |
'condition' => array(
|
572 |
'display_title' => 'yes'
|
592 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
593 |
'type' => Controls_Manager::COLOR,
|
594 |
'selectors' => array(
|
595 |
+
'{{WRAPPER}} .entry-header .entry-title a:hover' => 'color:{{VALUE}};',
|
596 |
),
|
597 |
'condition' => array(
|
598 |
'display_title' => 'yes'
|
609 |
array(
|
610 |
'name' => 'title_typography',
|
611 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
612 |
+
'selector' => '{{WRAPPER}} .entry-header .entry-title a',
|
613 |
'condition' => array(
|
614 |
'display_title' => 'yes'
|
615 |
)
|
627 |
),
|
628 |
),
|
629 |
'selectors' => array(
|
630 |
+
'{{WRAPPER}} .entry-header' => 'margin-bottom: {{SIZE}}{{UNIT}};',
|
631 |
),
|
632 |
'condition' => array(
|
633 |
'display_title' => 'yes'
|
includes/elements/elementor/recent-portfolios-tile.php
CHANGED
@@ -721,7 +721,7 @@ class Recent_Portfolios_Tile extends Widget_Base {
|
|
721 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
722 |
'type' => Controls_Manager::COLOR,
|
723 |
'selectors' => array(
|
724 |
-
'{{WRAPPER}} .
|
725 |
),
|
726 |
'condition' => array(
|
727 |
'display_title' => 'yes'
|
@@ -747,7 +747,7 @@ class Recent_Portfolios_Tile extends Widget_Base {
|
|
747 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
748 |
'type' => Controls_Manager::COLOR,
|
749 |
'selectors' => array(
|
750 |
-
'{{WRAPPER}} .
|
751 |
),
|
752 |
'condition' => array(
|
753 |
'display_title' => 'yes'
|
@@ -764,7 +764,7 @@ class Recent_Portfolios_Tile extends Widget_Base {
|
|
764 |
array(
|
765 |
'name' => 'title_typography',
|
766 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
767 |
-
'selector' => '{{WRAPPER}} .
|
768 |
'condition' => array(
|
769 |
'display_title' => 'yes'
|
770 |
)
|
@@ -782,7 +782,7 @@ class Recent_Portfolios_Tile extends Widget_Base {
|
|
782 |
),
|
783 |
),
|
784 |
'selectors' => array(
|
785 |
-
'{{WRAPPER}} .
|
786 |
),
|
787 |
'condition' => array(
|
788 |
'display_title' => 'yes'
|
@@ -962,7 +962,7 @@ class Recent_Portfolios_Tile extends Widget_Base {
|
|
962 |
|
963 |
'paginate' => $settings['paginate'],
|
964 |
'perpage' => $settings['perpage'],
|
965 |
-
'
|
966 |
'show_info' => $settings['show_info'],
|
967 |
//'image_aspect_ratio' => $settings['image_aspect_ratio'],
|
968 |
// 'desktop_cnum' => $settings['columns'],
|
721 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
722 |
'type' => Controls_Manager::COLOR,
|
723 |
'selectors' => array(
|
724 |
+
'{{WRAPPER}} .entry-header .entry-title a' => 'color: {{VALUE}};',
|
725 |
),
|
726 |
'condition' => array(
|
727 |
'display_title' => 'yes'
|
747 |
'label' => __( 'Color', 'auxin-portfolio' ),
|
748 |
'type' => Controls_Manager::COLOR,
|
749 |
'selectors' => array(
|
750 |
+
'{{WRAPPER}} .entry-header .entry-title a:hover' => 'color:{{VALUE}};',
|
751 |
),
|
752 |
'condition' => array(
|
753 |
'display_title' => 'yes'
|
764 |
array(
|
765 |
'name' => 'title_typography',
|
766 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
767 |
+
'selector' => '{{WRAPPER}} .entry-header .entry-title a',
|
768 |
'condition' => array(
|
769 |
'display_title' => 'yes'
|
770 |
)
|
782 |
),
|
783 |
),
|
784 |
'selectors' => array(
|
785 |
+
'{{WRAPPER}} .entry-header' => 'margin-bottom: {{SIZE}}{{UNIT}};',
|
786 |
),
|
787 |
'condition' => array(
|
788 |
'display_title' => 'yes'
|
962 |
|
963 |
'paginate' => $settings['paginate'],
|
964 |
'perpage' => $settings['perpage'],
|
965 |
+
'display_title' => $settings['display_title'],
|
966 |
'show_info' => $settings['show_info'],
|
967 |
//'image_aspect_ratio' => $settings['image_aspect_ratio'],
|
968 |
// 'desktop_cnum' => $settings['columns'],
|
includes/elements/recent-portfolios.php
CHANGED
@@ -65,7 +65,10 @@ function auxin_get_recent_portfolios_master_array( $master_array ) {
|
|
65 |
'class' => 'cat',
|
66 |
'value' => ' ', // should use the taxonomy name
|
67 |
'admin_label' => false,
|
68 |
-
'dependency' =>
|
|
|
|
|
|
|
69 |
'weight' => '',
|
70 |
'group' => 'Query',
|
71 |
'edit_field_class' => ''
|
@@ -412,31 +415,7 @@ function auxin_get_recent_portfolios_master_array( $master_array ) {
|
|
412 |
'overlay-lightbox-boxed' => __('Overlay title with lightbox style 2', 'auxin-portfolio' ),
|
413 |
)
|
414 |
),
|
415 |
-
|
416 |
-
'heading' => __('Insert portfolio title','auxin-portfolio' ),
|
417 |
-
'description' => '',
|
418 |
-
'param_name' => 'show_title',
|
419 |
-
'type' => 'aux_switch',
|
420 |
-
'value' => '1',
|
421 |
-
'class' => '',
|
422 |
-
'admin_label' => false,
|
423 |
-
'dependency' => '',
|
424 |
-
'weight' => '',
|
425 |
-
'group' => '',
|
426 |
-
'edit_field_class' => ''
|
427 |
-
),
|
428 |
-
array(
|
429 |
-
'heading' => __('Insert portfolio meta','auxin-portfolio' ),
|
430 |
-
'description' => '',
|
431 |
-
'param_name' => 'show_info',
|
432 |
-
'type' => 'aux_switch',
|
433 |
-
'value' => '1',
|
434 |
-
'class' => '',
|
435 |
-
'admin_label' => false,
|
436 |
-
'weight' => '',
|
437 |
-
'group' => '',
|
438 |
-
'edit_field_class' => ''
|
439 |
-
),
|
440 |
array(
|
441 |
'heading' => __('Show filters','auxin-portfolio' ),
|
442 |
'description' => '',
|
@@ -473,7 +452,7 @@ function auxin_get_recent_portfolios_master_array( $master_array ) {
|
|
473 |
'heading' => __('Filter Control Alignment', 'auxin-portfolio'),
|
474 |
'param_name' => 'filter_align',
|
475 |
'type' => 'aux_visual_select',
|
476 |
-
'def_value' => 'aux-
|
477 |
'holder' => '',
|
478 |
'choices' => array(
|
479 |
'aux-left' => array(
|
@@ -502,7 +481,7 @@ function auxin_get_recent_portfolios_master_array( $master_array ) {
|
|
502 |
'description' => __('Style of filter buttons.', 'auxin-portfolio' ),
|
503 |
'param_name' => 'filter_style',
|
504 |
'type' => 'aux_visual_select',
|
505 |
-
'def_value' => '
|
506 |
'holder' => '',
|
507 |
'dependency' => array(
|
508 |
'element' => 'show_filters',
|
@@ -512,36 +491,36 @@ function auxin_get_recent_portfolios_master_array( $master_array ) {
|
|
512 |
'group' => 'Filter',
|
513 |
'edit_field_class' => '',
|
514 |
'choices' => array(
|
515 |
-
'
|
516 |
'label' => __('Slide up' , 'auxin-portfolio'),
|
517 |
'video_src' => AUXPFO_ADMIN_URL . '/assets/images/preview/FilterSlideUp2.webm webm'
|
518 |
),
|
519 |
-
'
|
520 |
'label' => __('Fill' , 'auxin-portfolio'),
|
521 |
'video_src' => AUXPFO_ADMIN_URL . '/assets/images/preview/FilterFill.webm webm'
|
522 |
),
|
523 |
-
'
|
524 |
'label' => __('Cube' , 'auxin-portfolio'),
|
525 |
'video_src' => AUXPFO_ADMIN_URL . '/assets/images/preview/FilterCube.webm webm'
|
526 |
),
|
527 |
-
'
|
528 |
'label' => __('Underline' , 'auxin-portfolio'),
|
529 |
'video_src' => AUXPFO_ADMIN_URL . '/assets/images/preview/FilterUnderline.mp4 mp4'
|
530 |
),
|
531 |
-
'
|
532 |
'label' => __('Float frame' , 'auxin-portfolio'),
|
533 |
'video_src' => AUXPFO_ADMIN_URL . '/assets/images/preview/FilterFloatFrame.webm webm'
|
534 |
),
|
535 |
-
'
|
536 |
'label' => __('Borderd' , 'auxin-portfolio'),
|
537 |
'video_src' => AUXPFO_ADMIN_URL . '/assets/images/preview/FilterBordered.mp4 mp4'
|
538 |
),
|
539 |
-
'
|
540 |
'label' => __('Float underline' , 'auxin-portfolio'),
|
541 |
'video_src' => AUXPFO_ADMIN_URL . '/assets/images/preview/FilterUnderline.webm webm'
|
542 |
),
|
543 |
-
'
|
544 |
-
'label' => __('
|
545 |
'video_src' => AUXPFO_ADMIN_URL . '/assets/images/preview/FilterUnderline.webm webm'
|
546 |
),
|
547 |
),
|
@@ -594,52 +573,6 @@ function auxin_get_recent_portfolios_master_array( $master_array ) {
|
|
594 |
'group' => __('Transitions', 'auxin-portfolio'),
|
595 |
'edit_field_class' => ''
|
596 |
),
|
597 |
-
array(
|
598 |
-
'heading' => __('Display like button','auxin-portfolio' ),
|
599 |
-
'description' => sprintf(__('Enable it to display %s like button%s on gride template blog. Please note WP Ulike plugin needs to be activaited to use this option.', 'auxin-portfolio'), '<strong>', '</strong>'),
|
600 |
-
'param_name' => 'display_like',
|
601 |
-
'type' => 'aux_switch',
|
602 |
-
'value' => '1',
|
603 |
-
'holder' => '',
|
604 |
-
'class' => 'display_like',
|
605 |
-
'admin_label' => false,
|
606 |
-
'dependency' => array(
|
607 |
-
'element' => 'item_style',
|
608 |
-
'value' => array( 'classic', 'classic-lightbox', 'classic-lightbox-boxed' )
|
609 |
-
),
|
610 |
-
'weight' => '',
|
611 |
-
'group' => '',
|
612 |
-
'edit_field_class' => ''
|
613 |
-
),
|
614 |
-
array(
|
615 |
-
'heading' => __('Deeplink', 'auxin-portfolio' ),
|
616 |
-
'description' => __('Enables the deeplink feature, it updates URL based on page and filter status.', 'auxin-portfolio' ),
|
617 |
-
'param_name' => 'deeplink',
|
618 |
-
'type' => 'aux_switch',
|
619 |
-
'value' => '0',
|
620 |
-
'class' => '',
|
621 |
-
'admin_label' => false,
|
622 |
-
'weight' => '',
|
623 |
-
'group' => '',
|
624 |
-
'edit_field_class' => ''
|
625 |
-
),
|
626 |
-
array(
|
627 |
-
'heading' => __('Deeplink slug', 'auxin-portfolio' ),
|
628 |
-
'description' => __('Specifies the deeplink slug value in address bar.', 'auxin-portfolio' ),
|
629 |
-
'param_name' => 'deeplink_slug',
|
630 |
-
'type' => 'textfield',
|
631 |
-
'value' => uniqid('portfolio-'),
|
632 |
-
'holder' => '',
|
633 |
-
'class' => '',
|
634 |
-
'admin_label' => false,
|
635 |
-
'dependency' => array(
|
636 |
-
'element' => 'deeplink',
|
637 |
-
'value' => '1'
|
638 |
-
),
|
639 |
-
'weight' => '',
|
640 |
-
'group' => '' ,
|
641 |
-
'edit_field_class' => ''
|
642 |
-
),
|
643 |
array(
|
644 |
'heading' => __('Paginate','auxin-portfolio' ),
|
645 |
'description' => __('Paginates the portfolio items', 'auxin-portfolio' ),
|
@@ -649,7 +582,7 @@ function auxin_get_recent_portfolios_master_array( $master_array ) {
|
|
649 |
'class' => '',
|
650 |
'admin_label' => false,
|
651 |
'weight' => '',
|
652 |
-
'group' => '',
|
653 |
'edit_field_class' => ''
|
654 |
),
|
655 |
array(
|
@@ -665,7 +598,7 @@ function auxin_get_recent_portfolios_master_array( $master_array ) {
|
|
665 |
'value' => '1'
|
666 |
),
|
667 |
'weight' => '',
|
668 |
-
'group' => '',
|
669 |
'edit_field_class' => ''
|
670 |
),
|
671 |
array(
|
@@ -804,6 +737,77 @@ function auxin_get_recent_portfolios_master_array( $master_array ) {
|
|
804 |
'group' => 'Layout',
|
805 |
'edit_field_class' => ''
|
806 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
807 |
array(
|
808 |
'heading' => __('Extra class name','auxin-portfolio' ),
|
809 |
'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'auxin-portfolio' ),
|
@@ -848,7 +852,6 @@ function auxin_widget_recent_portfolios_grid_callback( $atts, $shortcode_content
|
|
848 |
'exclude' => '', // exclude these post IDs from result. array or string comma separated
|
849 |
'posts_per_page' => -1,
|
850 |
'offset' => '',
|
851 |
-
'paged' => '',
|
852 |
'order_by' => 'date',
|
853 |
'order' => 'DESC',
|
854 |
'exclude_without_media' => 0,
|
@@ -870,7 +873,7 @@ function auxin_widget_recent_portfolios_grid_callback( $atts, $shortcode_content
|
|
870 |
'entry_border_color' => '',
|
871 |
'paginate' => 1,
|
872 |
'perpage' => 10,
|
873 |
-
'
|
874 |
'show_info' => 1,
|
875 |
'image_aspect_ratio' => 0.75,
|
876 |
'space' => 30,
|
@@ -878,18 +881,22 @@ function auxin_widget_recent_portfolios_grid_callback( $atts, $shortcode_content
|
|
878 |
'tablet_cnum' => 'inherit',
|
879 |
'phone_cnum' => '1',
|
880 |
'layout' => 'grid',
|
881 |
-
'tax_args' => '',
|
882 |
'tag' => '',
|
883 |
'extra_classes' => '',
|
884 |
'extra_column_classes' => '',
|
885 |
'custom_el_id' => '',
|
|
|
|
|
886 |
'universal_id' => '',
|
|
|
|
|
887 |
'reset_query' => true,
|
888 |
'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
|
889 |
'wp_query_args' => array(), // additional wp_query args
|
890 |
'loadmore_type' => '', // 'next' (more button), 'scroll', 'next-prev'
|
891 |
'loadmore_label' => 'text',
|
892 |
'loadmore_per_page' => '',
|
|
|
893 |
'base' => 'aux_recent_portfolios_grid',
|
894 |
'base_class' => 'aux-widget-recent-portfolios'
|
895 |
);
|
@@ -897,360 +904,33 @@ function auxin_widget_recent_portfolios_grid_callback( $atts, $shortcode_content
|
|
897 |
$result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
|
898 |
extract( $result['parsed_atts'] );
|
899 |
|
900 |
-
// Validate the boolean variables
|
901 |
-
$exclude_without_media = auxin_is_true( $exclude_without_media );
|
902 |
-
$display_like = auxin_is_true( $display_like );
|
903 |
-
$deeplink = auxin_is_true( $deeplink );
|
904 |
-
$show_filters = auxin_is_true( $show_filters );
|
905 |
-
$paginate = auxin_is_true( $paginate );
|
906 |
-
$show_title = auxin_is_true( $show_title );
|
907 |
-
$show_info = auxin_is_true( $show_info );
|
908 |
-
|
909 |
ob_start();
|
910 |
-
|
911 |
-
if( empty( $cat ) || $cat == " " || ( is_array( $cat ) && in_array( " ", $cat ) ) ) {
|
912 |
-
$tax_args = array();
|
913 |
-
} else {
|
914 |
-
$tax_args = array(
|
915 |
-
array(
|
916 |
-
'taxonomy' => 'portfolio-cat',
|
917 |
-
'field' => 'term_id',
|
918 |
-
'terms' => ! is_array( $cat ) ? explode( ",", $cat ) : $cat
|
919 |
-
)
|
920 |
-
);
|
921 |
-
}
|
922 |
-
|
923 |
-
global $wp_query;
|
924 |
-
|
925 |
-
if( ! $use_wp_query ) {
|
926 |
-
// create wp_query to get latest items -----------
|
927 |
-
$args = array(
|
928 |
-
'post_type' => 'portfolio',
|
929 |
-
'orderby' => $order_by,
|
930 |
-
'order' => $order,
|
931 |
-
'offset' => $offset,
|
932 |
-
'paged' => $paged,
|
933 |
-
'tax_query' => $tax_args,
|
934 |
-
'post_status' => 'publish',
|
935 |
-
'posts_per_page' => $num ? $num : -1,
|
936 |
-
'ignore_sticky_posts' => 1,
|
937 |
-
|
938 |
-
'include_posts__in' => $include, // include posts in this list
|
939 |
-
'posts__not_in' => $exclude, // exclude posts in this list
|
940 |
-
'posts__in' => $only_posts__in, // only posts in this list
|
941 |
-
|
942 |
-
'exclude_without_media' => $exclude_without_media
|
943 |
-
);
|
944 |
-
|
945 |
-
// ---------------------------------------------------------------------
|
946 |
-
|
947 |
-
// add the additional query args if available
|
948 |
-
if( $wp_query_args ){
|
949 |
-
$args = wp_parse_args( $args, $wp_query_args );
|
950 |
-
}
|
951 |
-
|
952 |
-
// pass the args through the auxin query parser
|
953 |
-
$wp_query = new WP_Query( auxin_parse_query_args( $args ) );
|
954 |
-
}
|
955 |
-
|
956 |
-
$post_counter = 0;
|
957 |
-
$items_classes = '';
|
958 |
-
$isoxin_attrs = '';
|
959 |
-
$item_classes = '';
|
960 |
-
$isotope_id = uniqid();
|
961 |
-
$phone_break_point = 767;
|
962 |
-
$crop = true;
|
963 |
-
$isotope_layout = 'fitRows';
|
964 |
-
$is_tiles = 'tiles' == $layout;
|
965 |
-
|
966 |
// widget header ------------------------------
|
967 |
echo $result['widget_header'];
|
968 |
echo $result['widget_title'];
|
969 |
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
$space = 0;
|
978 |
-
}
|
979 |
-
|
980 |
-
// check item style and define related variables
|
981 |
-
switch ( $item_style ) {
|
982 |
-
case 'classic-lightbox':
|
983 |
-
$frame_effect_classes = 'aux-frame-darken aux-frame-zoom';
|
984 |
-
$hover_classes = 'aux-hover-active aux-hover-twoway';
|
985 |
-
$show_lightbox = true;
|
986 |
-
$template_file = 'column';
|
987 |
-
break;
|
988 |
-
case 'classic-lightbox-boxed':
|
989 |
-
$frame_effect_classes = 'aux-frame-boxed-darken aux-frame-zoom';
|
990 |
-
$hover_classes = 'aux-hover-active aux-hover-twoway';
|
991 |
-
$show_lightbox = true;
|
992 |
-
$template_file = 'column';
|
993 |
-
break;
|
994 |
-
case 'overlay':
|
995 |
-
$frame_effect_classes = 'aux-frame-darken aux-frame-zoom';
|
996 |
-
$hover_classes = 'aux-hover-active';
|
997 |
-
$show_lightbox = false;
|
998 |
-
$template_file = 'column-overlay';
|
999 |
-
break;
|
1000 |
-
case 'overlay-boxed':
|
1001 |
-
$frame_effect_classes = 'aux-frame-boxed-darken' . ( $is_tiles ? '' : ' aux-frame-zoom');
|
1002 |
-
$hover_classes = 'aux-hover-active';
|
1003 |
-
$show_lightbox = false;
|
1004 |
-
$template_file = 'column-overlay';
|
1005 |
-
break;
|
1006 |
-
case 'overlay-lightbox':
|
1007 |
-
$frame_effect_classes = 'aux-frame-darken' . ( $is_tiles ? '' : ' aux-frame-zoom');
|
1008 |
-
$hover_classes = 'aux-hover-active aux-hover-twoway';
|
1009 |
-
$show_lightbox = true;
|
1010 |
-
$template_file = 'column-overlay';
|
1011 |
-
break;
|
1012 |
-
case 'overlay-lightbox-boxed':
|
1013 |
-
$frame_effect_classes = 'aux-frame-boxed-darken' . ( $is_tiles ? '' : ' aux-frame-zoom');
|
1014 |
-
$hover_classes = 'aux-hover-active aux-hover-twoway';
|
1015 |
-
$show_lightbox = true;
|
1016 |
-
$template_file = 'column-overlay';
|
1017 |
-
break;
|
1018 |
-
default:
|
1019 |
-
$frame_effect_classes = '';
|
1020 |
-
$hover_classes = '';
|
1021 |
-
$show_lightbox = false;
|
1022 |
-
$template_file = 'column';
|
1023 |
-
}
|
1024 |
-
|
1025 |
-
// generate columns class
|
1026 |
-
if ( $is_tiles ) {
|
1027 |
-
$items_classes = 'aux-tiles-layout aux-ajax-view aux-isotope-animated aux-portfolio-columns';
|
1028 |
-
$column_media_width = auxin_get_content_column_width( 4, $space, $content_width );
|
1029 |
-
} else {
|
1030 |
-
$tablet_cnum = ('inherit' == $tablet_cnum ) ? $desktop_cnum : $tablet_cnum ;
|
1031 |
-
// $tablet_cnum = 'inherit' != $tablet_cnum ? $tablet_cnum : $desktop_cnum;
|
1032 |
-
// $phone_cnum = 'inherit' != $phone_cnum ? $phone_cnum : $tablet_cnum;
|
1033 |
-
|
1034 |
-
$items_classes = 'aux-isotope-layout aux-ajax-view aux-layout-grid aux-isotope-animated aux-no-gutter aux-portfolio-columns aux-row';
|
1035 |
-
$items_classes .= ' aux-de-col' . $desktop_cnum;
|
1036 |
-
$items_classes .= ' aux-tb-col' . $tablet_cnum;
|
1037 |
-
$items_classes .= ' aux-mb-col' . $phone_cnum;
|
1038 |
-
$items_classes .= 'grid' === $layout ? ' aux-match-height' : '';
|
1039 |
-
$column_media_width = auxin_get_content_column_width( $desktop_cnum, $space, $content_width );
|
1040 |
-
$column_media_height = 'masonry' == $layout ? 0 : $column_media_width * $image_aspect_ratio;
|
1041 |
-
}
|
1042 |
-
|
1043 |
-
if ( $show_lightbox ) {
|
1044 |
-
$items_classes .= ' aux-lightbox-gallery';
|
1045 |
-
}
|
1046 |
-
|
1047 |
-
// apply boxed style to items
|
1048 |
-
if( ! empty( $called_from ) && 'elementor' == $called_from ){
|
1049 |
-
$is_boxed = false;
|
1050 |
-
} else {
|
1051 |
-
$is_boxed = in_array( $item_style, array( 'classic', 'classic-lightbox', 'classic-lightbox-boxed' ) ) && ( $entry_background_color || $entry_border_color );
|
1052 |
-
}
|
1053 |
-
|
1054 |
-
$isoxin_attrs = 'data-lazyload="true" data-space="'.esc_attr( $space ).'" data-pagination="'. ( $paginate ? 'true' : 'false' ) . '" data-deeplink="'. ( $deeplink ? 'true' : 'false' ) . '"';
|
1055 |
-
$isoxin_attrs .= ' data-slug="'. esc_attr( $deeplink_slug ).'" data-perpage="'.esc_attr( $perpage ).'" data-layout="'.esc_attr( $isotope_layout ).'"';
|
1056 |
-
$isoxin_attrs .= ' data-reveal-transition-duration="'. esc_attr( $reveal_transition_duration ).'" data-reveal-between-delay="'.esc_attr( $reveal_between_delay ).'"';
|
1057 |
-
$isoxin_attrs .= ' data-hide-transition-duration="'. esc_attr( $hide_transition_duration ).'" data-hide-between-delay="'.esc_attr( $hide_between_delay ).'"';
|
1058 |
-
|
1059 |
-
$have_posts = $wp_query->have_posts();
|
1060 |
-
|
1061 |
-
if( $have_posts ){
|
1062 |
-
|
1063 |
-
// show filters
|
1064 |
-
if ( $show_filters && ! $skip_wrappers ) {
|
1065 |
-
|
1066 |
-
$terms = get_terms(
|
1067 |
-
array(
|
1068 |
-
'taxonomy' => $filter_by,
|
1069 |
-
'meta_query' => array(
|
1070 |
-
'relation' => 'OR',
|
1071 |
-
array(
|
1072 |
-
'meta_key' => 'tax_position',
|
1073 |
-
)
|
1074 |
-
),
|
1075 |
-
'orderby' => 'tax_position',
|
1076 |
-
'hide_empty' => true
|
1077 |
-
)
|
1078 |
-
);
|
1079 |
-
|
1080 |
-
|
1081 |
-
if ( $terms ) {
|
1082 |
-
|
1083 |
-
$list_output = '<ul>';
|
1084 |
-
$list_output .= '<li class="aux-active-item" data-filter="all"><a href="#"><span data-select="' . __('all', 'auxin-portfolio') . '">' . __('all', 'auxin-portfolio') . '</span></a></li>';
|
1085 |
-
|
1086 |
-
foreach ( $terms as $term ) {
|
1087 |
-
if( $filter_by === "portfolio-cat" ) {
|
1088 |
-
|
1089 |
-
if( (! is_array( $cat) ) && !( empty( $cat ) || $cat == " " ) ) {
|
1090 |
-
$cat = array( $cat );
|
1091 |
-
}
|
1092 |
-
|
1093 |
-
if ( ( empty( $cat ) || $cat == " " || ( is_array( $cat ) && in_array( " ", $cat ) ) ) || in_array( $term->term_id, $cat ) ) {
|
1094 |
-
$list_output .= '<li data-filter="'.$term->slug.'"><a href="#"><span data-select="'.$term->name.'">'.$term->name.'</span></a></li>';
|
1095 |
-
}
|
1096 |
-
} else {
|
1097 |
-
$list_output .= '<li data-filter="'.$term->slug.'"><a href="#"><span data-select="'.$term->name.'">'.$term->name.'</span></a></li>';
|
1098 |
-
}
|
1099 |
-
}
|
1100 |
-
|
1101 |
-
$output_classes = 'aux-isotope-filters aux-filters ' . $filter_style . ' ' . $filter_align . ' ';
|
1102 |
-
$output_classes .= 'aux-dropdown-filter' != $filter_style ? 'aux-togglable ': '';
|
1103 |
-
|
1104 |
-
$filter_output = '<div class="' . esc_attr( trim( $output_classes ) ) . '" data-isotope-id="' . esc_attr( $isotope_id ) . '">' ;
|
1105 |
-
$filter_output .= 'aux-dropdown-filter' != $filter_style ? '<div class="aux-select-overlay"></div>': '';
|
1106 |
-
$filter_output .= 'aux-dropdown-filter' === $filter_style ? '<span class="aux-filter-by"> ' . __('Category:', 'auxin-portfolio') . ' <span class="aux-filter-name"> ' . __('all', 'auxin-portfolio') . ' </span></span>': '';
|
1107 |
-
$filter_output .= $list_output . '</ul>';
|
1108 |
-
$filter_output .= '</div>';
|
1109 |
-
|
1110 |
-
echo $filter_output;
|
1111 |
-
}
|
1112 |
-
|
1113 |
-
}
|
1114 |
-
|
1115 |
-
echo ! $skip_wrappers ? sprintf( '<div id="%s" data-element-id="%s" class="%s" %s> %s', esc_attr( $isotope_id ), esc_attr( $universal_id ), esc_attr( $items_classes ), $isoxin_attrs, '<div class="aux-items-loading"><div class="aux-loading-loop"><svg class="aux-circle" width="100%" height="100%" viewBox="0 0 42 42"><circle class="aux-stroke-bg" r="20" cx="21" cy="21" fill="none"></circle><circle class="aux-progress" r="20" cx="21" cy="21" fill="none" transform="rotate(-90 21 21)"></circle></svg></div></div>' ) : '';
|
1116 |
-
|
1117 |
-
while ( $wp_query->have_posts() ) {
|
1118 |
-
|
1119 |
-
// break the loop if it is reached to the limit
|
1120 |
-
if ( ! $num || $post_counter < $num ) {
|
1121 |
-
$post_counter ++;
|
1122 |
-
} else {
|
1123 |
-
break;
|
1124 |
-
}
|
1125 |
-
|
1126 |
-
$wp_query->the_post();
|
1127 |
-
$post = $wp_query->post;
|
1128 |
-
$item_classes = '';
|
1129 |
-
|
1130 |
-
if ( $is_tiles ) {
|
1131 |
-
$item_pattern_info = auxin_get_tile_pattern( $tile_style_pattern, $post_counter - 1, $column_media_width );
|
1132 |
-
$post_vars = auxpfo_get_portfolio_config(
|
1133 |
-
$post,
|
1134 |
array(
|
1135 |
-
'
|
1136 |
-
'media_width' => $phone_break_point,
|
1137 |
-
'media_size' => $item_pattern_info['size'],
|
1138 |
-
'upscale_image' => true,
|
1139 |
-
'preloadable' => true,
|
1140 |
-
'preload_preview' => false,
|
1141 |
-
'crop' => true,
|
1142 |
-
'add_image_hw' => true, // whether add width and height attr or not
|
1143 |
-
'image_sizes' => $item_pattern_info['image_sizes'],
|
1144 |
-
'srcset_sizes' => $item_pattern_info['srcset_sizes']
|
1145 |
)
|
1146 |
-
)
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
$post_vars = auxpfo_get_portfolio_config(
|
1152 |
-
$post,
|
1153 |
-
array(
|
1154 |
-
'request_from' => 'archive',
|
1155 |
-
'media_width' => $phone_break_point,
|
1156 |
-
'media_size' => array( 'width' => $column_media_width, 'height' => $column_media_height ),
|
1157 |
-
'preloadable' => null, // pass null to disable lazyloading while respecting the "sizes" => "auto"
|
1158 |
-
'preload_preview' => false,
|
1159 |
-
'crop' => $crop,
|
1160 |
-
'add_image_hw' => true, // whether add width and height attr or not
|
1161 |
-
'image_sizes' => 'auto',
|
1162 |
-
'srcset_sizes' => 'auto'
|
1163 |
-
)
|
1164 |
-
);
|
1165 |
-
$item_classes = 'aux-col';
|
1166 |
-
$item_inner_classes = '';
|
1167 |
-
}
|
1168 |
-
|
1169 |
-
unset( $post_vars['show_title'] );
|
1170 |
-
|
1171 |
-
extract( $post_vars );
|
1172 |
-
|
1173 |
-
if ( !$has_attach ) {
|
1174 |
-
$post_counter --;
|
1175 |
-
continue;
|
1176 |
-
}
|
1177 |
-
|
1178 |
-
if ( $show_filters ) {
|
1179 |
-
$filters = wp_get_post_terms( $post->ID, $filter_by );
|
1180 |
-
foreach ( $filters as $filter ) {
|
1181 |
-
$item_classes .= ' '. $filter->slug;
|
1182 |
-
}
|
1183 |
-
}
|
1184 |
-
|
1185 |
-
// boxed appearance
|
1186 |
-
if ( $is_boxed ) {
|
1187 |
-
$item_classes .= ' aux-entry-boxed';
|
1188 |
-
}
|
1189 |
-
|
1190 |
-
if( ! empty( $loadmore_type ) ) {
|
1191 |
-
$item_classes .= ' aux-ajax-item';
|
1192 |
-
}
|
1193 |
-
|
1194 |
-
$lightbox_attrs = 'data-elementor-open-lightbox="no" ';
|
1195 |
-
// Lightbox attributes
|
1196 |
-
if ( $show_lightbox ) {
|
1197 |
-
$attach_id = get_post_thumbnail_id($post->ID);
|
1198 |
-
$image_primary_meta = wp_get_attachment_metadata( $attach_id );
|
1199 |
-
$lightbox_attrs .= 'data-original-width="' . $image_primary_meta['width'] . '" data-original-height="' . $image_primary_meta['height'] . '" ' .
|
1200 |
-
'data-caption="' . auxin_attachment_caption( $attach_id ) . '"';
|
1201 |
-
}
|
1202 |
-
|
1203 |
-
if ( $paginate && $post_counter > $perpage ) {
|
1204 |
-
?><div class="aux-iso-item aux-iso-hidden aux-loading <?php echo $item_classes; ?>"><?php
|
1205 |
-
} else {
|
1206 |
-
?><div class="aux-iso-item aux-loading <?php echo $item_classes; ?>"><?php
|
1207 |
-
}
|
1208 |
-
include auxin_get_template_file( 'theme-parts/entry/portfolio', $template_file, AUXPFO()->template_path() );
|
1209 |
-
?></div><?php
|
1210 |
-
}
|
1211 |
-
|
1212 |
-
if( ! $skip_wrappers ) {
|
1213 |
-
// End tag for aux-ajax-view wrapper
|
1214 |
-
echo '</div>';
|
1215 |
-
// Execute load more functionality
|
1216 |
-
if( $wp_query->found_posts > $loadmore_per_page ) {
|
1217 |
-
echo auxin_get_load_more_controller( $loadmore_type, $loadmore_label );
|
1218 |
-
}
|
1219 |
-
|
1220 |
-
} else {
|
1221 |
-
// Get post counter in the query
|
1222 |
-
echo '<span class="aux-post-count hidden">'.$wp_query->post_count.'</span>';
|
1223 |
-
}
|
1224 |
-
|
1225 |
-
if ( $is_boxed ) {
|
1226 |
-
// Set background color style
|
1227 |
-
$entry_background_color = $entry_background_color ? "background-color: $entry_background_color;" : '';
|
1228 |
-
// Set border color style
|
1229 |
-
$entry_border_color = $entry_border_color ? "border-color: $entry_border_color;" : '';
|
1230 |
-
|
1231 |
-
if ( !empty( $entry_background_color ) || !empty( $entry_border_color ) ) {
|
1232 |
-
echo sprintf(
|
1233 |
-
'<style>
|
1234 |
-
.page .aux-widget-recent-portfolios .entry-main { %s %s }
|
1235 |
-
</style>',
|
1236 |
-
$entry_background_color,
|
1237 |
-
$entry_border_color
|
1238 |
-
);
|
1239 |
-
}
|
1240 |
-
}
|
1241 |
-
|
1242 |
-
} // End if have_posts
|
1243 |
-
|
1244 |
|
1245 |
-
if( $reset_query ){
|
1246 |
-
wp_reset_query();
|
1247 |
}
|
1248 |
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
return false;
|
1253 |
-
}
|
1254 |
|
1255 |
// widget footer ------------------------------
|
1256 |
echo $result['widget_footer'];
|
65 |
'class' => 'cat',
|
66 |
'value' => ' ', // should use the taxonomy name
|
67 |
'admin_label' => false,
|
68 |
+
'dependency' => array(
|
69 |
+
'element' => 'filter_by',
|
70 |
+
'value' => array( 'portfolio-cat' )
|
71 |
+
),
|
72 |
'weight' => '',
|
73 |
'group' => 'Query',
|
74 |
'edit_field_class' => ''
|
415 |
'overlay-lightbox-boxed' => __('Overlay title with lightbox style 2', 'auxin-portfolio' ),
|
416 |
)
|
417 |
),
|
418 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
419 |
array(
|
420 |
'heading' => __('Show filters','auxin-portfolio' ),
|
421 |
'description' => '',
|
452 |
'heading' => __('Filter Control Alignment', 'auxin-portfolio'),
|
453 |
'param_name' => 'filter_align',
|
454 |
'type' => 'aux_visual_select',
|
455 |
+
'def_value' => 'aux-left',
|
456 |
'holder' => '',
|
457 |
'choices' => array(
|
458 |
'aux-left' => array(
|
481 |
'description' => __('Style of filter buttons.', 'auxin-portfolio' ),
|
482 |
'param_name' => 'filter_style',
|
483 |
'type' => 'aux_visual_select',
|
484 |
+
'def_value' => 'slideup',
|
485 |
'holder' => '',
|
486 |
'dependency' => array(
|
487 |
'element' => 'show_filters',
|
491 |
'group' => 'Filter',
|
492 |
'edit_field_class' => '',
|
493 |
'choices' => array(
|
494 |
+
'slideup' => array(
|
495 |
'label' => __('Slide up' , 'auxin-portfolio'),
|
496 |
'video_src' => AUXPFO_ADMIN_URL . '/assets/images/preview/FilterSlideUp2.webm webm'
|
497 |
),
|
498 |
+
'fill' => array(
|
499 |
'label' => __('Fill' , 'auxin-portfolio'),
|
500 |
'video_src' => AUXPFO_ADMIN_URL . '/assets/images/preview/FilterFill.webm webm'
|
501 |
),
|
502 |
+
'cube' => array(
|
503 |
'label' => __('Cube' , 'auxin-portfolio'),
|
504 |
'video_src' => AUXPFO_ADMIN_URL . '/assets/images/preview/FilterCube.webm webm'
|
505 |
),
|
506 |
+
'underline' => array(
|
507 |
'label' => __('Underline' , 'auxin-portfolio'),
|
508 |
'video_src' => AUXPFO_ADMIN_URL . '/assets/images/preview/FilterUnderline.mp4 mp4'
|
509 |
),
|
510 |
+
'overlay' => array(
|
511 |
'label' => __('Float frame' , 'auxin-portfolio'),
|
512 |
'video_src' => AUXPFO_ADMIN_URL . '/assets/images/preview/FilterFloatFrame.webm webm'
|
513 |
),
|
514 |
+
'bordered' => array(
|
515 |
'label' => __('Borderd' , 'auxin-portfolio'),
|
516 |
'video_src' => AUXPFO_ADMIN_URL . '/assets/images/preview/FilterBordered.mp4 mp4'
|
517 |
),
|
518 |
+
'underline-anim' => array(
|
519 |
'label' => __('Float underline' , 'auxin-portfolio'),
|
520 |
'video_src' => AUXPFO_ADMIN_URL . '/assets/images/preview/FilterUnderline.webm webm'
|
521 |
),
|
522 |
+
'dropdown' => array(
|
523 |
+
'label' => __('Dropdown' , 'auxin-portfolio'),
|
524 |
'video_src' => AUXPFO_ADMIN_URL . '/assets/images/preview/FilterUnderline.webm webm'
|
525 |
),
|
526 |
),
|
573 |
'group' => __('Transitions', 'auxin-portfolio'),
|
574 |
'edit_field_class' => ''
|
575 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
576 |
array(
|
577 |
'heading' => __('Paginate','auxin-portfolio' ),
|
578 |
'description' => __('Paginates the portfolio items', 'auxin-portfolio' ),
|
582 |
'class' => '',
|
583 |
'admin_label' => false,
|
584 |
'weight' => '',
|
585 |
+
'group' => 'Paginate',
|
586 |
'edit_field_class' => ''
|
587 |
),
|
588 |
array(
|
598 |
'value' => '1'
|
599 |
),
|
600 |
'weight' => '',
|
601 |
+
'group' => 'Paginate',
|
602 |
'edit_field_class' => ''
|
603 |
),
|
604 |
array(
|
737 |
'group' => 'Layout',
|
738 |
'edit_field_class' => ''
|
739 |
),
|
740 |
+
array(
|
741 |
+
'heading' => __('Insert portfolio title','auxin-portfolio' ),
|
742 |
+
'description' => '',
|
743 |
+
'param_name' => 'display_title',
|
744 |
+
'type' => 'aux_switch',
|
745 |
+
'value' => '1',
|
746 |
+
'class' => '',
|
747 |
+
'admin_label' => false,
|
748 |
+
'dependency' => '',
|
749 |
+
'weight' => '',
|
750 |
+
'group' => 'Layout',
|
751 |
+
'edit_field_class' => ''
|
752 |
+
),
|
753 |
+
array(
|
754 |
+
'heading' => __('Insert portfolio meta','auxin-portfolio' ),
|
755 |
+
'description' => '',
|
756 |
+
'param_name' => 'show_info',
|
757 |
+
'type' => 'aux_switch',
|
758 |
+
'value' => '1',
|
759 |
+
'class' => '',
|
760 |
+
'admin_label' => false,
|
761 |
+
'weight' => '',
|
762 |
+
'group' => 'Layout',
|
763 |
+
'edit_field_class' => ''
|
764 |
+
),
|
765 |
+
array(
|
766 |
+
'heading' => __('Display like button','auxin-portfolio' ),
|
767 |
+
'description' => sprintf(__('Enable it to display %s like button%s on gride template blog. Please note WP Ulike plugin needs to be activaited to use this option.', 'auxin-portfolio'), '<strong>', '</strong>'),
|
768 |
+
'param_name' => 'display_like',
|
769 |
+
'type' => 'aux_switch',
|
770 |
+
'value' => '1',
|
771 |
+
'holder' => '',
|
772 |
+
'class' => 'display_like',
|
773 |
+
'admin_label' => false,
|
774 |
+
'dependency' => array(
|
775 |
+
'element' => 'item_style',
|
776 |
+
'value' => array( 'classic', 'classic-lightbox', 'classic-lightbox-boxed' )
|
777 |
+
),
|
778 |
+
'weight' => '',
|
779 |
+
'group' => 'Layout',
|
780 |
+
'edit_field_class' => ''
|
781 |
+
),
|
782 |
+
array(
|
783 |
+
'heading' => __('Deeplink', 'auxin-portfolio' ),
|
784 |
+
'description' => __('Enables the deeplink feature, it updates URL based on page and filter status.', 'auxin-portfolio' ),
|
785 |
+
'param_name' => 'deeplink',
|
786 |
+
'type' => 'aux_switch',
|
787 |
+
'value' => '0',
|
788 |
+
'class' => '',
|
789 |
+
'admin_label' => false,
|
790 |
+
'weight' => '',
|
791 |
+
'group' => 'Layout',
|
792 |
+
'edit_field_class' => ''
|
793 |
+
),
|
794 |
+
array(
|
795 |
+
'heading' => __('Deeplink slug', 'auxin-portfolio' ),
|
796 |
+
'description' => __('Specifies the deeplink slug value in address bar.', 'auxin-portfolio' ),
|
797 |
+
'param_name' => 'deeplink_slug',
|
798 |
+
'type' => 'textfield',
|
799 |
+
'value' => uniqid('portfolio-'),
|
800 |
+
'holder' => '',
|
801 |
+
'class' => '',
|
802 |
+
'admin_label' => false,
|
803 |
+
'dependency' => array(
|
804 |
+
'element' => 'deeplink',
|
805 |
+
'value' => '1'
|
806 |
+
),
|
807 |
+
'weight' => '',
|
808 |
+
'group' => 'Layout' ,
|
809 |
+
'edit_field_class' => ''
|
810 |
+
),
|
811 |
array(
|
812 |
'heading' => __('Extra class name','auxin-portfolio' ),
|
813 |
'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'auxin-portfolio' ),
|
852 |
'exclude' => '', // exclude these post IDs from result. array or string comma separated
|
853 |
'posts_per_page' => -1,
|
854 |
'offset' => '',
|
|
|
855 |
'order_by' => 'date',
|
856 |
'order' => 'DESC',
|
857 |
'exclude_without_media' => 0,
|
873 |
'entry_border_color' => '',
|
874 |
'paginate' => 1,
|
875 |
'perpage' => 10,
|
876 |
+
'display_title' => true,
|
877 |
'show_info' => 1,
|
878 |
'image_aspect_ratio' => 0.75,
|
879 |
'space' => 30,
|
881 |
'tablet_cnum' => 'inherit',
|
882 |
'phone_cnum' => '1',
|
883 |
'layout' => 'grid',
|
|
|
884 |
'tag' => '',
|
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
|
896 |
'loadmore_type' => '', // 'next' (more button), 'scroll', 'next-prev'
|
897 |
'loadmore_label' => 'text',
|
898 |
'loadmore_per_page' => '',
|
899 |
+
'term_field' => 'slug',
|
900 |
'base' => 'aux_recent_portfolios_grid',
|
901 |
'base_class' => 'aux-widget-recent-portfolios'
|
902 |
);
|
904 |
$result = auxin_get_widget_scafold( $atts, $default_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 ( $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 |
|
931 |
+
include_once auxin_get_template_file( $template_part_file, '', $extra_template_path );
|
932 |
+
echo auxin_recent_portfolio( $result['parsed_atts'] );
|
933 |
+
echo '<script type="text/javascript">var ' . $universal_id . 'AjaxConfig = ' . wp_json_encode( $result['parsed_atts'] ) . ';</script>';
|
|
|
|
|
934 |
|
935 |
// widget footer ------------------------------
|
936 |
echo $result['widget_footer'];
|
public/assets/js/portfolio.js
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! Auxin portfolio - v1.7.2 (2018-09-03)
|
2 |
+
* All required plugins
|
3 |
+
* http://averta.net/phlox/
|
4 |
+
*/
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
/*!
|
9 |
+
*
|
10 |
+
* ================== public/assets/js/src/init.general.js ===================
|
11 |
+
**/
|
12 |
+
|
13 |
+
;(function($){
|
14 |
+
// on document ready
|
15 |
+
var filterList = $('.aux-widget-recent-portfolios .aux-ajax-filters li[data-filter]');
|
16 |
+
|
17 |
+
filterList.on('click', function(e) {
|
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'),
|
25 |
+
taxonomy: $container.data('taxonomy'),
|
26 |
+
num : $container.data('num'),
|
27 |
+
order : $container.data('order'),
|
28 |
+
orderby : $container.data('orderby'),
|
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 |
+
|
51 |
+
});
|
52 |
+
|
53 |
+
});
|
54 |
+
|
55 |
+
})(jQuery);
|
public/assets/js/portfolio.min.js
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! Auxin portfolio - v1.7.2 (2018-09-03)
|
2 |
+
* All required plugins
|
3 |
+
* http://averta.net/phlox/
|
4 |
+
*/
|
5 |
+
/*!
|
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);
|
public/assets/js/src/init.general.js
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function($){
|
2 |
+
// on document ready
|
3 |
+
var filterList = $('.aux-widget-recent-portfolios .aux-ajax-filters li[data-filter]');
|
4 |
+
|
5 |
+
filterList.on('click', function(e) {
|
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'),
|
13 |
+
taxonomy: $container.data('taxonomy'),
|
14 |
+
num : $container.data('num'),
|
15 |
+
order : $container.data('order'),
|
16 |
+
orderby : $container.data('orderby'),
|
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 |
+
|
39 |
+
});
|
40 |
+
|
41 |
+
});
|
42 |
+
|
43 |
+
})(jQuery);
|
public/includes/class-auxpfo-frontend-assets.php
CHANGED
@@ -20,8 +20,21 @@ class AUXPFO_Frontend_Assets {
|
|
20 |
* Construct
|
21 |
*/
|
22 |
public function __construct() {
|
|
|
23 |
add_action( 'wp_enqueue_scripts', array( $this, 'load_styles' ) );
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
/**
|
27 |
* Styles for admin
|
@@ -41,7 +54,7 @@ class AUXPFO_Frontend_Assets {
|
|
41 |
* @return void
|
42 |
*/
|
43 |
public function load_scripts() {
|
44 |
-
|
45 |
}
|
46 |
|
47 |
}
|
20 |
* Construct
|
21 |
*/
|
22 |
public function __construct() {
|
23 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'load_scripts' ) );
|
24 |
add_action( 'wp_enqueue_scripts', array( $this, 'load_styles' ) );
|
25 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'localize_scripts' ) );
|
26 |
+
}
|
27 |
+
|
28 |
+
public function localize_scripts() {
|
29 |
+
wp_localize_script( AUXPFO_SLUG .'-portfolio', 'auxpfo', array(
|
30 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
31 |
+
'invalid_required' => __( 'This is a required field', 'auxin-portfolio' ),
|
32 |
+
'invalid_postcode' => __( 'Zipcode must be digits', 'auxin-portfolio' ),
|
33 |
+
'invalid_phonenum' => __( 'Enter a valid phone number', 'auxin-portfolio' ),
|
34 |
+
'invalid_emailadd' => __( 'Enter a valid email address', 'auxin-portfolio' )
|
35 |
+
)
|
36 |
+
);
|
37 |
+
}
|
38 |
|
39 |
/**
|
40 |
* Styles for admin
|
54 |
* @return void
|
55 |
*/
|
56 |
public function load_scripts() {
|
57 |
+
wp_enqueue_script( AUXPFO_SLUG .'-portfolio', AUXPFO_PUB_URL . '/assets/js/portfolio.js', array('jquery'), AUXPFO_VERSION, true );
|
58 |
}
|
59 |
|
60 |
}
|
public/templates/elements/recent-portfolio.php
ADDED
@@ -0,0 +1,356 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function auxin_recent_portfolio( $args= array() ) {
|
3 |
+
|
4 |
+
global $post;
|
5 |
+
|
6 |
+
$defaults = array (
|
7 |
+
'title' => '', // header title
|
8 |
+
'cat' => ' ',
|
9 |
+
'num' => '8', // max generated entry
|
10 |
+
'only_posts__in' => '', // display only these post IDs. array or string comma separated
|
11 |
+
'include' => '', // include these post IDs in result too. array or string comma separated
|
12 |
+
'exclude' => '', // exclude these post IDs from result. array or string comma separated
|
13 |
+
'posts_per_page' => -1,
|
14 |
+
'offset' => '',
|
15 |
+
'order_by' => 'date',
|
16 |
+
'order' => 'DESC',
|
17 |
+
'exclude_without_media' => 0,
|
18 |
+
'display_like' => 1,
|
19 |
+
'deeplink' => 0,
|
20 |
+
'deeplink_slug' => uniqid('portfolio-'),
|
21 |
+
'show_filters' => 1,
|
22 |
+
'filter_by' => 'portfolio-filter',
|
23 |
+
'filter_style' => 'aux-slideup',
|
24 |
+
'filter_align' => 'aux-left',
|
25 |
+
'reveal_transition_duration' => '600',
|
26 |
+
'reveal_between_delay' => '60',
|
27 |
+
'hide_transition_duration' => '600',
|
28 |
+
'hide_between_delay' => '30',
|
29 |
+
'item_style' => 'classic',
|
30 |
+
'tile_style_pattern' => 'default',
|
31 |
+
'tiles_item_style' => 'overlay',
|
32 |
+
'entry_background_color' => '',
|
33 |
+
'entry_border_color' => '',
|
34 |
+
'paginate' => 1,
|
35 |
+
'perpage' => 10,
|
36 |
+
'display_title' => 1,
|
37 |
+
'show_info' => 1,
|
38 |
+
'image_aspect_ratio' => 0.75,
|
39 |
+
'space' => 30,
|
40 |
+
'desktop_cnum' => 4,
|
41 |
+
'tablet_cnum' => 'inherit',
|
42 |
+
'phone_cnum' => '1',
|
43 |
+
'layout' => 'grid',
|
44 |
+
'tag' => '',
|
45 |
+
'content_width' => '',
|
46 |
+
'skip_wrappers' => '',
|
47 |
+
'extra_classes' => '',
|
48 |
+
'extra_column_classes' => '',
|
49 |
+
'custom_el_id' => '',
|
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
|
57 |
+
'wp_query_args' => array(), // additional wp_query args
|
58 |
+
'loadmore_type' => '', // 'next' (more button), 'scroll', 'next-prev'
|
59 |
+
'loadmore_label' => 'text',
|
60 |
+
'loadmore_per_page' => '',
|
61 |
+
'term_field' => 'slug',
|
62 |
+
'base' => 'aux_recent_portfolios_grid',
|
63 |
+
'base_class' => 'aux-widget-recent-portfolios',
|
64 |
+
|
65 |
+
);
|
66 |
+
|
67 |
+
$args = wp_parse_args( $args, $defaults );
|
68 |
+
extract( $args );
|
69 |
+
|
70 |
+
$isotope_id = uniqid();
|
71 |
+
$wrapper_classes = 'aux-portfolio-columns aux-ajax-view aux-isotope-animated ';
|
72 |
+
$is_tiles = false;
|
73 |
+
$is_masonry = false;
|
74 |
+
$is_grid = false;
|
75 |
+
$crop = true;
|
76 |
+
$output = '';
|
77 |
+
$post_counter = 0;
|
78 |
+
$item_classes = '';
|
79 |
+
|
80 |
+
$tablet_cnum = ('inherit' == $tablet_cnum ) ? $desktop_cnum : $tablet_cnum ;
|
81 |
+
$resp_classes = ' aux-de-col' . $desktop_cnum;
|
82 |
+
$resp_classes .= ' aux-tb-col' . $tablet_cnum;
|
83 |
+
$resp_classes .= ' aux-mb-col' . $phone_cnum;
|
84 |
+
|
85 |
+
$column_media_width = auxin_get_content_column_width( $desktop_cnum, $space, $content_width );
|
86 |
+
|
87 |
+
if( ! empty( $called_from ) && 'elementor' == $called_from ){
|
88 |
+
$is_boxed = false;
|
89 |
+
} else {
|
90 |
+
$is_boxed = in_array( $item_style, array( 'classic', 'classic-lightbox', 'classic-lightbox-boxed' ) ) && ( $entry_background_color || $entry_border_color );
|
91 |
+
}
|
92 |
+
|
93 |
+
switch( $layout ) {
|
94 |
+
case 'masonry':
|
95 |
+
$is_masonry = true;
|
96 |
+
$isotope_layout = 'masonry';
|
97 |
+
$wrapper_classes .= 'aux-isotope-layout aux-layout-grid aux-no-gutter aux-row' . $resp_classes ;
|
98 |
+
$crop = false;
|
99 |
+
$column_media_height = 0;
|
100 |
+
break;
|
101 |
+
case 'grid':
|
102 |
+
$is_grid = true;
|
103 |
+
$isotope_layout = 'fitRows';
|
104 |
+
$wrapper_classes .= 'aux-isotope-layout aux-layout-grid aux-no-gutter aux-row aux-match-height' . $resp_classes;
|
105 |
+
$column_media_height = $column_media_width * $image_aspect_ratio;
|
106 |
+
|
107 |
+
break;
|
108 |
+
case 'tiles':
|
109 |
+
$is_tiles = true;
|
110 |
+
$isotope_layout = 'packery';
|
111 |
+
$wrapper_classes .= 'aux-tiles-layout';
|
112 |
+
$item_style = $tiles_item_style;
|
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;
|
120 |
+
$isotope_layout = 'fitRows';
|
121 |
+
break;
|
122 |
+
}
|
123 |
+
|
124 |
+
// check item style and define related variables
|
125 |
+
switch ( $item_style ) {
|
126 |
+
case 'classic-lightbox':
|
127 |
+
$frame_effect_classes = 'aux-frame-darken aux-frame-zoom';
|
128 |
+
$hover_classes = 'aux-hover-active aux-hover-twoway';
|
129 |
+
$show_lightbox = true;
|
130 |
+
$template_file = 'column';
|
131 |
+
break;
|
132 |
+
case 'classic-lightbox-boxed':
|
133 |
+
$frame_effect_classes = 'aux-frame-boxed-darken aux-frame-zoom';
|
134 |
+
$hover_classes = 'aux-hover-active aux-hover-twoway';
|
135 |
+
$show_lightbox = true;
|
136 |
+
$template_file = 'column';
|
137 |
+
break;
|
138 |
+
case 'overlay':
|
139 |
+
$frame_effect_classes = 'aux-frame-darken aux-frame-zoom';
|
140 |
+
$hover_classes = 'aux-hover-active';
|
141 |
+
$show_lightbox = false;
|
142 |
+
$template_file = 'column-overlay';
|
143 |
+
break;
|
144 |
+
case 'overlay-boxed':
|
145 |
+
$frame_effect_classes = 'aux-frame-boxed-darken' . ( $is_tiles ? '' : ' aux-frame-zoom');
|
146 |
+
$hover_classes = 'aux-hover-active';
|
147 |
+
$show_lightbox = false;
|
148 |
+
$template_file = 'column-overlay';
|
149 |
+
break;
|
150 |
+
case 'overlay-lightbox':
|
151 |
+
$frame_effect_classes = 'aux-frame-darken' . ( $is_tiles ? '' : ' aux-frame-zoom');
|
152 |
+
$hover_classes = 'aux-hover-active aux-hover-twoway';
|
153 |
+
$show_lightbox = true;
|
154 |
+
$template_file = 'column-overlay';
|
155 |
+
break;
|
156 |
+
case 'overlay-lightbox-boxed':
|
157 |
+
$frame_effect_classes = 'aux-frame-boxed-darken' . ( $is_tiles ? '' : ' aux-frame-zoom');
|
158 |
+
$hover_classes = 'aux-hover-active aux-hover-twoway';
|
159 |
+
$show_lightbox = true;
|
160 |
+
$template_file = 'column-overlay';
|
161 |
+
break;
|
162 |
+
default:
|
163 |
+
$frame_effect_classes = '';
|
164 |
+
$hover_classes = '';
|
165 |
+
$show_lightbox = false;
|
166 |
+
$template_file = 'column';
|
167 |
+
}
|
168 |
+
|
169 |
+
// Isotope Attributes
|
170 |
+
$isoxin_attrs = 'data-lazyload="true" data-space="'.esc_attr( $space ).'" data-pagination="'. ( $paginate ? 'true' : 'false' ) . '" data-deeplink="'. ( $deeplink ? 'true' : 'false' ) . '"';
|
171 |
+
$isoxin_attrs .= ' data-slug="'. esc_attr( $deeplink_slug ).'" data-perpage="'.esc_attr( $perpage ).'" data-layout="'.esc_attr( $isotope_layout ).'"';
|
172 |
+
$isoxin_attrs .= ' data-reveal-transition-duration="'. esc_attr( $reveal_transition_duration ).'" data-reveal-between-delay="'.esc_attr( $reveal_between_delay ).'"';
|
173 |
+
$isoxin_attrs .= ' data-hide-transition-duration="'. esc_attr( $hide_transition_duration ).'" data-hide-between-delay="'.esc_attr( $hide_between_delay ).'"';
|
174 |
+
|
175 |
+
$ajaxAttrs = ' data-num="'. $num .'" data-order="'. $order .'" data-orderby="'. $order_by .'" data-taxonomy="'. $filter_by .'" data-n="'. wp_create_nonce( 'aux_ajax_filterable_portfolio' ) .'"';
|
176 |
+
$isoxin_attrs .= $ajaxAttrs;
|
177 |
+
|
178 |
+
$wrapper_classes .= $show_lightbox ? ' aux-lightbox-gallery' : '';
|
179 |
+
|
180 |
+
if( gettype( $args['terms'] ) === "string" ) {
|
181 |
+
if( empty( $args['terms'] ) || $args['terms'] == " " ) {
|
182 |
+
$tax_args = array();
|
183 |
+
} else {
|
184 |
+
$tax_args = array(
|
185 |
+
array(
|
186 |
+
'taxonomy' => $filter_by,
|
187 |
+
'field' => 'slug',
|
188 |
+
'terms' => explode( ",", $args['terms'])
|
189 |
+
)
|
190 |
+
);
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
$query_arg = array(
|
195 |
+
'post_type' => 'portfolio',
|
196 |
+
'orderby' => $order_by,
|
197 |
+
'order' => $order,
|
198 |
+
'offset' => $offset,
|
199 |
+
'post_status' => 'publish',
|
200 |
+
'posts_per_page' => $num ? $num : -1,
|
201 |
+
'ignore_sticky_posts' => 1,
|
202 |
+
'tax_query' => $tax_args,
|
203 |
+
'include_posts__in' => $include, // include posts in this list
|
204 |
+
'posts__not_in' => $exclude, // exclude posts in this list
|
205 |
+
'posts__in' => $only_posts__in, // only posts in this list
|
206 |
+
'exclude_without_media' => $exclude_without_media
|
207 |
+
);
|
208 |
+
|
209 |
+
// pass the args through the auxin query parser
|
210 |
+
$wp_query = new WP_Query( auxin_parse_query_args( $query_arg ) );
|
211 |
+
$have_posts = $wp_query->have_posts();
|
212 |
+
|
213 |
+
if( $have_posts ){
|
214 |
+
|
215 |
+
if ( ! $skip_wrappers ) {
|
216 |
+
// Generate Wrapper Markup
|
217 |
+
echo sprintf( '<div id="%s" data-element-id="%s" class="%s" %s>', esc_attr( $isotope_id ), esc_attr( $universal_id ), esc_attr( $wrapper_classes ), $isoxin_attrs);
|
218 |
+
// Loading markup for Ajax LoadMore
|
219 |
+
echo '<div class="aux-items-loading aux-loading-hide"><div class="aux-loading-loop"><svg class="aux-circle" width="100%" height="100%" viewBox="0 0 42 42"><circle class="aux-stroke-bg" r="20" cx="21" cy="21" fill="none"></circle><circle class="aux-progress" r="20" cx="21" cy="21" fill="none" transform="rotate(-90 21 21)"></circle></svg></div></div>';
|
220 |
+
//End of Loading markup
|
221 |
+
}
|
222 |
+
|
223 |
+
while ( $wp_query->have_posts() ) {
|
224 |
+
|
225 |
+
// break the loop if it is reached to the limit
|
226 |
+
if ( ! $num || $post_counter < $num ) {
|
227 |
+
$post_counter ++;
|
228 |
+
} else {
|
229 |
+
break;
|
230 |
+
}
|
231 |
+
|
232 |
+
|
233 |
+
$wp_query->the_post();
|
234 |
+
$post = $wp_query->post;
|
235 |
+
|
236 |
+
if ( $is_tiles ) {
|
237 |
+
|
238 |
+
$tile_pattern_info = auxin_get_tile_pattern( $tile_style_pattern, $post_counter - 1, $column_media_width );
|
239 |
+
$post_vars = auxpfo_get_portfolio_config(
|
240 |
+
$post,
|
241 |
+
array(
|
242 |
+
'request_from' => 'archive',
|
243 |
+
'media_width' => 726,
|
244 |
+
'media_size' => $tile_pattern_info['size'],
|
245 |
+
'upscale_image' => true,
|
246 |
+
'preloadable' => true,
|
247 |
+
'preload_preview' => false,
|
248 |
+
'crop' => true,
|
249 |
+
'add_image_hw' => true, // whether add width and height attr or not
|
250 |
+
'image_sizes' => $tile_pattern_info['image_sizes'],
|
251 |
+
'srcset_sizes' => $tile_pattern_info['srcset_sizes']
|
252 |
+
)
|
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(
|
261 |
+
$post,
|
262 |
+
array(
|
263 |
+
'request_from' => 'archive',
|
264 |
+
'media_width' => 726,
|
265 |
+
'media_size' => array( 'width' => $column_media_width, 'height' => $column_media_height ),
|
266 |
+
'preloadable' => null, // pass null to disable lazyloading while respecting the "sizes" => "auto"
|
267 |
+
'preload_preview' => false,
|
268 |
+
'crop' => $crop,
|
269 |
+
'add_image_hw' => true, // whether add width and height attr or not
|
270 |
+
'image_sizes' => 'auto',
|
271 |
+
'srcset_sizes' => 'auto'
|
272 |
+
)
|
273 |
+
);
|
274 |
+
|
275 |
+
$item_classes = 'aux-col';
|
276 |
+
$item_inner_classes = '';
|
277 |
+
}
|
278 |
+
|
279 |
+
extract( $post_vars );
|
280 |
+
|
281 |
+
if ( !$has_attach ) {
|
282 |
+
$post_counter --;
|
283 |
+
continue;
|
284 |
+
}
|
285 |
+
|
286 |
+
// Extra conditions
|
287 |
+
$item_classes .= $is_boxed ? ' aux-entry-boxed' : '';
|
288 |
+
$item_classes .= !empty( $loadmore_type ) ? ' aux-ajax-item' : '';
|
289 |
+
|
290 |
+
// // Lightbox attributes
|
291 |
+
if ( $show_lightbox ) {
|
292 |
+
$attach_id = get_post_thumbnail_id($post->ID);
|
293 |
+
$img_caption = auxin_attachment_caption( $attach_id );
|
294 |
+
$image_primary_meta = wp_get_attachment_metadata( $attach_id );
|
295 |
+
$lightbox_attrs = sprintf( 'data-elementor-open-lightbox = "no" data-original-width = "%s" data-original-height = "%s" data-caption = "%s"',
|
296 |
+
$image_primary_meta['width'], $image_primary_meta['height'], $img_caption
|
297 |
+
);
|
298 |
+
}
|
299 |
+
|
300 |
+
if ( $paginate && $post_counter > $perpage ) {
|
301 |
+
echo sprintf('<div class="aux-iso-item aux-iso-hidden aux-loading %s">', $item_classes );
|
302 |
+
} else {
|
303 |
+
echo sprintf('<div class="aux-iso-item aux-loading %s">', $item_classes );
|
304 |
+
}
|
305 |
+
|
306 |
+
include auxin_get_template_file( 'theme-parts/entry/portfolio', $template_file, AUXPFO()->template_path() );
|
307 |
+
|
308 |
+
|
309 |
+
echo '</div>';
|
310 |
+
|
311 |
+
}
|
312 |
+
|
313 |
+
if( ! $skip_wrappers ) {
|
314 |
+
|
315 |
+
// End of Wrapper Markup
|
316 |
+
echo '</div>';
|
317 |
+
|
318 |
+
// Execute load more functionality
|
319 |
+
if( $wp_query->found_posts > $loadmore_per_page ) {
|
320 |
+
echo auxin_get_load_more_controller( $loadmore_type, $loadmore_label );
|
321 |
+
}
|
322 |
+
|
323 |
+
}
|
324 |
+
|
325 |
+
if ( $is_boxed ) {
|
326 |
+
// Set background color style
|
327 |
+
$entry_background_color = $entry_background_color ? "background-color: $entry_background_color;" : '';
|
328 |
+
// Set border color style
|
329 |
+
$entry_border_color = $entry_border_color ? "border:1px solid $entry_border_color;" : '';
|
330 |
+
|
331 |
+
if ( !empty( $entry_background_color ) || !empty( $entry_border_color ) ) {
|
332 |
+
echo sprintf(
|
333 |
+
'<style>
|
334 |
+
.page .aux-widget-recent-portfolios .entry-main { %s %s }
|
335 |
+
</style>',
|
336 |
+
$entry_background_color,
|
337 |
+
$entry_border_color
|
338 |
+
);
|
339 |
+
}
|
340 |
+
|
341 |
+
}
|
342 |
+
|
343 |
+
}
|
344 |
+
|
345 |
+
if( $reset_query ){
|
346 |
+
wp_reset_query();
|
347 |
+
}
|
348 |
+
|
349 |
+
// return false if no result found
|
350 |
+
if( ! $have_posts ){
|
351 |
+
ob_get_clean();
|
352 |
+
return false;
|
353 |
+
}
|
354 |
+
|
355 |
+
}
|
356 |
+
|
public/templates/theme-parts/entry/portfolio-column-overlay.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
$tile_skin_scheme = ! isset( $tile_skin ) || 'darken' === $tile_skin ? 'aux-white' : 'aux-black';
|
3 |
$tile_skin_hover = ! isset( $tile_skin ) || 'darken' === $tile_skin ? 'aux-black' : 'aux-white';
|
4 |
-
|
5 |
// validate the boolean variables
|
6 |
-
$show_title = auxin_is_true( $
|
7 |
$show_info = auxin_is_true( $show_info );
|
8 |
?>
|
9 |
<article <?php post_class( 'aux-item-overlay' . ' ' . $hover_classes . ' ' . $item_inner_classes ); ?> >
|
@@ -35,31 +35,32 @@
|
|
35 |
|
36 |
</div>
|
37 |
<?php } ?>
|
38 |
-
|
39 |
<?php if( $show_title || $show_info ) { ?>
|
40 |
<div class="entry-main">
|
41 |
|
42 |
-
|
43 |
-
|
|
|
44 |
<a href="<?php echo !empty( $the_link ) ? $the_link : get_permalink(); ?>">
|
45 |
<?php echo !empty( $the_name ) ? $the_name : get_the_title(); ?>
|
46 |
</a>
|
47 |
</h3>
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
63 |
</div>
|
64 |
<?php } ?>
|
65 |
</div>
|
1 |
<?php
|
2 |
$tile_skin_scheme = ! isset( $tile_skin ) || 'darken' === $tile_skin ? 'aux-white' : 'aux-black';
|
3 |
$tile_skin_hover = ! isset( $tile_skin ) || 'darken' === $tile_skin ? 'aux-black' : 'aux-white';
|
4 |
+
|
5 |
// validate the boolean variables
|
6 |
+
$show_title = auxin_is_true( $display_title );
|
7 |
$show_info = auxin_is_true( $show_info );
|
8 |
?>
|
9 |
<article <?php post_class( 'aux-item-overlay' . ' ' . $hover_classes . ' ' . $item_inner_classes ); ?> >
|
35 |
|
36 |
</div>
|
37 |
<?php } ?>
|
|
|
38 |
<?php if( $show_title || $show_info ) { ?>
|
39 |
<div class="entry-main">
|
40 |
|
41 |
+
<?php if( $show_title ) { ?>
|
42 |
+
<header class="entry-header">
|
43 |
+
<h3 class="entry-title aux-hover-move-up">
|
44 |
<a href="<?php echo !empty( $the_link ) ? $the_link : get_permalink(); ?>">
|
45 |
<?php echo !empty( $the_name ) ? $the_name : get_the_title(); ?>
|
46 |
</a>
|
47 |
</h3>
|
48 |
+
</header>
|
49 |
+
<?php } ?>
|
50 |
+
<?php if( $show_info ) { ?>
|
51 |
+
<div class="entry-info aux-hover-move-up aux-delay-1x">
|
52 |
+
<span class="entry-tax">
|
53 |
+
<?php // the_category(' '); we can use this template tag, but customizable way is needed! ?>
|
54 |
+
<?php $tax_name = 'portfolio-cat';
|
55 |
+
if( $cat_terms = wp_get_post_terms( $post->ID, $tax_name ) ){
|
56 |
+
foreach( $cat_terms as $term ){
|
57 |
+
echo '<a href="'. get_term_link( $term->slug, $tax_name ) .'" title="'.__("View all posts in ", 'auxin-portfolio'). $term->name .'" rel="category" >'. $term->name .'</a>';
|
58 |
+
}
|
59 |
+
}
|
60 |
+
?>
|
61 |
+
</span>
|
62 |
+
</div>
|
63 |
+
<?php } ?>
|
64 |
</div>
|
65 |
<?php } ?>
|
66 |
</div>
|
public/templates/theme-parts/entry/portfolio-column.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
// Add class name for custom styles
|
3 |
$classic_item_class_name = auxin_get_option( 'show_portfolio_entry_box_colors' ) ? 'aux-entry-boxed' : '';
|
4 |
-
|
5 |
// validate the boolean variables
|
6 |
-
$show_title = auxin_is_true( $
|
7 |
$show_info = auxin_is_true( $show_info );
|
8 |
$show_lightbox = auxin_is_true( $show_lightbox );
|
9 |
-
?>
|
10 |
<article <?php post_class( $classic_item_class_name ); ?> >
|
11 |
<div class="<?php echo $hover_classes ?>">
|
12 |
<div class="entry-media <?php echo $frame_effect_classes ?>">
|
1 |
<?php
|
2 |
// Add class name for custom styles
|
3 |
$classic_item_class_name = auxin_get_option( 'show_portfolio_entry_box_colors' ) ? 'aux-entry-boxed' : '';
|
4 |
+
|
5 |
// validate the boolean variables
|
6 |
+
$show_title = auxin_is_true( $display_title );
|
7 |
$show_info = auxin_is_true( $show_info );
|
8 |
$show_lightbox = auxin_is_true( $show_lightbox );
|
9 |
+
?>
|
10 |
<article <?php post_class( $classic_item_class_name ); ?> >
|
11 |
<div class="<?php echo $hover_classes ?>">
|
12 |
<div class="entry-media <?php echo $frame_effect_classes ?>">
|
public/templates/theme-parts/entry/single-portfolio.php
CHANGED
@@ -40,7 +40,6 @@
|
|
40 |
$header_styles = in_array( $info_pos, array('right', 'left') ) ? '' : $header_styles ;
|
41 |
|
42 |
// Meta data options -----------------------------
|
43 |
-
|
44 |
if( $display_cat ) {
|
45 |
// get portfolio categories
|
46 |
$tax_name = 'portfolio-cat';
|
@@ -67,7 +66,7 @@
|
|
67 |
// print the portfolio metadata
|
68 |
$metafields = json_decode( auxin_get_option( 'portfolio_metadata_list_1' ), true );
|
69 |
|
70 |
-
if (is_array( $metafields ) && !
|
71 |
$display_metafields = true;
|
72 |
} else { $display_metafields = false; }
|
73 |
|
40 |
$header_styles = in_array( $info_pos, array('right', 'left') ) ? '' : $header_styles ;
|
41 |
|
42 |
// Meta data options -----------------------------
|
|
|
43 |
if( $display_cat ) {
|
44 |
// get portfolio categories
|
45 |
$tax_name = 'portfolio-cat';
|
66 |
// print the portfolio metadata
|
67 |
$metafields = json_decode( auxin_get_option( 'portfolio_metadata_list_1' ), true );
|
68 |
|
69 |
+
if ( is_array( $metafields ) && ! empty( $metafields ) ) {
|
70 |
$display_metafields = true;
|
71 |
} else { $display_metafields = false; }
|
72 |
|