Premium Portfolio Features for Phlox theme - Version 1.6.6

Version Description

Download this release

Release Info

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

Code changes from version 1.6.5 to 1.6.6

README.txt CHANGED
@@ -7,7 +7,7 @@ Tags: page-builder, elementor, siteorigin, auxin, phlox, averta, fullwidth, maso
7
  Requires PHP: 5.4
8
  Requires at least: 4.6
9
  Tested up to: 4.9.7
10
- Stable tag: 1.6.5
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl.html
13
 
@@ -120,7 +120,7 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-por
120
 
121
  == Changelog ==
122
 
123
- = Version 1.6.5 / (27.06.2018) =
124
  - [New]: Introducing 4 New portfolio elements for Elementor page builder.
125
  - [Fix]: Minor bugs fixed.
126
 
@@ -202,6 +202,6 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-por
202
 
203
  == Upgrade Notice ==
204
 
205
- = 1.6.5 =
206
  - [New]: Introducing 4 New portfolio elements for Elementor page builder.
207
  - [Fix]: Minor bugs fixed.
7
  Requires PHP: 5.4
8
  Requires at least: 4.6
9
  Tested up to: 4.9.7
10
+ Stable tag: 1.6.6
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl.html
13
 
120
 
121
  == Changelog ==
122
 
123
+ = Version 1.6.6 / (27.06.2018) =
124
  - [New]: Introducing 4 New portfolio elements for Elementor page builder.
125
  - [Fix]: Minor bugs fixed.
126
 
202
 
203
  == Upgrade Notice ==
204
 
205
+ = 1.6.6 =
206
  - [New]: Introducing 4 New portfolio elements for Elementor page builder.
207
  - [Fix]: Minor bugs fixed.
auxin-portfolio.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Phlox Portfolio
13
  * Plugin URI: http://averta.net/phlox/
14
  * Description: Showcase your projects beautifully in Phlox theme
15
- * Version: 1.6.5
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * License: GPL2
@@ -59,19 +59,21 @@ if( is_admin() || false === get_transient( 'auxpfo_plugin_requirements_check' )
59
 
60
  'themes' => array(
61
  array(
62
- 'name' => __('Phlox Pro', 'auxin-portfolio'), // The theme name.
63
- 'id' => 'phlox-pro', // The theme id name.
64
- 'version' => '4.4.8', // E.g. 1.0.0. If set, the active theme must be this version or higher.
65
- 'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active.
66
- 'file_required' => get_template_directory() . '/auxin-content/init/const.php'
 
67
  ),
68
  array(
69
- 'name' => __('Phlox', 'auxin-portfolio'), // The theme name.
70
- 'id' => 'phlox', // The theme id name.
71
- 'update_link' => 'themes.php?theme=phlox',
72
- 'version' => '2.2.3', // E.g. 1.0.0. If set, the active theme must be this version or higher.
73
- 'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active.
74
- 'file_required' => get_template_directory() . '/auxin-content/init/const.php'
 
75
  )
76
  ),
77
 
12
  * Plugin Name: Phlox Portfolio
13
  * Plugin URI: http://averta.net/phlox/
14
  * Description: Showcase your projects beautifully in Phlox theme
15
+ * Version: 1.6.6
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * License: GPL2
59
 
60
  'themes' => array(
61
  array(
62
+ 'name' => __('Phlox Pro', 'auxin-portfolio'), // The theme name.
63
+ 'id' => 'phlox-pro', // The theme id name.
64
+ 'version' => '4.4.8', // E.g. 1.0.0. If set, the active theme must be this version or higher.
65
+ 'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active.
66
+ 'theme_requires_const' => 'AUXPFO_REQUIRED_VERSION',
67
+ 'file_required' => array( get_template_directory() . '/auxin-content/init/dependency.php', get_template_directory() . '/auxin-content/init/constant.php' )
68
  ),
69
  array(
70
+ 'name' => __('Phlox', 'auxin-portfolio'), // The theme name.
71
+ 'id' => 'phlox', // The theme id name.
72
+ 'update_link' => 'themes.php?theme=phlox',
73
+ 'version' => '2.2.5', // E.g. 1.0.0. If set, the active theme must be this version or higher.
74
+ 'is_callable' => '', // If set, this callable will be be checked for availability to determine if a theme is active.
75
+ 'theme_requires_const' => 'AUXPFO_REQUIRED_VERSION',
76
+ 'file_required' => array( get_template_directory() . '/auxin-content/init/dependency.php', get_template_directory() . '/auxin-content/init/constant.php' )
77
  )
78
  ),
79
 
includes/classes/class-auxin-plugin-requirements.php CHANGED
@@ -259,6 +259,11 @@ if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
259
 
260
  }
261
 
 
 
 
 
 
262
  /**
263
  * Check them requirements
264
  *
@@ -282,8 +287,25 @@ if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
282
  }
283
  $theme_requirement = apply_filters( 'auxin_plugin_requirements_theme_dependency', $theme_requirement, $theme_requirement['id'] );
284
 
285
- if ( ! empty( $theme_requirement['file_required'] ) && file_exists( $theme_requirement['file_required'] ) ){
286
- require_once( $theme_requirement['file_required'] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
  } else {
288
  $this->requirements_passed = false;
289
  continue;
@@ -294,6 +316,28 @@ if( ! class_exists( 'Auxin_Plugin_Requirements' ) ){
294
  continue;
295
  }
296
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  if ( $theme_requirement['version'] ){
298
 
299
  $theme_data = wp_get_theme();
259
 
260
  }
261
 
262
+ /**
263
+ * Check them requirements
264
+ *
265
+ * @return void
266
+ */
267
  /**
268
  * Check them requirements
269
  *
287
  }
288
  $theme_requirement = apply_filters( 'auxin_plugin_requirements_theme_dependency', $theme_requirement, $theme_requirement['id'] );
289
 
290
+ if ( ! empty( $theme_requirement['file_required'] ) ){
291
+ if( is_array( $theme_requirement['file_required'] ) ){
292
+
293
+ foreach ( $theme_requirement['file_required'] as $the_required_file_path ) {
294
+
295
+ if( file_exists( $the_required_file_path ) ){
296
+ require_once( $the_required_file_path );
297
+ } else {
298
+ $this->requirements_passed = false;
299
+ continue 2;
300
+ }
301
+ }
302
+
303
+ } elseif( file_exists( $theme_requirement['file_required'] ) ){
304
+ require_once( $theme_requirement['file_required'] );
305
+ } else {
306
+ $this->requirements_passed = false;
307
+ continue;
308
+ }
309
  } else {
310
  $this->requirements_passed = false;
311
  continue;
316
  continue;
317
  }
318
 
319
+ if( ! empty( $theme_requirement['theme_requires_const'] ) && defined( $theme_requirement['theme_requires_const'] ) ){
320
+
321
+ $all_plugins = $this->get_plugins();
322
+
323
+ if( ! empty( $all_plugins[ $this->requirements['config']['plugin_basename'] ]['Version'] ) ){
324
+ $plugin_info = $all_plugins[ $this->requirements['config']['plugin_basename'] ];
325
+
326
+ if( version_compare( $plugin_info['Version'], constant( $theme_requirement['theme_requires_const'] ), '<' ) ){
327
+ $this->admin_notices['theme'] .= sprintf(
328
+ __( '%s theme requires %s plugin version %s or higher in order to function property. Your current plugin version is %s, please update it to latest version.', 'auxin-portfolio' ),
329
+ THEME_NAME_I18N,
330
+ '<strong>'. $plugin_info['Name'] . '</strong>',
331
+ '<strong>'. constant( $theme_requirement['theme_requires_const'] ) . '</strong>',
332
+ '<strong>'. $plugin_info['Version'] . '</strong>'
333
+ );
334
+
335
+ $this->requirements_passed = false;
336
+ continue;
337
+ }
338
+ }
339
+ }
340
+
341
  if ( $theme_requirement['version'] ){
342
 
343
  $theme_data = wp_get_theme();
includes/define.php CHANGED
@@ -15,7 +15,7 @@ if( ! defined( 'THEME_NAME' ) ){
15
 
16
 
17
 
18
- define( 'AUXPFO_VERSION' , '1.6.5' );
19
 
20
  define( 'AUXPFO_SLUG' , 'auxin-portfolio' );
21
 
15
 
16
 
17
 
18
+ define( 'AUXPFO_VERSION' , '1.6.6' );
19
 
20
  define( 'AUXPFO_SLUG' , 'auxin-portfolio' );
21