Premium Portfolio Features for Phlox theme - Version 0.9.0

Version Description

Download this release

Release Info

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

Code changes from version 0.8.3 to 0.9.0

README.txt CHANGED
@@ -4,9 +4,9 @@ Donate link: http://averta.net/
4
  License: GPLv3
5
  License URI: http://www.gnu.org/licenses/gpl.html
6
  Tags: ajaxload, page-builder, siteorigin, auxin, phlox, averta, fullwidth, masonry, timeline, portfolio, projects, showcase, minimal, wix, flat
7
- Requires at least: 4.3
8
- Tested up to: 4.7.2
9
- Stable tag: 0.8.3
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl.html
12
 
@@ -120,7 +120,7 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-por
120
 
121
  == Changelog ==
122
 
123
- = Version 0.8.3 / (01.05.2017) =
124
  - New portfolio layouts added
125
  - Dependency for auxin-elements plugin added
126
 
@@ -131,5 +131,5 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-por
131
 
132
  == Upgrade Notice ==
133
 
134
- = 0.8.3 =
135
  - New portfolio layouts added
4
  License: GPLv3
5
  License URI: http://www.gnu.org/licenses/gpl.html
6
  Tags: ajaxload, page-builder, siteorigin, auxin, phlox, averta, fullwidth, masonry, timeline, portfolio, projects, showcase, minimal, wix, flat
7
+ Requires at least: 4.6
8
+ Tested up to: 4.8.1
9
+ Stable tag: 0.9.0
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl.html
12
 
120
 
121
  == Changelog ==
122
 
123
+ = Version 0.9.0 / (21.06.2017) =
124
  - New portfolio layouts added
125
  - Dependency for auxin-elements plugin added
126
 
131
 
132
  == Upgrade Notice ==
133
 
134
+ = 0.9.0 =
135
  - New portfolio layouts added
admin/includes/metaboxes/metabox-fields-portfolio-metadata.php CHANGED
@@ -52,6 +52,7 @@ function auxpfo_metabox_fields_portfolio_metadata(){
52
  'title' => __('Info Layout', 'auxin-portfolio'),
53
  'description' => __('Specifies the alignment of metadata column. (Default: "right" for LTR websites and "left" for RTL ones)', 'auxin-portfolio'),
54
  'id' => '_side_info_pos',
 
55
  'type' => 'radio-image',
56
  'default' => 'default',
57
  'choices' => array(
@@ -67,11 +68,15 @@ function auxpfo_metabox_fields_portfolio_metadata(){
67
  'label' => __('Left', 'auxin-portfolio'),
68
  'image' => AUX_URL . 'images/visual-select/portfolio-single-classic-left-algin.svg'
69
  ),
 
 
 
 
70
  'bottom' => array(
71
  'label' => __('Bottom', 'auxin-portfolio'),
72
  'image' => AUX_URL . 'images/visual-select/portfolio-single-wide.svg'
73
  )
74
- ),
75
  ),
76
 
77
  // @TODO: we should add this in future
@@ -201,7 +206,7 @@ function auxpfo_metabox_fields_portfolio_metadata(){
201
  ),
202
 
203
  array(
204
- 'title' => __('Lunch Project Button', 'auxin-portfolio'),
205
  'description' => __('Specifies an URL for action button in order to lunch the project\'s webpage. Leave it empty if you don`t need Lunch Project Button.', 'auxin-portfolio'),
206
  'id' => '_lunch_button_url',
207
  'type' => 'text',
52
  'title' => __('Info Layout', 'auxin-portfolio'),
53
  'description' => __('Specifies the alignment of metadata column. (Default: "right" for LTR websites and "left" for RTL ones)', 'auxin-portfolio'),
54
  'id' => '_side_info_pos',
55
+ 'id_deprecated' => 'page_layout',
56
  'type' => 'radio-image',
57
  'default' => 'default',
58
  'choices' => array(
68
  'label' => __('Left', 'auxin-portfolio'),
69
  'image' => AUX_URL . 'images/visual-select/portfolio-single-classic-left-algin.svg'
70
  ),
71
+ 'top' => array(
72
+ 'label' => __('Top', 'auxin-portfolio'),
73
+ 'image' => AUX_URL . 'images/visual-select/portfolio-single-wide.svg'
74
+ ),
75
  'bottom' => array(
76
  'label' => __('Bottom', 'auxin-portfolio'),
77
  'image' => AUX_URL . 'images/visual-select/portfolio-single-wide.svg'
78
  )
79
+ )
80
  ),
81
 
82
  // @TODO: we should add this in future
206
  ),
207
 
208
  array(
209
+ 'title' => __('URL for Launch Button', 'auxin-portfolio'),
210
  'description' => __('Specifies an URL for action button in order to lunch the project\'s webpage. Leave it empty if you don`t need Lunch Project Button.', 'auxin-portfolio'),
211
  'id' => '_lunch_button_url',
212
  'type' => 'text',
auxin-portfolio.php CHANGED
@@ -9,16 +9,17 @@
9
  * @link http://averta.net/phlox/
10
  * @copyright (c) 2010-2017
11
  *
12
- * Plugin Name: Auxin Portfolio
13
  * Plugin URI: http://averta.net/phlox/
14
  * Description: Showcase your projects beautifully in Phlox theme
15
- * Version: 0.8.3
16
  * Author: averta
17
  * Author URI: http://averta.net
 
 
18
  * Text Domain: auxin-portfolio
19
- * License URI: LICENSE.txt
20
  * Domain Path: /languages
21
- * Tested up to: 4.7.3
22
  */
23
 
24
  // If this file is called directly, abort.
@@ -36,7 +37,7 @@ if ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) {
36
  * ===========================================================================*/
37
 
38
  // Don't check the requirements if it's frontend or AUXIN_DUBUG set to false
39
- if( is_admin() && ! ( defined( 'AUXIN_DUBUG' ) && ! AUXIN_DUBUG ) ){
40
 
41
  if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
42
  require_once( plugin_dir_path( __FILE__ ) . 'includes/classes/class-auxin-plugin-requirements.php' );
@@ -47,19 +48,19 @@ if( is_admin() && ! ( defined( 'AUXIN_DUBUG' ) && ! AUXIN_DUBUG ) ){
47
 
48
  'plugins' => array(
49
  array(
50
- 'name' => __('Auxin Elements', 'auxin-portfolio'), // The plugin name.
51
  'basename' => 'auxin-elements/auxin-elements.php', // The plugin basename (typically the folder name and main php file)
52
  'required' => true, // If true, the user will be notified with a notice to install the plugin.
53
- 'version' => '1.3.6', // E.g. 1.0.0. If set, the active plugin must be this version or higher.
54
  'dependency' => true, // If true, and the plugin is activated, the plugin will be loaded before as a dependeny.
55
- 'is_callable' => '' // If set, this callable will be be checked for availability to determine if a plugin is active.
56
  )
57
  ),
58
 
59
  'themes' => array(
60
  array(
61
  'name' => __('Phlox', 'auxin-portfolio'), // The theme name.
62
- 'version' => '1.6.6', // E.g. 1.0.0. If set, the active theme must be this version or higher.
63
  'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active.
64
  'file_exists' => get_template_directory() . '/auxin/auxin-include/auxin.php' // If set, this file will be checked for availability to determine if a theme is active.
65
  )
@@ -70,7 +71,7 @@ if( is_admin() && ! ( defined( 'AUXIN_DUBUG' ) && ! AUXIN_DUBUG ) ){
70
  ),
71
 
72
  'config' => array(
73
- 'plugin_name' => __('Auxin Portfolio', 'auxin-portfolio'), // Current plugin name.
74
  'plugin_basename' => plugin_basename( __FILE__ ),
75
  'plugin_dir_path' => plugin_dir_path( __FILE__ ),
76
  'debug' => false
@@ -84,6 +85,9 @@ if( is_admin() && ! ( defined( 'AUXIN_DUBUG' ) && ! AUXIN_DUBUG ) ){
84
  // If the requirements were not met, dont initialize the plugin
85
  if( true !== $validation ){
86
  return;
 
 
 
87
  }
88
  }
89
 
9
  * @link http://averta.net/phlox/
10
  * @copyright (c) 2010-2017
11
  *
12
+ * Plugin Name: Phlox Portfolio
13
  * Plugin URI: http://averta.net/phlox/
14
  * Description: Showcase your projects beautifully in Phlox theme
15
+ * Version: 0.9.0
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.8.1
23
  */
24
 
25
  // If this file is called directly, abort.
37
  * ===========================================================================*/
38
 
39
  // Don't check the requirements if it's frontend or AUXIN_DUBUG set to false
40
+ if( is_admin() || false === get_transient( 'auxpfo_plugin_requirements_check' ) ){
41
 
42
  if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
43
  require_once( plugin_dir_path( __FILE__ ) . 'includes/classes/class-auxin-plugin-requirements.php' );
48
 
49
  'plugins' => array(
50
  array(
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' => '1.3.10', // 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
  )
58
  ),
59
 
60
  'themes' => array(
61
  array(
62
  'name' => __('Phlox', 'auxin-portfolio'), // The theme name.
63
+ 'version' => '1.6.9', // E.g. 1.0.0. If set, the active theme must be this version or higher.
64
  'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active.
65
  'file_exists' => get_template_directory() . '/auxin/auxin-include/auxin.php' // If set, this file will be checked for availability to determine if a theme is active.
66
  )
71
  ),
72
 
73
  'config' => array(
74
+ 'plugin_name' => __('Phlox Portfolio', 'auxin-portfolio'), // Current plugin name.
75
  'plugin_basename' => plugin_basename( __FILE__ ),
76
  'plugin_dir_path' => plugin_dir_path( __FILE__ ),
77
  'debug' => false
85
  // If the requirements were not met, dont initialize the plugin
86
  if( true !== $validation ){
87
  return;
88
+ // cache the validation result and skip the extra checks on frontend for cache period
89
+ } else {
90
+ set_transient( 'auxpfo_plugin_requirements_check', true, 15 * MINUTE_IN_SECONDS );
91
  }
92
  }
93
 
includes/classes/class-auxin-plugin-requirements.php CHANGED
@@ -32,28 +32,64 @@ if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
32
 
33
 
34
  function __construct(){
35
- add_action( 'admin_notices' , array( $this, 'admin_notices' ) );
36
- add_action( 'activated_plugin' , array( $this, 'update_plugins_dependencies' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  }
38
 
39
  /**
40
- * Make sure the client has required PHP version, otherwise, throw a notice
41
  *
42
  * @return void
43
  */
44
- public function admin_notices(){
45
- if( $notices = implode( '</li><li>', $this->admin_notices ) ) {
46
- echo '<div class="error aux-admin-error"><p>';
47
- printf(
 
 
48
  __( '%s plugin has been disabled automatically due to following reason:', 'auxin-elements' ),
49
  '<strong>'. $this->requirements['config']['plugin_name'] . '</strong>'
50
  );
51
- echo '<ul><li>'. $notices . '</li></ul></p></div>';
52
  }
53
 
54
  if( $this->requirements['config']['debug'] ){
55
  $active_plugins = get_option( 'active_plugins' );
56
- echo "<pre>"; print_r( $active_plugins ); echo "</pre>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  }
58
  }
59
 
32
 
33
 
34
  function __construct(){
35
+
36
+ if( is_admin() ){
37
+ add_action( 'admin_notices' , array( $this, 'admin_notices' ) );
38
+ add_action( 'activated_plugin' , array( $this, 'update_plugins_dependencies' ) );
39
+ } else {
40
+ add_action( 'auxin_after_inner_body_open', array( $this, 'front_notices' ) );
41
+ }
42
+
43
+ }
44
+
45
+ /**
46
+ * Make sure the client has the requirements, otherwise, throw a notice in admin
47
+ *
48
+ * @return void
49
+ */
50
+ public function admin_notices( $pop_notice = '' ){
51
+ if( $this->admin_notices ) {
52
+ echo '<div class="error aux-admin-error">';
53
+ echo $this->get_notices( $pop_notice );
54
+ echo '</div>';
55
+ }
56
  }
57
 
58
  /**
59
+ * Make sure the client has the requirements, otherwise, throw a notice
60
  *
61
  * @return void
62
  */
63
+ public function get_notices( $pop_notice = '' ){
64
+ $the_notice = '';
65
+
66
+ if( $this->admin_notices && $notices = implode( '</li><li>', $this->admin_notices ) ) {
67
+ $the_notice .= '<p>' . $pop_notice;
68
+ $the_notice .= sprintf(
69
  __( '%s plugin has been disabled automatically due to following reason:', 'auxin-elements' ),
70
  '<strong>'. $this->requirements['config']['plugin_name'] . '</strong>'
71
  );
72
+ $the_notice .= '<ul><li>'. $notices . '</li></ul></p>';
73
  }
74
 
75
  if( $this->requirements['config']['debug'] ){
76
  $active_plugins = get_option( 'active_plugins' );
77
+ $the_notice .= "<pre>"; $the_notice .= sprint_r( $active_plugins ); $the_notice .= "</pre>";
78
+ }
79
+ return $the_notice;
80
+ }
81
+
82
+ /**
83
+ * Make sure the client has the requirements, otherwise, throw a notice in frontend for administrator
84
+ *
85
+ * @return void
86
+ */
87
+ public function front_notices(){
88
+ if( $this->admin_notices && current_user_can( 'edit_theme_options' ) ) {
89
+ $pop_notice = '<strong>' . __( 'Note for admin', 'auxin-elements' ) . '</strong>: ';
90
+ echo '<div class="aux-front-error aux-front-notice aux-fold">';
91
+ echo $this->get_notices( $pop_notice );
92
+ echo '</div>';
93
  }
94
  }
95
 
includes/classes/class-auxpfo-post-type-portfolio.php CHANGED
@@ -14,8 +14,6 @@
14
  if ( ! defined('ABSPATH') ) exit;
15
 
16
 
17
- include AUXPFO_INC_DIR . '/classes/class-auxin-post-type-base.php';
18
-
19
 
20
  /**
21
  * Register Portfolio post type and taxonomies
14
  if ( ! defined('ABSPATH') ) exit;
15
 
16
 
 
 
17
 
18
  /**
19
  * Register Portfolio post type and taxonomies
includes/define.php CHANGED
@@ -14,7 +14,7 @@ if( ! defined( 'THEME_NAME' ) ){
14
  }
15
 
16
 
17
- define( 'AUXPFO_VERSION' , '0.8.3' );
18
 
19
  define( 'AUXPFO_SLUG' , 'auxin-portfolio' );
20
 
14
  }
15
 
16
 
17
+ define( 'AUXPFO_VERSION' , '0.9.0' );
18
 
19
  define( 'AUXPFO_SLUG' , 'auxin-portfolio' );
20
 
includes/elements/recent-portfolios.php CHANGED
@@ -12,17 +12,6 @@
12
 
13
  function auxin_get_recent_portfolios_master_array( $master_array ) {
14
 
15
- $categories = get_terms( array( 'taxonomy' => 'portfolio-cat',
16
- 'orderby' => 'count',
17
- 'hide_empty' => true
18
- ));
19
-
20
- $categories_list = array( ' ' => __('All Categories', 'auxin-portfolio' ) ) ;
21
- // @TODO: this taxonomy has not registered till here so we need to fix it.
22
- // foreach ( $categories as $key => $value ) {
23
- // $categories_list[$value->term_id] = $value->name;
24
- // }
25
-
26
 
27
  $master_array['aux_recent_portfolios_grid'] = array(
28
  'name' => __('[Phlox] Recent Portfolio on Grid, Tile and Masonry', 'auxin-portfolio' ),
@@ -69,11 +58,12 @@ function auxin_get_recent_portfolios_master_array( $master_array ) {
69
  'heading' => __('Categories', 'auxin-portfolio'),
70
  'description' => __('Specifies a category that you want to show portfolio items from it.', 'auxin-portfolio' ),
71
  'param_name' => 'cat',
72
- 'type' => 'aux_select2_multiple',
73
- 'def_value' => '',
 
74
  'holder' => '',
75
  'class' => 'cat',
76
- 'value' => $categories_list,
77
  'admin_label' => false,
78
  'dependency' => '',
79
  'weight' => '',
@@ -652,6 +642,25 @@ function auxin_widget_recent_portfolios_grid_callback( $atts, $shortcode_content
652
 
653
  ob_start();
654
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
655
  global $wp_query;
656
 
657
  if( ! $use_wp_query ) {
@@ -662,7 +671,7 @@ function auxin_widget_recent_portfolios_grid_callback( $atts, $shortcode_content
662
  'order' => $order,
663
  'offset' => $offset,
664
  'paged' => $paged,
665
- 'cat' => $cat,
666
  'post_status' => 'publish',
667
  'posts_per_page' => $posts_per_page,
668
  'ignore_sticky_posts' => 1,
@@ -793,11 +802,23 @@ function auxin_widget_recent_portfolios_grid_callback( $atts, $shortcode_content
793
  )
794
  );
795
 
 
796
  if ( $terms ) {
797
  ?><div class="aux-filters <?php echo $filter_style . ' ' . $filter_align; ?> aux-togglable aux-isotope-filters" data-isotope="<?php echo $isotope_id; ?>"><div class="aux-select-overlay"></div><ul><?php
798
  echo '<li data-filter="all"><a href="#"><span data-select="'.__('all', 'auxin-portfolio').'">'.__('all', 'auxin-portfolio').'</span></a></li>';
799
  foreach ( $terms as $term ) {
800
- echo '<li data-filter="iso-filter-'.$term->name.'"><a href="#"><span data-select="'.$term->name.'">'.$term->name.'</span></a></li>';
 
 
 
 
 
 
 
 
 
 
 
801
  }
802
  ?></ul></div><?php
803
  }
12
 
13
  function auxin_get_recent_portfolios_master_array( $master_array ) {
14
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  $master_array['aux_recent_portfolios_grid'] = array(
17
  'name' => __('[Phlox] Recent Portfolio on Grid, Tile and Masonry', 'auxin-portfolio' ),
58
  'heading' => __('Categories', 'auxin-portfolio'),
59
  'description' => __('Specifies a category that you want to show portfolio items from it.', 'auxin-portfolio' ),
60
  'param_name' => 'cat',
61
+ 'type' => 'aux_taxonomy',
62
+ 'taxonomy' => 'portfolio-cat',
63
+ 'def_value' => ' ',
64
  'holder' => '',
65
  'class' => 'cat',
66
+ 'value' => ' ', // should use the taxonomy name
67
  'admin_label' => false,
68
  'dependency' => '',
69
  'weight' => '',
642
 
643
  ob_start();
644
 
645
+
646
+ if( gettype( $cat ) === "string" ) {
647
+ if( empty( $cat ) || $cat == " " ) {
648
+ $tax_args = "";
649
+ } else {
650
+ $cat = explode( ",", $cat);
651
+ }
652
+ }
653
+
654
+ if(!empty($tax_args)) {
655
+ $tax_args = array(
656
+ array(
657
+ 'taxonomy' => 'portfolio-cat',
658
+ 'field' => 'term_id',
659
+ 'terms' => $cat
660
+ )
661
+ );
662
+ }
663
+
664
  global $wp_query;
665
 
666
  if( ! $use_wp_query ) {
671
  'order' => $order,
672
  'offset' => $offset,
673
  'paged' => $paged,
674
+ 'tax_query' => $tax_args,
675
  'post_status' => 'publish',
676
  'posts_per_page' => $posts_per_page,
677
  'ignore_sticky_posts' => 1,
802
  )
803
  );
804
 
805
+
806
  if ( $terms ) {
807
  ?><div class="aux-filters <?php echo $filter_style . ' ' . $filter_align; ?> aux-togglable aux-isotope-filters" data-isotope="<?php echo $isotope_id; ?>"><div class="aux-select-overlay"></div><ul><?php
808
  echo '<li data-filter="all"><a href="#"><span data-select="'.__('all', 'auxin-portfolio').'">'.__('all', 'auxin-portfolio').'</span></a></li>';
809
  foreach ( $terms as $term ) {
810
+ if( $filter_by === "portfolio-cat" ) {
811
+
812
+ if( (! is_array($cat) ) && !( empty($cat) || $cat == " " ) ) {
813
+ $cat = array($cat);
814
+ }
815
+
816
+ if ( ( empty($cat) || $cat == " " ) || in_array($term->term_id, $cat) ) {
817
+ echo '<li data-filter="iso-filter-'.$term->name.'"><a href="#"><span data-select="'.$term->name.'">'.$term->name.'</span></a></li>';
818
+ }
819
+ } else {
820
+ echo '<li data-filter="iso-filter-'.$term->name.'"><a href="#"><span data-select="'.$term->name.'">'.$term->name.'</span></a></li>';
821
+ }
822
  }
823
  ?></ul></div><?php
824
  }
includes/general-functions.php CHANGED
@@ -96,3 +96,172 @@ if( ! function_exists( 'aunin_wp_ulike_plugin_btn' ) ){
96
  }
97
 
98
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  }
97
 
98
  }
99
+
100
+
101
+
102
+
103
+ if ( ! function_exists('auxpfo_get_portfolio_config') ) {
104
+
105
+ function auxpfo_get_portfolio_config( $post, $settings ) {
106
+ global $aux_content_width;
107
+
108
+ $defaults = array(
109
+ 'request_from' => 'archive',
110
+ 'content_width' => '',
111
+ 'upscale_image' => true,
112
+ 'preloadable_image' => false,
113
+ 'media_size' => '', // large, medium, thumbnail
114
+ 'aspect_ratio' => 1,
115
+ 'add_image_hw' => true, // whether to add with and height attrs to image
116
+ 'image_sizes' => array(),
117
+ 'srcset_sizes' => array(),
118
+ 'crop' => true
119
+ );
120
+
121
+ $settings = wp_parse_args( $settings, $defaults );
122
+ extract( $settings );
123
+
124
+ if ( empty( $media_width ) ) {
125
+ $media_width = $aux_content_width;
126
+ }
127
+
128
+ $args = array(
129
+ 'show_share_btn' => true,
130
+ 'show_like_btn' => true,
131
+ 'show_actions' => true,
132
+ 'show_side' => true,
133
+ 'show_title' => true,
134
+ 'the_media' => '',
135
+ 'the_attach' => '',
136
+ 'has_attach' => false,
137
+ 'post_class' => '',
138
+ 'media_parent_class'=> '',
139
+ 'media_class' => '',
140
+ 'sticky_sidebar' => false,
141
+ 'display_cat' => true
142
+ );
143
+
144
+ if( empty( $post ) ){
145
+ return $args;
146
+ }
147
+
148
+
149
+ // get the post media layout
150
+ if( 'default' == $media_layout = auxin_get_post_meta( $post->ID, '_media_layout', 'default' ) ){
151
+ $media_layout = auxin_get_option( 'portfolio_single_media_layout' );
152
+ }
153
+
154
+ // get side position
155
+ if( 'default' == $side_pos = auxin_get_post_meta( $post->ID, '_side_info_pos', 'default' ) ){
156
+ // $side_pos = is_rtl() ? 'left' : 'right';
157
+ $side_pos = auxin_get_option( 'portfolio_single_side_pos', 'right' );
158
+ }
159
+
160
+ // get display_cat
161
+ if( 'default' == $display_cat = auxin_get_post_meta( $post->ID, '_side_info_dicplay_cat', 'default' ) ){
162
+ $display_cat = auxin_get_option( 'portfolio_single_display_category', true );
163
+ }
164
+ $args['display_cat'] = ( $display_cat == "yes" || $display_cat === true )? true: false;
165
+
166
+ // get display_tag
167
+ if( 'default' == $display_tag = auxin_get_post_meta( $post->ID, '_side_info_dicplay_tag', 'default' ) ){
168
+ $display_tag = auxin_get_option( 'portfolio_single_display_tag', true );
169
+ }
170
+ $args['display_tag'] = ($display_tag == "yes" || $display_tag === true )? true: false;
171
+
172
+ if ( 'bottom' != $side_pos ) {
173
+ if( 'default' == $sticky_sidebar = auxin_get_post_meta( $post->ID, '_sticky_sidebar', 'default' ) ){
174
+ $sticky_sidebar = auxin_get_option( 'portfolio_single_stcky_sidebar', false );
175
+ }
176
+ // sticky sidebar
177
+ $args['sticky_sidebar'] = ($sticky_sidebar == "yes" || $display_tag === true )? true: false;
178
+ }
179
+
180
+ // specify the side position
181
+ $args['post_class'] .= 'aux-side-' . $side_pos;
182
+ $args['side_pos'] = $side_pos;
183
+
184
+ switch ( $media_layout ) {
185
+ case 'classic':
186
+ $args['media_parent_class'] = 'aux-stack';
187
+ $args['media_class'] = 'aux-media-frame aux-media-image';
188
+ break;
189
+
190
+ case 'grid':
191
+ $args['post_class'] .= ' portfolio-grid';
192
+ $args['media_parent_class'] = 'aux-portolio-grid gallery-columns-2';
193
+ $args['media_class'] = 'aux-portolio-grid-column';
194
+ break;
195
+
196
+ case 'masonry':
197
+ case 'land':
198
+ case 'tile':
199
+ default:
200
+
201
+ break;
202
+ }
203
+
204
+ if( ! empty( $media_size ) ){
205
+ if( is_array( $media_size ) ){
206
+ $media_size['width'] = ! empty( $media_size['width' ] ) ? $media_size['width' ] : '';
207
+ $media_size['height'] = ! empty( $media_size['height'] ) ? $media_size['height'] : '';
208
+
209
+ $size = array( 'width' => $media_size['width'], 'height' => $media_size['height'] );
210
+ } else {
211
+ $size = auxin_wp_get_image_size( $media_size );
212
+ $size = array( 'width' => $size['width'], 'height' => $size['height'] );
213
+ }
214
+ } else {
215
+ $size = array( 'width' => $media_width, 'height' => $media_width * $aspect_ratio );
216
+ }
217
+
218
+
219
+ if ( 'archive' == $request_from ) {
220
+ $args['has_attach'] = has_post_thumbnail( $post->ID );
221
+
222
+ if ( $args['has_attach'] ) {
223
+ $args['the_attach'] = auxin_get_the_post_responsive_thumbnail(
224
+ $post->ID,
225
+ array(
226
+ 'size' => $size,
227
+ 'crop' => $crop,
228
+ 'preloadable' => $preloadable_image,
229
+ 'add_hw' => $add_image_hw,
230
+ 'image_sizes' => $image_sizes,
231
+ 'srcset_sizes' => $srcset_sizes,
232
+ 'upscale' => $upscale_image
233
+ )
234
+ );
235
+ }
236
+
237
+ $args['the_media'] = '<div class="aux-media-frame aux-media-image">'.
238
+ '<a href="'.get_permalink( $post->ID ).'">'.
239
+ $args['the_attach'].
240
+ '</a>'.
241
+ '</div>';
242
+ } else {
243
+ $args['has_attach'] = ! auxin_get_post_meta( $post->ID, '_no_feature_image_in_single', 0 );
244
+
245
+ if( $args['has_attach'] ){
246
+ $args['the_media'] = get_the_post_thumbnail( $post->ID, 'large' );
247
+ $args['has_attach'] = ! empty( $args['the_media'] );
248
+ }
249
+ }
250
+
251
+ // Don't display post title if title bar is enable to prevent duplicated title in single page
252
+ if( 'archive' !== $request_from && auxin_get_post_meta( $post->ID, 'aux_title_bar_show', 0 ) ) {
253
+ $args['show_title'] = false;
254
+ }
255
+
256
+ // action buttons
257
+ $args['show_share_btn'] = ( auxin_get_option( 'show_portfolio_single_share', true ) );
258
+ $args['show_like_btn' ] = ( auxin_get_option( 'show_portfolio_single_like', true ) );
259
+ $args['show_actions' ] = ( auxin_get_option( 'show_portfolio_single_share_like_section', true ) );
260
+ if( !$args['show_share_btn'] && !$args['show_like_btn'] ) {
261
+ $args['show_actions' ] = false;
262
+ }
263
+
264
+ return $args;
265
+ }
266
+
267
+ }
includes/general-hooks.php CHANGED
@@ -34,7 +34,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
34
  // Portfolio section ==================================================================
35
 
36
  $sections[] = array(
37
- 'id' => 'portfolio-setting-section',
38
  'parent' => '', // section parent's id
39
  'title' => __( 'Portfolio', 'auxin-portfolio'),
40
  'description' => __( 'Portfolio Setting', 'auxin-portfolio'),
@@ -44,8 +44,8 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
44
  // Sub section - Portfolio Single Page -------------------------------
45
 
46
  $sections[] = array(
47
- 'id' => 'portfolio-setting-section-single',
48
- 'parent' => 'portfolio-setting-section', // section parent's id
49
  'title' => __( 'Single Portfolio', 'auxin-portfolio'),
50
  'description' => __( 'Single Portfolio Setting', 'auxin-portfolio')
51
  );
@@ -55,7 +55,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
55
  'title' => __('Single Portfolio Style', 'auxin-portfolio'),
56
  'description' => __('Specifies position of sidebar on single portfolio.', 'auxin-portfolio'),
57
  'id' => 'portfolio_single_side_pos',
58
- 'section' => 'portfolio-setting-section-single',
59
  'dependency' => array(),
60
  'choices' => array(
61
  'right' => array(
@@ -80,7 +80,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
80
  'title' => __('Sticky Side Area', 'auxin-portfolio'),
81
  'description' => __( 'Enable it to stick the side area on page while scrolling..'),
82
  'id' => 'portfolio_single_stcky_sidebar',
83
- 'section' => 'portfolio-setting-section-single',
84
  'dependency' => array(
85
  array(
86
  'id' => 'portfolio_single_side_pos',
@@ -97,7 +97,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
97
  'title' => __('Single portfolio Sidebar Position', 'auxin-portfolio'),
98
  'description' => __('Specifies position of sidebar on single portfolio.', 'auxin-portfolio'),
99
  'id' => 'portfolio_single_sidebar_position',
100
- 'section' => 'portfolio-setting-section-single',
101
  'dependency' => array(),
102
  'post_js' => '$(".single-portfolio main.aux-single").alterClass( "*-sidebar", to );',
103
  'choices' => array(
@@ -138,7 +138,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
138
  'title' => __('Single portfolio Sidebar Style', 'auxin-portfolio'),
139
  'description' => 'Specifies style of sidebar on single portfolio.',
140
  'id' => 'portfolio_single_sidebar_decoration',
141
- 'section' => 'portfolio-setting-section-single',
142
  'dependency' => array(
143
  array(
144
  'id' => 'portfolio_single_sidebar_position',
@@ -171,7 +171,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
171
  // 'title' => __('Content Style', 'auxin-portfolio'),
172
  // 'description' => __('You can reduce the width of text lines and increase the readability of context in single portfolio of portfolio (does not affect the width of media).', 'auxin-portfolio'),
173
  // 'id' => 'portfolio_single_content_style',
174
- // 'section' => 'portfolio-setting-section-single',
175
  // 'dependency' => array(),
176
  // 'choices' => array(
177
  // 'simple' => array(
@@ -193,7 +193,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
193
  'title' => __( 'Display Next & Previous portfolios', 'auxin-portfolio' ),
194
  'description' => __( 'Enable it to display links to next and previous portfolios on single portfolio page.' ),
195
  'id' => 'show_portfolio_single_next_prev_nav',
196
- 'section' => 'portfolio-setting-section-single',
197
  'dependency' => '',
198
  'transport' => 'refresh',
199
  // 'post_js' => '$(".single .aux-next-prev-posts").toggle( to );',
@@ -205,7 +205,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
205
  'title' => __('Skin for Next & Previous Links', 'auxin-portfolio'),
206
  'description' => __('Specifies the skin for next and previous navigation block.', 'auxin-portfolio'),
207
  'id' => 'portfolio_single_next_prev_nav_skin',
208
- 'section' => 'portfolio-setting-section-single',
209
  'dependency' => array(
210
  array(
211
  'id' => 'show_portfolio_single_next_prev_nav',
@@ -248,7 +248,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
248
  'title' => __('Display Single Portfolio Categories', 'auxin-portfolio'),
249
  'description' => __( 'Enable it to display category section in single portfolio.'),
250
  'id' => 'portfolio_single_display_category',
251
- 'section' => 'portfolio-setting-section-single',
252
  'dependency' => '',
253
  'transport' => 'refresh',
254
  'default' => '0',
@@ -259,7 +259,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
259
  'title' => __('Display Single Portfolio Tags', 'auxin-portfolio'),
260
  'description' => __( 'Enable it to display Tag section in single portfolio.'),
261
  'id' => 'portfolio_single_display_tag',
262
- 'section' => 'portfolio-setting-section-single',
263
  'dependency' => '',
264
  'transport' => 'refresh',
265
  'default' => '0',
@@ -270,8 +270,8 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
270
  // Sub section - related portfolios section -------------------------------
271
 
272
  $sections[] = array(
273
- 'id' => 'portfolio-setting-section-single-related',
274
- 'parent' => 'portfolio-setting-section', // section parent's id
275
  'title' => __( 'Related Portfolios', 'auxin-portfolio'),
276
  'description' => __( 'Setting for Related Portfolios Section in Single Page', 'auxin-portfolio')
277
  );
@@ -281,7 +281,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
281
  'title' => __( 'Display Related Portfolios', 'auxin-portfolio' ),
282
  'description' => __( 'Enable it to display related portfolios section on single portfolio page.' ),
283
  'id' => 'show_portfolio_related_posts',
284
- 'section' => 'portfolio-setting-section-single-related',
285
  'dependency' => '',
286
  'transport' => 'postMessage',
287
  'post_js' => '$(".single-portfolio .aux-widget-related-posts").toggle( to );',
@@ -293,7 +293,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
293
  'title' => __('Label of Related Section', 'auxin-portfolio'),
294
  'description' => __('Specifies the label of related items section.', 'auxin-portfolio'),
295
  'id' => 'portfolio_related_posts_label',
296
- 'section' => 'portfolio-setting-section-single-related',
297
  'dependency' => array(
298
  array(
299
  'id' => 'show_portfolio_related_posts',
@@ -311,7 +311,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
311
  'title' => __('Related Items Type', 'auxin-portfolio'),
312
  'description' => __('Specifies the appearance type for related portfolio element.', 'auxin-portfolio'),
313
  'id' => 'portfolio_related_posts_preview_mode',
314
- 'section' => 'portfolio-setting-section-single-related',
315
  'dependency' => array(
316
  array(
317
  'id' => 'show_portfolio_related_posts',
@@ -332,7 +332,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
332
  'title' => __('Number of Columns', 'auxin-portfolio'),
333
  'description' => '',
334
  'id' => 'portfolio_related_posts_column_number',
335
- 'section' => 'portfolio-setting-section-single-related',
336
  'dependency' => array(
337
  array(
338
  'id' => 'show_portfolio_related_posts',
@@ -352,7 +352,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
352
  'title' => __('Align Center', 'auxin-portfolio'),
353
  'description' => __( 'Enable it to make related portfolios section text center.'),
354
  'id' => 'portfolio_related_posts_align_center',
355
- 'section' => 'portfolio-setting-section-single-related',
356
  'dependency' => array(
357
  array(
358
  'id' => 'show_portfolio_related_posts',
@@ -370,7 +370,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
370
  'title' => __('Full Width Related Section', 'auxin-portfolio'),
371
  'description' => __( 'Enable it to make related portfolios section full width.' ),
372
  'id' => 'portfolio_related_posts_full_width',
373
- 'section' => 'portfolio-setting-section-single-related',
374
  'dependency' => array(
375
  array(
376
  'id' => 'show_portfolio_related_posts',
@@ -388,7 +388,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
388
  'title' => __('Snap Related Items', 'auxin-portfolio'),
389
  'description' => __( 'Enable it to remove space between related portfolio items.' ),
390
  'id' => 'portfolio_related_posts_snap_items',
391
- 'section' => 'portfolio-setting-section-single-related',
392
  'dependency' => array(
393
  array(
394
  'id' => 'show_portfolio_related_posts',
@@ -406,7 +406,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
406
  'title' => __('Display Portfolio Categories', 'auxin-portfolio'),
407
  'description' => __( 'Enable it to display the categories of each portfolio item in related portfolios section.'),
408
  'id' => 'portfolio_related_posts_display_taxonomies',
409
- 'section' => 'portfolio-setting-section-single-related',
410
  'dependency' => array(
411
  array(
412
  'id' => 'show_portfolio_related_posts',
@@ -424,7 +424,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
424
  /*$options[] = array( 'title' => __('View All button link', 'auxin-portfolio'),
425
  'description' => __('Specifies a link for "view all" button to portfolio listing page (the button that comes at the end of latest from portfolio element ) ', 'auxin-portfolio'),
426
  'id' => 'portfolio_view_all_btn_link',
427
- 'section' => 'portfolio-setting-section-single',
428
  'dependency'=> array(),
429
  'default' => home_url(),
430
  'type' => 'text' );*/
@@ -434,8 +434,8 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
434
  // Sub section - portfolio Archive Page -------------------------------
435
 
436
  $sections[] = array(
437
- 'id' => 'portfolio-setting-section-archive',
438
- 'parent' => 'portfolio-setting-section', // section parent's id
439
  'title' => __( 'Portfolio Page', 'auxin-portfolio'),
440
  'description' => __( 'Setting for portfolio Archive Page', 'auxin-portfolio')
441
  );
@@ -445,7 +445,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
445
  'title' => __('Portfolio Template', 'auxin-portfolio'),
446
  'description' => __('Choose your portfolio template.', 'auxin-portfolio'),
447
  'id' => 'portfolio_index_template_type',
448
- 'section' => 'portfolio-setting-section-archive',
449
  'dependency' => array(),
450
  'transport' => 'refresh',
451
  'choices' => array(
@@ -475,7 +475,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
475
  'title' => __('Image Aspect Ratio', 'auxin-portfolio'),
476
  'description' => '',
477
  'id' => 'portfolio_image_aspect_ratio',
478
- 'section' => 'portfolio-setting-section-archive',
479
  'dependency' => array(
480
  array(
481
  'id' => 'portfolio_index_template_type',
@@ -498,7 +498,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
498
  'title' => __('Portfolio Hover Type', 'auxin-portfolio'),
499
  'description' => __('Specifies the portfolio item type.', 'auxin-portfolio'),
500
  'id' => 'portfolio_archive_grid_item_type',
501
- 'section' => 'portfolio-setting-section-archive',
502
  'dependency' => array(
503
  array(
504
  'id' => 'portfolio_index_template_type',
@@ -524,7 +524,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
524
  'title' => __('Tile Portfolio Item Type', 'auxin-portfolio'),
525
  'description' => __('Specifies the portfolio item type.', 'auxin-portfolio'),
526
  'id' => 'portfolio_archive_tile_item_type',
527
- 'section' => 'portfolio-setting-section-archive',
528
  'dependency' => array(
529
  array(
530
  'id' => 'portfolio_index_template_type',
@@ -547,7 +547,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
547
  'title' => __('Space', 'auxin-portfolio'),
548
  'description' => __('Specifies space between items in pixels.', 'auxin-portfolio'),
549
  'id' => 'portfolio_archive_grid_space',
550
- 'section' => 'portfolio-setting-section-archive',
551
  'dependency' => array(
552
  array(
553
  'id' => 'portfolio_index_template_type',
@@ -566,7 +566,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
566
  'title' => __('Number of Columns', 'auxin-portfolio'),
567
  'description' => '',
568
  'id' => 'portfolio_archive_column_number',
569
- 'section' => 'portfolio-setting-section-archive',
570
  'dependency' => array(
571
  array(
572
  'id' => 'portfolio_index_template_type',
@@ -587,7 +587,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
587
  'title' => __('Number of Columns in Tablet', 'auxin-portfolio'),
588
  'description' => '',
589
  'id' => 'portfolio_archive_column_number_tablet',
590
- 'section' => 'portfolio-setting-section-archive',
591
  'dependency' => array(
592
  array(
593
  'id' => 'portfolio_index_template_type',
@@ -609,7 +609,7 @@ function auxin_define_portfolio_theme_options( $fields_sections_list ){
609
  'title' => __('Number of Columns in Mobile', 'auxin-portfolio'),
610
  'description' => '',
611
  'id' => 'portfolio_archive_column_number_mobile',
612
- 'section' => 'portfolio-setting-section-archive',
613
  'dependency' => array(
614
  array(
615
  'id' => 'portfolio_index_template_type',
@@ -630,7 +630,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
630
  'title' => __('Display Like Button', 'auxin-portfolio'),
631
  'description' => sprintf(__('Enable it to display %s like button%s on portfolio portfolios. Please note WP Ulike plugin needs to be activaited to use this option.', 'auxin-portfolio'), '<strong>', '</strong>'),
632
  'id' => 'show_portfolio_archive_like_button',
633
- 'section' => 'portfolio-setting-section-archive',
634
  'dependency' => array(
635
  array(
636
  'id' => 'portfolio_index_template_type',
@@ -648,7 +648,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
648
  'title' => __('Portfolio Sidebar Position', 'auxin-portfolio'),
649
  'description' => __('Specifies the position of sidebar on portfolio page.', 'auxin-portfolio'),
650
  'id' => 'portfolio_index_sidebar_position',
651
- 'section' => 'portfolio-setting-section-archive',
652
  'dependency' => array(),
653
  'choices' => array(
654
  'no-sidebar' => array(
@@ -691,7 +691,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
691
  'title' => __('Portfolio Sidebar Style', 'auxin-portfolio'),
692
  'description' => __('Specifies the style of sidebar on portfolio page.', 'auxin-portfolio'),
693
  'id' => 'portfolio_index_sidebar_decoration',
694
- 'section' => 'portfolio-setting-section-archive',
695
  'dependency' => array(
696
  array(
697
  'id' => 'portfolio_index_sidebar_position',
@@ -723,7 +723,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
723
  'title' => __('Number of Portfolios Per Page', 'auxin-portfolio'),
724
  'description' => __('Specifies the number of portfolios items to show on each page.', 'auxin-portfolio'),
725
  'id' => 'portfolio_archive_items_perpage',
726
- 'section' => 'portfolio-setting-section-archive',
727
  'dependency' => array(),
728
  'transport' => 'refresh',
729
  'default' => '12',
@@ -734,8 +734,8 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
734
  // Sub section - Portfolio Taxonomy Page -------------------------------
735
 
736
  $sections[] = array(
737
- 'id' => 'portfolio-setting-section-taxonomy',
738
- 'parent' => 'portfolio-setting-section', // section parent's id
739
  'title' => __( 'Portfolio Category & tag', 'auxin-portfolio'),
740
  'description' => __( 'Portfolio Category & tag page Setting', 'auxin-portfolio')
741
  );
@@ -744,7 +744,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
744
  'title' => __('Taxonomy Page Template', 'auxin-portfolio'),
745
  'description' => 'Choose your category & tag page template.',
746
  'id' => 'portfolio_taxonomy_template_type',
747
- 'section' => 'portfolio-setting-section-taxonomy',
748
  'dependency' => array(),
749
  'transport' => 'refresh',
750
  'choices' => array(
@@ -774,7 +774,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
774
  'title' => __('Image Aspect Ratio', 'auxin-portfolio'),
775
  'description' => '',
776
  'id' => 'portfolio_taxonomy_image_aspect_ratio',
777
- 'section' => 'portfolio-setting-section-taxonomy',
778
  'dependency' => array(
779
  array(
780
  'id' => 'portfolio_taxonomy_template_type',
@@ -797,7 +797,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
797
  'title' => __('Portfolio Hover Type', 'auxin-portfolio'),
798
  'description' => __('Specifies the portfolio item type.', 'auxin-portfolio'),
799
  'id' => 'portfolio_taxonomy_grid_item_type',
800
- 'section' => 'portfolio-setting-section-taxonomy',
801
  'dependency' => array(
802
  array(
803
  'id' => 'portfolio_taxonomy_template_type',
@@ -823,7 +823,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
823
  'title' => __('Tile Portfolio Item Type', 'auxin-portfolio'),
824
  'description' => __('Specifies the portfolio item type.', 'auxin-portfolio'),
825
  'id' => 'portfolio_taxonomy_tile_item_type',
826
- 'section' => 'portfolio-setting-section-taxonomy',
827
  'dependency' => array(
828
  array(
829
  'id' => 'portfolio_taxonomy_template_type',
@@ -846,7 +846,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
846
  'title' => __('Space', 'auxin-portfolio'),
847
  'description' => __('Specifies space between items in pixels.', 'auxin-portfolio'),
848
  'id' => 'portfolio_taxonomy_grid_space',
849
- 'section' => 'portfolio-setting-section-taxonomy',
850
  'dependency' => array(
851
  array(
852
  'id' => 'portfolio_taxonomy_template_type',
@@ -863,7 +863,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
863
  'title' => __('Number of Columns', 'auxin-portfolio'),
864
  'description' => '',
865
  'id' => 'portfolio_taxonomy_column_number',
866
- 'section' => 'portfolio-setting-section-taxonomy',
867
  'dependency' => array(
868
  array(
869
  'id' => 'portfolio_taxonomy_template_type',
@@ -884,7 +884,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
884
  'title' => __('Number of Columns in Tablet', 'auxin-portfolio'),
885
  'description' => '',
886
  'id' => 'portfolio_taxonomy_column_number_tablet',
887
- 'section' => 'portfolio-setting-section-taxonomy',
888
  'dependency' => array(
889
  array(
890
  'id' => 'portfolio_taxonomy_template_type',
@@ -906,7 +906,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
906
  'title' => __('Number of Columns in Mobile', 'auxin-portfolio'),
907
  'description' => '',
908
  'id' => 'portfolio_taxonomy_column_number_mobile',
909
- 'section' => 'portfolio-setting-section-taxonomy',
910
  'dependency' => array(
911
  array(
912
  'id' => 'portfolio_taxonomy_template_type',
@@ -927,7 +927,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
927
  'title' => __('Display Like Button', 'auxin-portfolio'),
928
  'description' => sprintf(__('Enable it to display %s like button%s on portfolio portfolios. Please note WP Ulike plugin needs to be activaited to use this option.', 'auxin-portfolio'), '<strong>', '</strong>'),
929
  'id' => 'show_portfolio_taxonomy_like_button',
930
- 'section' => 'portfolio-setting-section-taxonomy',
931
  'dependency' => array(
932
  array(
933
  'id' => 'portfolio_taxonomy_template_type',
@@ -953,7 +953,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
953
  'title' => __('Taxonomy Page Sidebar Position', 'auxin-portfolio'),
954
  'description' => 'Specifies the position of sidebar on category & tag page.',
955
  'id' => 'portfolio_taxonomy_sidebar_position',
956
- 'section' => 'portfolio-setting-section-taxonomy',
957
  'dependency' => array(),
958
  'post_js' => '$(".archive.tag main, .archive.tax-portfolio-cat main").alterClass( "*-sidebar", to );',
959
  'choices' => array(
@@ -994,7 +994,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
994
  'title' => __('Sidebar Style', 'auxin-portfolio'),
995
  'description' => __('Specifies the style of sidebar on category & tag page.', 'auxin-portfolio'),
996
  'id' => 'portfolio_taxonomy_archive_sidebar_decoration',
997
- 'section' => 'portfolio-setting-section-taxonomy',
998
  'dependency' => array(
999
  array(
1000
  'id' => 'portfolio_taxonomy_sidebar_position',
@@ -1025,7 +1025,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
1025
  'title' => __('Taxonomy content length', 'auxin-portfolio'),
1026
  'description' => sprintf(__('Whether to display%1$ssummary%2$sor%1$sfull%2$scontent for each portfolio on category & tag page.', 'auxin-portfolio'), '<code>', '</code>'),
1027
  'id' => 'portfolio_taxonomy_archive_content_on_listing',
1028
- 'section' => 'portfolio-setting-section-taxonomy',
1029
  'dependency' => array(),
1030
  'transport' => 'refresh',
1031
  'choices' => array(
@@ -1047,7 +1047,7 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
1047
  'title' => __('Summery length', 'auxin-portfolio'),
1048
  'description' => __('Specifies summary character length on category & tag page.', 'auxin-portfolio'),
1049
  'id' => 'portfolio_taxonomy_archive_on_listing_length',
1050
- 'section' => 'portfolio-setting-section-taxonomy',
1051
  'dependency' => array(
1052
  array(
1053
  'id' => 'post_taxonomy_archive_content_on_listing',
@@ -1063,17 +1063,28 @@ if ( auxin_is_plugin_active( 'wp-ulike/wp-ulike.php')){
1063
  // -------------------------------------------------------------------------
1064
 
1065
  $sections[] = array(
1066
- 'id' => 'portfolio-setting-section-metadata',
1067
- 'parent' => 'portfolio-setting-section', // section parent's id
1068
  'title' => __( 'Portfolio MetaData', 'auxin-portfolio'),
1069
  'description' => __( 'Portfolio MetaData Setting', 'auxin-portfolio')
1070
  );
1071
 
 
 
 
 
 
 
 
 
 
 
 
1072
  $options[] = array(
1073
  'title' => __('Portfolio MetaDatas', 'auxin-portfolio'),
1074
  'description' => __('Specify the number of fields and the label of each one for portfolio metadatas', 'auxin-portfolio'),
1075
  'id' => 'portfolio_metadata_list_1',
1076
- 'section' => 'portfolio-setting-section-metadata',
1077
  'dependency' => array(),
1078
  'transport' => 'post_js',
1079
  'choices' => array(
@@ -1127,7 +1138,7 @@ function auxpfo_init_portfolio_post_type_and_metafields(){
1127
  include AUXPFO_INC_DIR . '/classes/class-auxpfo-post-type-portfolio.php';
1128
 
1129
  $portfolio_instance = new Auxpfo_Post_Type_Portfolio();
1130
- $portfolio_instance->register_taxonomies();
1131
 
1132
  if( is_admin() ){
1133
  $metabox_args['post_type'] = $post_type;
34
  // Portfolio section ==================================================================
35
 
36
  $sections[] = array(
37
+ 'id' => 'portfolio-section',
38
  'parent' => '', // section parent's id
39
  'title' => __( 'Portfolio', 'auxin-portfolio'),
40
  'description' => __( 'Portfolio Setting', 'auxin-portfolio'),
44
  // Sub section - Portfolio Single Page -------------------------------
45
 
46
  $sections[] = array(
47
+ 'id' => 'portfolio-section-single',
48
+ 'parent' => 'portfolio-section', // section parent's id
49
  'title' => __( 'Single Portfolio', 'auxin-portfolio'),
50
  'description' => __( 'Single Portfolio Setting', 'auxin-portfolio')
51
  );
55
  'title' => __('Single Portfolio Style', 'auxin-portfolio'),
56
  'description' => __('Specifies position of sidebar on single portfolio.', 'auxin-portfolio'),
57
  'id' => 'portfolio_single_side_pos',
58
+ 'section' => 'portfolio-section-single',
59
  'dependency' => array(),
60
  'choices' => array(
61
  'right' => array(
80
  'title' => __('Sticky Side Area', 'auxin-portfolio'),
81
  'description' => __( 'Enable it to stick the side area on page while scrolling..'),
82
  'id' => 'portfolio_single_stcky_sidebar',
83
+ 'section' => 'portfolio-section-single',
84
  'dependency' => array(
85
  array(
86
  'id' => 'portfolio_single_side_pos',
97
  'title' => __('Single portfolio Sidebar Position', 'auxin-portfolio'),
98
  'description' => __('Specifies position of sidebar on single portfolio.', 'auxin-portfolio'),
99
  'id' => 'portfolio_single_sidebar_position',
100
+ 'section' => 'portfolio-section-single',
101
  'dependency' => array(),
102
  'post_js' => '$(".single-portfolio main.aux-single").alterClass( "*-sidebar", to );',
103
  'choices' => array(
138
  'title' => __('Single portfolio Sidebar Style', 'auxin-portfolio'),
139
  'description' => 'Specifies style of sidebar on single portfolio.',
140
  'id' => 'portfolio_single_sidebar_decoration',
141
+ 'section' => 'portfolio-section-single',
142
  'dependency' => array(
143
  array(
144
  'id' => 'portfolio_single_sidebar_position',
171
  // 'title' => __('Content Style', 'auxin-portfolio'),
172
  // 'description' => __('You can reduce the width of text lines and increase the readability of context in single portfolio of portfolio (does not affect the width of media).', 'auxin-portfolio'),
173
  // 'id' => 'portfolio_single_content_style',
174
+ // 'section' => 'portfolio-section-single',
175
  // 'dependency' => array(),
176
  // 'choices' => array(
177
  // 'simple' => array(
193
  'title' => __( 'Display Next & Previous portfolios', 'auxin-portfolio' ),
194
  'description' => __( 'Enable it to display links to next and previous portfolios on single portfolio page.' ),
195
  'id' => 'show_portfolio_single_next_prev_nav',
196
+ 'section' => 'portfolio-section-single',
197
  'dependency' => '',
198
  'transport' => 'refresh',
199
  // 'post_js' => '$(".single .aux-next-prev-posts").toggle( to );',
205
  'title' => __('Skin for Next & Previous Links', 'auxin-portfolio'),
206
  'description' => __('Specifies the skin for next and previous navigation block.', 'auxin-portfolio'),
207
  'id' => 'portfolio_single_next_prev_nav_skin',
208
+ 'section' => 'portfolio-section-single',
209
  'dependency' => array(
210
  array(
211
  'id' => 'show_portfolio_single_next_prev_nav',
248
  'title' => __('Display Single Portfolio Categories', 'auxin-portfolio'),
249
  'description' => __( 'Enable it to display category section in single portfolio.'),
250
  'id' => 'portfolio_single_display_category',
251
+ 'section' => 'portfolio-section-single',
252
  'dependency' => '',
253
  'transport' => 'refresh',
254
  'default' => '0',
259
  'title' => __('Display Single Portfolio Tags', 'auxin-portfolio'),
260
  'description' => __( 'Enable it to display Tag section in single portfolio.'),
261
  'id' => 'portfolio_single_display_tag',
262
+ 'section' => 'portfolio-section-single',
263
  'dependency' => '',
264
  'transport' => 'refresh',
265
  'default' => '0',
270
  // Sub section - related portfolios section -------------------------------
271
 
272
  $sections[] = array(
273
+ 'id' => 'portfolio-section-single-related',
274
+ 'parent' => 'portfolio-section', // section parent's id
275
  'title' => __( 'Related Portfolios', 'auxin-portfolio'),
276
  'description' => __( 'Setting for Related Portfolios Section in Single Page', 'auxin-portfolio')
277
  );
281
  'title' => __( 'Display Related Portfolios', 'auxin-portfolio' ),
282
  'description' => __( 'Enable it to display related portfolios section on single portfolio page.' ),
283
  'id' => 'show_portfolio_related_posts',
284
+ 'section' => 'portfolio-section-single-related',
285
  'dependency' => '',
286
  'transport' => 'postMessage',
287
  'post_js' => '$(".single-portfolio .aux-widget-related-posts").toggle( to );',
293
  'title' => __('Label of Related Section', 'auxin-portfolio'),
294
  'description' => __('Specifies the label of related items section.', 'auxin-portfolio'),
295
  'id' => 'portfolio_related_posts_label',
296
+ 'section' => 'portfolio-section-single-related',
297
  'dependency' => array(
298
  array(
299
  'id' => 'show_portfolio_related_posts',
311
  'title' => __('Related Items Type', 'auxin-portfolio'),
312
  'description' => __('Specifies the appearance type for related portfolio element.', 'auxin-portfolio'),
313
  'id' => 'portfolio_related_posts_preview_mode',
314
+ 'section' => 'portfolio-section-single-related',
315
  'dependency' => array(
316
  array(
317
  'id' => 'show_portfolio_related_posts',
332
  'title' => __('Number of Columns', 'auxin-portfolio'),
333
  'description' => '',
334
  'id' => 'portfolio_related_posts_column_number',
335
+ 'section' => 'portfolio-section-single-related',
336
  'dependency' => array(
337
  array(
338
  'id' => 'show_portfolio_related_posts',
352
  'title' => __('Align Center', 'auxin-portfolio'),
353
  'description' => __( 'Enable it to make related portfolios section text center.'),
354
  'id' => 'portfolio_related_posts_align_center',
355
+ 'section' => 'portfolio-section-single-related',
356
  'dependency' => array(
357
  array(
358
  'id' => 'show_portfolio_related_posts',
370
  'title' => __('Full Width Related Section', 'auxin-portfolio'),
371
  'description' => __( 'Enable it to make related portfolios section full width.' ),
372
  'id' => 'portfolio_related_posts_full_width',
373
+ 'section' => 'portfolio-section-single-related',
374
  'dependency' => array(
375
  array(
376
  'id' => 'show_portfolio_related_posts',
388
  'title' => __('Snap Related Items', 'auxin-portfolio'),
389
  'description' => __( 'Enable it to remove space between related portfolio items.' ),
390
  'id' => 'portfolio_related_posts_snap_items',
391
+ 'section' => 'portfolio-section-single-related',
392
  'dependency' => array(
393
  array(
394
  'id' => 'show_portfolio_related_posts',
406
  'title' => __('Display Portfolio Categories', 'auxin-portfolio'),
407
  'description' => __( 'Enable it to display the categories of each portfolio item in related portfolios section.'),
408
  'id' => 'portfolio_related_posts_display_taxonomies',
409
+ 'section' => 'portfolio-section-single-related',
410
  'dependency' => array(
411
  array(
412
  'id' => 'show_portfolio_related_posts',
424
  /*$options[] = array( 'title' => __('View All button link', 'auxin-portfolio'),
425
  'description' => __('Specifies a link for "view all" button to portfolio listing page (the button that comes at the end of latest from portfolio element ) ', 'auxin-portfolio'),
426
  'id' => 'portfolio_view_all_btn_link',
427
+ 'section' => 'portfolio-section-single',
428
  'dependency'=> array(),
429
  'default' => home_url(),
430
  'type' => 'text' );*/
434
  // Sub section - portfolio Archive Page -------------------------------
435
 
436
  $sections[] = array(
437
+ 'id' => 'portfolio-section-archive',
438
+ 'parent' => 'portfolio-section', // section parent's id
439
  'title' => __( 'Portfolio Page', 'auxin-portfolio'),
440
  'description' => __( 'Setting for portfolio Archive Page', 'auxin-portfolio')
441
  );
445
  'title' => __('Portfolio Template', 'auxin-portfolio'),
446
  'description' => __('Choose your portfolio template.', 'auxin-portfolio'),
447
  'id' => 'portfolio_index_template_type',
448
+ 'section' => 'portfolio-section-archive',
449
  'dependency' => array(),
450
  'transport' => 'refresh',
451
  'choices' => array(
475
  'title' => __('Image Aspect Ratio', 'auxin-portfolio'),
476
  'description' => '',
477
  'id' => 'portfolio_image_aspect_ratio',
478
+ 'section' => 'portfolio-section-archive',
479
  'dependency' => array(
480
  array(
481
  'id' => 'portfolio_index_template_type',
498
  'title' => __('Portfolio Hover Type', 'auxin-portfolio'),
499
  'description' => __('Specifies the portfolio item type.', 'auxin-portfolio'),
500
  'id' => 'portfolio_archive_grid_item_type',
501
+ 'section' => 'portfolio-section-archive',
502
  'dependency' => array(
503
  array(
504
  'id' => 'portfolio_index_template_type',
524
  'title' => __('Tile Portfolio Item Type', 'auxin-portfolio'),
525
  'description' => __('Specifies the portfolio item type.', 'auxin-portfolio'),
526
  'id' => 'portfolio_archive_tile_item_type',
527
+ 'section' => 'portfolio-section-archive',
528
  'dependency' => array(
529
  array(
530
  'id' => 'portfolio_index_template_type',
547
  'title' => __('Space', 'auxin-portfolio'),
548
  'description' => __('Specifies space between items in pixels.', 'auxin-portfolio'),
549
  'id' => 'portfolio_archive_grid_space',
550
+ 'section' => 'portfolio-section-archive',
551
  'dependency' => array(
552
  array(
553
  'id' => 'portfolio_index_template_type',
566
  'title' => __('Number of Columns', 'auxin-portfolio'),
567
  'description' => '',
568
  'id' => 'portfolio_archive_column_number',
569
+ 'section' => 'portfolio-section-archive',
570
  'dependency' => array(
571
  array(
572
  'id' => 'portfolio_index_template_type',
587
  'title' => __('Number of Columns in Tablet', 'auxin-portfolio'),
588
  'description' => '',
589
  'id' => 'portfolio_archive_column_number_tablet',
590
+ 'section' => 'portfolio-section-archive',
591
  'dependency' => array(
592
  array(
593
  'id' => 'portfolio_index_template_type',
609
  'title' => __('Number of Columns in Mobile', 'auxin-portfolio'),
610
  'description' => '',
611
  'id' => 'portfolio_archive_column_number_mobile',
612
+ 'section' => 'portfolio-section-archive',
613
  'dependency' => array(
614
  array(
615
  'id' => 'portfolio_index_template_type',
630
  'title' => __('Display Like Button', 'auxin-portfolio'),
631
  'description' => sprintf(__('Enable it to display %s like button%s on portfolio portfolios. Please note WP Ulike plugin needs to be activaited to use this option.', 'auxin-portfolio'), '<strong>', '</strong>'),
632
  'id' => 'show_portfolio_archive_like_button',
633
+ 'section' => 'portfolio-section-archive',
634
  'dependency' => array(
635
  array(
636
  'id' => 'portfolio_index_template_type',
648
  'title' => __('Portfolio Sidebar Position', 'auxin-portfolio'),
649
  'description' => __('Specifies the position of sidebar on portfolio page.', 'auxin-portfolio'),
650
  'id' => 'portfolio_index_sidebar_position',
651
+ 'section' => 'portfolio-section-archive',
652
  'dependency' => array(),
653
  'choices' => array(
654
  'no-sidebar' => array(
691
  'title' => __('Portfolio Sidebar Style', 'auxin-portfolio'),
692
  'description' => __('Specifies the style of sidebar on portfolio page.', 'auxin-portfolio'),
693
  'id' => 'portfolio_index_sidebar_decoration',
694
+ 'section' => 'portfolio-section-archive',
695
  'dependency' => array(
696
  array(
697
  'id' => 'portfolio_index_sidebar_position',
723
  'title' => __('Number of Portfolios Per Page', 'auxin-portfolio'),
724
  'description' => __('Specifies the number of portfolios items to show on each page.', 'auxin-portfolio'),
725
  'id' => 'portfolio_archive_items_perpage',
726
+ 'section' => 'portfolio-section-archive',
727
  'dependency' => array(),
728
  'transport' => 'refresh',
729
  'default' => '12',
734
  // Sub section - Portfolio Taxonomy Page -------------------------------
735
 
736
  $sections[] = array(
737
+ 'id' => 'portfolio-section-taxonomy',
738
+ 'parent' => 'portfolio-section', // section parent's id
739
  'title' => __( 'Portfolio Category & tag', 'auxin-portfolio'),
740
  'description' => __( 'Portfolio Category & tag page Setting', 'auxin-portfolio')
741
  );
744
  'title' => __('Taxonomy Page Template', 'auxin-portfolio'),
745
  'description' => 'Choose your category & tag page template.',
746
  'id' => 'portfolio_taxonomy_template_type',
747
+ 'section' => 'portfolio-section-taxonomy',
748
  'dependency' => array(),
749
  'transport' => 'refresh',
750
  'choices' => array(
774
  'title' => __('Image Aspect Ratio', 'auxin-portfolio'),
775
  'description' => '',
776
  'id' => 'portfolio_taxonomy_image_aspect_ratio',
777
+ 'section' => 'portfolio-section-taxonomy',
778
  'dependency' => array(
779
  array(
780
  'id' => 'portfolio_taxonomy_template_type',
797
  'title' => __('Portfolio Hover Type', 'auxin-portfolio'),
798
  'description' => __('Specifies the portfolio item type.', 'auxin-portfolio'),
799
  'id' => 'portfolio_taxonomy_grid_item_type',
800
+ 'section' => 'portfolio-section-taxonomy',
801
  'dependency' => array(
802
  array(
803
  'id' => 'portfolio_taxonomy_template_type',
823
  'title' => __('Tile Portfolio Item Type', 'auxin-portfolio'),
824
  'description' => __('Specifies the portfolio item type.', 'auxin-portfolio'),
825
  'id' => 'portfolio_taxonomy_tile_item_type',
826
+ 'section' => 'portfolio-section-taxonomy',
827
  'dependency' => array(
828
  array(
829
  'id' => 'portfolio_taxonomy_template_type',
846
  'title' => __('Space', 'auxin-portfolio'),
847
  'description' => __('Specifies space between items in pixels.', 'auxin-portfolio'),
848
  'id' => 'portfolio_taxonomy_grid_space',
849
+ 'section' => 'portfolio-section-taxonomy',
850
  'dependency' => array(
851
  array(
852
  'id' => 'portfolio_taxonomy_template_type',
863
  'title' => __('Number of Columns', 'auxin-portfolio'),
864
  'description' => '',
865
  'id' => 'portfolio_taxonomy_column_number',
866
+ 'section' => 'portfolio-section-taxonomy',
867
  'dependency' => array(
868
  array(
869
  'id' => 'portfolio_taxonomy_template_type',
884
  'title' => __('Number of Columns in Tablet', 'auxin-portfolio'),
885
  'description' => '',
886
  'id' => 'portfolio_taxonomy_column_number_tablet',
887
+ 'section' => 'portfolio-section-taxonomy',
888
  'dependency' => array(
889
  array(
890
  'id' => 'portfolio_taxonomy_template_type',
906
  'title' => __('Number of Columns in Mobile', 'auxin-portfolio'),
907
  'description' => '',
908
  'id' => 'portfolio_taxonomy_column_number_mobile',
909
+ 'section' => 'portfolio-section-taxonomy',
910
  'dependency' => array(
911
  array(
912
  'id' => 'portfolio_taxonomy_template_type',
927
  'title' => __('Display Like Button', 'auxin-portfolio'),
928
  'description' => sprintf(__('Enable it to display %s like button%s on portfolio portfolios. Please note WP Ulike plugin needs to be activaited to use this option.', 'auxin-portfolio'), '<strong>', '</strong>'),
929
  'id' => 'show_portfolio_taxonomy_like_button',
930
+ 'section' => 'portfolio-section-taxonomy',
931
  'dependency' => array(
932
  array(
933
  'id' => 'portfolio_taxonomy_template_type',
953
  'title' => __('Taxonomy Page Sidebar Position', 'auxin-portfolio'),
954
  'description' => 'Specifies the position of sidebar on category & tag page.',
955
  'id' => 'portfolio_taxonomy_sidebar_position',
956
+ 'section' => 'portfolio-section-taxonomy',
957
  'dependency' => array(),
958
  'post_js' => '$(".archive.tag main, .archive.tax-portfolio-cat main").alterClass( "*-sidebar", to );',
959
  'choices' => array(
994
  'title' => __('Sidebar Style', 'auxin-portfolio'),
995
  'description' => __('Specifies the style of sidebar on category & tag page.', 'auxin-portfolio'),
996
  'id' => 'portfolio_taxonomy_archive_sidebar_decoration',
997
+ 'section' => 'portfolio-section-taxonomy',
998
  'dependency' => array(
999
  array(
1000
  'id' => 'portfolio_taxonomy_sidebar_position',
1025
  'title' => __('Taxonomy content length', 'auxin-portfolio'),
1026
  'description' => sprintf(__('Whether to display%1$ssummary%2$sor%1$sfull%2$scontent for each portfolio on category & tag page.', 'auxin-portfolio'), '<code>', '</code>'),
1027
  'id' => 'portfolio_taxonomy_archive_content_on_listing',
1028
+ 'section' => 'portfolio-section-taxonomy',
1029
  'dependency' => array(),
1030
  'transport' => 'refresh',
1031
  'choices' => array(
1047
  'title' => __('Summery length', 'auxin-portfolio'),
1048
  'description' => __('Specifies summary character length on category & tag page.', 'auxin-portfolio'),
1049
  'id' => 'portfolio_taxonomy_archive_on_listing_length',
1050
+ 'section' => 'portfolio-section-taxonomy',
1051
  'dependency' => array(
1052
  array(
1053
  'id' => 'post_taxonomy_archive_content_on_listing',
1063
  // -------------------------------------------------------------------------
1064
 
1065
  $sections[] = array(
1066
+ 'id' => 'portfolio-section-metadata',
1067
+ 'parent' => 'portfolio-section', // section parent's id
1068
  'title' => __( 'Portfolio MetaData', 'auxin-portfolio'),
1069
  'description' => __( 'Portfolio MetaData Setting', 'auxin-portfolio')
1070
  );
1071
 
1072
+ $options[] = array(
1073
+ 'title' => __('Label for Launch Project Button', 'auxin-portfolio'),
1074
+ 'description' => __('Specify a label for launch project button.', 'auxin-portfolio'),
1075
+ 'id' => 'portfolio_metadata_launch_label',
1076
+ 'section' => 'portfolio-section-metadata',
1077
+ 'dependency' => array(),
1078
+ 'transport' => 'postMessage',
1079
+ 'post_js' => '$(".single-portfolio .entry-meta-data-container .aux-cta-button").html( to );',
1080
+ 'default' => __( 'Launch Project', 'auxin-portfolio' )
1081
+ );
1082
+
1083
  $options[] = array(
1084
  'title' => __('Portfolio MetaDatas', 'auxin-portfolio'),
1085
  'description' => __('Specify the number of fields and the label of each one for portfolio metadatas', 'auxin-portfolio'),
1086
  'id' => 'portfolio_metadata_list_1',
1087
+ 'section' => 'portfolio-section-metadata',
1088
  'dependency' => array(),
1089
  'transport' => 'post_js',
1090
  'choices' => array(
1138
  include AUXPFO_INC_DIR . '/classes/class-auxpfo-post-type-portfolio.php';
1139
 
1140
  $portfolio_instance = new Auxpfo_Post_Type_Portfolio();
1141
+ $portfolio_instance->register();
1142
 
1143
  if( is_admin() ){
1144
  $metabox_args['post_type'] = $post_type;
public/class-auxpfo.php CHANGED
@@ -118,8 +118,10 @@ class AUXPFO {
118
  $this->admin = include( AUXPFO_ADMIN_DIR . '/class-auxpfo-admin.php' );
119
  }
120
 
121
- // Load Frontend Functionality
122
- } else {
 
 
123
  include 'includes/index.php';
124
  }
125
 
118
  $this->admin = include( AUXPFO_ADMIN_DIR . '/class-auxpfo-admin.php' );
119
  }
120
 
121
+ }
122
+
123
+ // include the template parts only on frontend or during saving the page by siteorigin page builder
124
+ if( ! is_admin() || ! empty( $_POST['_sopanels_nonce'] ) ){
125
  include 'includes/index.php';
126
  }
127
 
public/includes/templates-post.php CHANGED
@@ -1,170 +1,5 @@
1
  <?php
2
 
3
- if ( ! function_exists('auxpfo_get_portfolio_config') ) {
4
-
5
- function auxpfo_get_portfolio_config( $post, $settings ) {
6
- global $aux_content_width;
7
-
8
- $defaults = array(
9
- 'request_from' => 'archive',
10
- 'content_width' => '',
11
- 'upscale_image' => true,
12
- 'preloadable_image' => false,
13
- 'media_size' => '', // large, medium, thumbnail
14
- 'aspect_ratio' => 1,
15
- 'add_image_hw' => true, // whether to add with and height attrs to image
16
- 'image_sizes' => array(),
17
- 'srcset_sizes' => array(),
18
- 'crop' => true
19
- );
20
-
21
- $settings = wp_parse_args( $settings, $defaults );
22
- extract( $settings );
23
-
24
- if ( empty( $media_width ) ) {
25
- $media_width = $aux_content_width;
26
- }
27
-
28
- $args = array(
29
- 'show_share_btn' => true,
30
- 'show_like_btn' => true,
31
- 'show_actions' => true,
32
- 'show_side' => true,
33
- 'show_title' => true,
34
- 'the_media' => '',
35
- 'the_attach' => '',
36
- 'has_attach' => false,
37
- 'post_class' => '',
38
- 'media_parent_class'=> '',
39
- 'media_class' => '',
40
- 'sticky_sidebar' => false,
41
- 'display_cat' => true
42
- );
43
-
44
- if( empty( $post ) ){
45
- return $args;
46
- }
47
-
48
-
49
- // get the post media layout
50
- if( 'default' == $media_layout = auxin_get_post_meta( $post->ID, '_media_layout', 'default' ) ){
51
- $media_layout = auxin_get_option( 'portfolio_single_media_layout' );
52
- }
53
-
54
- // get side position
55
- if( 'default' == $side_pos = auxin_get_post_meta( $post->ID, '_side_info_pos', 'default' ) ){
56
- // $side_pos = is_rtl() ? 'left' : 'right';
57
- $side_pos = auxin_get_option( 'portfolio_single_side_pos', 'right' );
58
- }
59
-
60
- // get display_cat
61
- if( 'default' == $display_cat = auxin_get_post_meta( $post->ID, '_side_info_dicplay_cat', 'default' ) ){
62
- $display_cat = auxin_get_option( 'portfolio_single_display_category', true );
63
- }
64
- $args['display_cat'] = ( $display_cat == "yes" || $display_cat === true )? true: false;
65
-
66
- // get display_tag
67
- if( 'default' == $display_tag = auxin_get_post_meta( $post->ID, '_side_info_dicplay_tag', 'default' ) ){
68
- $display_tag = auxin_get_option( 'portfolio_single_display_tag', true );
69
- }
70
- $args['display_tag'] = ($display_tag == "yes" || $display_tag === true )? true: false;
71
-
72
- if ( 'bottom' != $side_pos ) {
73
- if( 'default' == $sticky_sidebar = auxin_get_post_meta( $post->ID, '_sticky_sidebar', 'default' ) ){
74
- $sticky_sidebar = auxin_get_option( 'portfolio_single_stcky_sidebar', false );
75
- }
76
- // sticky sidebar
77
- $args['sticky_sidebar'] = ($sticky_sidebar == "yes" || $display_tag === true )? true: false;
78
- }
79
-
80
- // specify the side position
81
- $args['post_class'] .= 'aux-side-' . $side_pos;
82
-
83
- switch ( $media_layout ) {
84
- case 'classic':
85
- $args['media_parent_class'] = 'aux-stack';
86
- $args['media_class'] = 'aux-media-frame aux-media-image';
87
- break;
88
-
89
- case 'grid':
90
- $args['post_class'] .= ' portfolio-grid';
91
- $args['media_parent_class'] = 'aux-portolio-grid gallery-columns-2';
92
- $args['media_class'] = 'aux-portolio-grid-column';
93
- break;
94
-
95
- case 'masonry':
96
- case 'land':
97
- case 'tile':
98
- default:
99
-
100
- break;
101
- }
102
-
103
- if( ! empty( $media_size ) ){
104
- if( is_array( $media_size ) ){
105
- $media_size['width'] = ! empty( $media_size['width' ] ) ? $media_size['width' ] : '';
106
- $media_size['height'] = ! empty( $media_size['height'] ) ? $media_size['height'] : '';
107
-
108
- $size = array( 'width' => $media_size['width'], 'height' => $media_size['height'] );
109
- } else {
110
- $size = auxin_wp_get_image_size( $media_size );
111
- $size = array( 'width' => $size['width'], 'height' => $size['height'] );
112
- }
113
- } else {
114
- $size = array( 'width' => $media_width, 'height' => $media_width * $aspect_ratio );
115
- }
116
-
117
-
118
- if ( 'archive' == $request_from ) {
119
- $args['has_attach'] = has_post_thumbnail( $post->ID );
120
-
121
- if ( $args['has_attach'] ) {
122
- $args['the_attach'] = auxin_get_the_post_responsive_thumbnail(
123
- $post->ID,
124
- array(
125
- 'size' => $size,
126
- 'crop' => $crop,
127
- 'preloadable' => $preloadable_image,
128
- 'add_hw' => $add_image_hw,
129
- 'image_sizes' => $image_sizes,
130
- 'srcset_sizes' => $srcset_sizes,
131
- 'upscale' => $upscale_image
132
- )
133
- );
134
- }
135
-
136
- $args['the_media'] = '<div class="aux-media-frame aux-media-image">'.
137
- '<a href="'.get_permalink( $post->ID ).'">'.
138
- $args['the_attach'].
139
- '</a>'.
140
- '</div>';
141
- } else {
142
- $args['has_attach'] = ! auxin_get_post_meta( $post->ID, '_no_feature_image_in_single', 0 );
143
-
144
- if( $args['has_attach'] ){
145
- $args['the_media'] = get_the_post_thumbnail( $post->ID, 'large' );
146
- $args['has_attach'] = ! empty( $args['the_media'] );
147
- }
148
- }
149
-
150
- // Don't display post title if title bar is enable to prevent duplicated title in single page
151
- if( 'archive' !== $request_from && auxin_get_post_meta( $post->ID, 'aux_title_bar_show', 0 ) ) {
152
- $args['show_title'] = false;
153
- }
154
-
155
- // action buttons
156
- $args['show_share_btn'] = ( auxin_get_option( 'show_portfolio_single_share', true ) );
157
- $args['show_like_btn' ] = ( auxin_get_option( 'show_portfolio_single_like', true ) );
158
- $args['show_actions' ] = ( auxin_get_option( 'show_portfolio_single_share_like_section', true ) );
159
- if( !$args['show_share_btn'] && !$args['show_like_btn'] ) {
160
- $args['show_actions' ] = false;
161
- }
162
-
163
- return $args;
164
- }
165
-
166
- }
167
-
168
  /**
169
  * Retrieves the markup for related portfolios
170
  *
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /**
4
  * Retrieves the markup for related portfolios
5
  *
public/templates/theme-parts/entry/single-portfolio.php CHANGED
@@ -7,16 +7,21 @@
7
 
8
  <article id="post-<?php the_ID(); ?>" <?php post_class( $post_class ); ?> role="article" >
9
 
10
- <div class="entry-main">
11
  <?php
12
- if( $has_attach ) {
13
- echo '<div class="entry-media ' . $media_parent_class . '">' . $the_media . '</div>';
14
- }
15
- if ( $the_content = auxin_get_the_content() ) {
16
- echo '<div class="entry-content clearfix">' . $the_content . '</div>';
17
- }
 
 
 
 
 
 
 
18
  ?>
19
- </div>
20
  <!-- end of entry main -->
21
 
22
  <?php if( $show_side ) { ?>
@@ -41,7 +46,7 @@
41
  }
42
  if( $show_actions ) { ?>
43
  <div class="entry-actions">
44
- <?php
45
  if( function_exists( 'wp_ulike' ) && $show_like_btn ){
46
  echo aunin_wp_ulike_plugin_btn( array( 'theme_class' => 'wpulike-heart' ) );
47
  }
@@ -59,7 +64,7 @@
59
  <?php }
60
  } ?>
61
  </div>
62
-
63
  <?php
64
 
65
  if( $display_cat ) {
@@ -88,7 +93,7 @@
88
  // print the portfolio metadata
89
  $metafields = json_decode( auxin_get_option( 'portfolio_metadata_list_1' ), true );
90
 
91
- if (is_array( $metafields ) && !array_filter($metafields) ) {
92
  $display_metafields = true;
93
  } else { $display_metafields = false; }
94
 
@@ -127,13 +132,13 @@
127
  }
128
 
129
  echo '</dl></div>';
130
-
131
 
132
  if( $display_lunch ) {
133
  ?>
134
- <a href="<?php echo $lunch_btn_url; ?>" class="aux-button aux-black aux-medium aux-curve">
135
  <span class="aux-overlay"></span>
136
- <span class="aux-text"><?php _e( 'Lunch Project', 'auxin-portfolio' ); ?></span>
137
  </a>
138
  <?php }
139
  } // End of displaying condition
@@ -141,7 +146,20 @@
141
  </div>
142
  </div>
143
  <!-- end - Portfolio info -->
144
- <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
145
 
146
  </article> <!-- end article -->
147
 
7
 
8
  <article id="post-<?php the_ID(); ?>" <?php post_class( $post_class ); ?> role="article" >
9
 
 
10
  <?php
11
+ $entry_main = '<div class="entry-main">';
12
+ if( $has_attach ) {
13
+ $entry_main .= '<div class="entry-media ' . $media_parent_class . '">' . $the_media . '</div>';
14
+ }
15
+ if ( $the_content = auxin_get_the_content() ) {
16
+ $entry_main .= '<div class="entry-content clearfix">' . $the_content . '</div>';
17
+ }
18
+ $entry_main .= '</div>';
19
+
20
+ // print media on top if side position is right, left, bottom
21
+ if( 'top' !== $side_pos ){
22
+ echo $entry_main;
23
+ }
24
  ?>
 
25
  <!-- end of entry main -->
26
 
27
  <?php if( $show_side ) { ?>
46
  }
47
  if( $show_actions ) { ?>
48
  <div class="entry-actions">
49
+ <?php
50
  if( function_exists( 'wp_ulike' ) && $show_like_btn ){
51
  echo aunin_wp_ulike_plugin_btn( array( 'theme_class' => 'wpulike-heart' ) );
52
  }
64
  <?php }
65
  } ?>
66
  </div>
67
+
68
  <?php
69
 
70
  if( $display_cat ) {
93
  // print the portfolio metadata
94
  $metafields = json_decode( auxin_get_option( 'portfolio_metadata_list_1' ), true );
95
 
96
+ if (is_array( $metafields ) && !array_filter($metafields) ) {
97
  $display_metafields = true;
98
  } else { $display_metafields = false; }
99
 
132
  }
133
 
134
  echo '</dl></div>';
135
+
136
 
137
  if( $display_lunch ) {
138
  ?>
139
+ <a href="<?php echo $lunch_btn_url; ?>" class="aux-button aux-cta-button aux-black aux-medium aux-curve">
140
  <span class="aux-overlay"></span>
141
+ <span class="aux-text"><?php echo auxin_get_option( 'portfolio_metadata_launch_label' ); ?></span>
142
  </a>
143
  <?php }
144
  } // End of displaying condition
146
  </div>
147
  </div>
148
  <!-- end - Portfolio info -->
149
+ <?php }
150
+
151
+ // print media on bottom if side position is top
152
+ if( 'top' == $side_pos ){
153
+ echo $entry_main;
154
+ }
155
+
156
+ // clear the floated elements at the end of content
157
+ echo '<div class="clear"></div>';
158
+
159
+ // create pagination for page content
160
+ wp_link_pages( array( 'before' => '<div class="page-links"><span>' . __( 'Pages:', THEME_DOMAIN) .'</span>', 'after' => '</div>' ) );
161
+
162
+ ?>
163
 
164
  </article> <!-- end article -->
165