Shortcodes and extra features for Phlox theme - Version 1.3.2

Version Description

Download this release

Release Info

Developer averta
Plugin Icon 128x128 Shortcodes and extra features for Phlox theme
Version 1.3.2
Comparing to
See all releases

Code changes from version 1.3.1 to 1.3.2

Files changed (53) hide show
  1. README.txt +15 -4
  2. admin/includes/metaboxes/metabox-fields-post-audio.php +1 -1
  3. admin/includes/metaboxes/metabox-fields-post-gallery.php +1 -1
  4. admin/includes/metaboxes/metabox-fields-post-quote.php +1 -1
  5. admin/includes/metaboxes/metabox-fields-post-video.php +1 -1
  6. auxin-elements.php +18 -5
  7. includes/classes/class-auxin-siteorigin-widget.php +1 -1
  8. includes/classes/class-auxin-widget-shortcode-map.php +5 -2
  9. includes/define.php +1 -2
  10. includes/elements/about-widget.php +1 -1
  11. includes/elements/accordion.php +1 -1
  12. includes/elements/attachment-url.php +1 -1
  13. includes/elements/audio.php +1 -1
  14. includes/elements/before-after.php +244 -0
  15. includes/elements/button.php +3 -3
  16. includes/elements/code.php +1 -1
  17. includes/elements/contact-box.php +1 -1
  18. includes/elements/contact-form.php +1 -1
  19. includes/elements/divider.php +1 -1
  20. includes/elements/dropcap.php +1 -1
  21. includes/elements/facebook.php +1 -1
  22. includes/elements/flickr.php +1 -1
  23. includes/elements/gallery.php +238 -284
  24. includes/elements/gmap.php +1 -1
  25. includes/elements/highlight.php +1 -1
  26. includes/elements/image.php +7 -3
  27. includes/elements/instagram-feed.php +1 -1
  28. includes/elements/latest-posts-slider.php +3 -4
  29. includes/elements/popular-posts-widget.php +1 -1
  30. includes/elements/quote.php +1 -1
  31. includes/elements/recent-posts-grid-carousel.php +122 -71
  32. includes/elements/recent-posts-land-style.php +65 -47
  33. includes/elements/recent-posts-masonry.php +74 -64
  34. includes/elements/recent-posts-tiles.php +61 -116
  35. includes/elements/recent-posts-timeline.php +95 -79
  36. includes/elements/recent-posts-widget.php +1 -1
  37. includes/elements/related-posts.php +129 -0
  38. includes/elements/sample-element.php +1 -1
  39. includes/elements/search.php +1 -1
  40. includes/elements/slider.php +0 -0
  41. includes/elements/socials-list.php +1 -1
  42. includes/elements/tabs.php +1 -1
  43. includes/elements/text.php +2 -2
  44. includes/elements/touch-slider.php +301 -0
  45. includes/elements/video.php +1 -1
  46. includes/general-functions.php +1 -1
  47. includes/general-hooks.php +1 -1
  48. includes/index.php +5 -1
  49. languages/fa_IR.po +1 -1
  50. public/class-auxels.php +3 -3
  51. public/includes/class-auxels-frontend-assets.php +1 -1
  52. public/templates/vcomposer/auxin_shortcode_mapper.php +1 -1
  53. uninstall.php +1 -1
README.txt CHANGED
@@ -6,7 +6,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
6
  Tags: banner SEO, shortcode, page-builder, siteorigin, auxin, framework, widget, element, phlox, averta, fullwidth, masonry, timeline
7
  Requires at least: 4.4
8
  Tested up to: 4.7.0
9
- Stable tag: 1.3.1
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl.html
12
 
@@ -140,6 +140,17 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
140
 
141
  == Changelog ==
142
 
 
 
 
 
 
 
 
 
 
 
 
143
  = Version 1.3.1 / (20.12.2016) =
144
  - [Improvement]: New styles and options added to code element
145
  - [Improvement]: Adding responsive options to row and column shortcodes
@@ -178,6 +189,6 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
178
 
179
  == Upgrade Notice ==
180
 
181
- = 1.3.1 =
182
- - [Improvement]: New styles and options added to code element
183
- - [Improvement]: Adding responsive options to row and column shortcodes
6
  Tags: banner SEO, shortcode, page-builder, siteorigin, auxin, framework, widget, element, phlox, averta, fullwidth, masonry, timeline
7
  Requires at least: 4.4
8
  Tested up to: 4.7.0
9
+ Stable tag: 1.3.2
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl.html
12
 
140
 
141
  == Changelog ==
142
 
143
+ = Version 1.3.2 / (08.01.2017) =
144
+ - [New]: Introducing Before after slider element to show comparison between two images.
145
+ - [New]: New slider element "touch image slider" added, now you can insert any image as a slider in any page via page builder
146
+ - [New]: Introducing tiles layout for auxin gallery element
147
+ - [Improvement]: The latest post slider and grid carousel improved.
148
+ - [Improvement]: The Recent grid blog element improved.
149
+ - [Improvement]: Column option for grid and masonry elements.
150
+ - [Improvement]: The functionality of lightbox in image element lightbox improved
151
+ - [Fix]: Minor bugs fixed.
152
+
153
+
154
  = Version 1.3.1 / (20.12.2016) =
155
  - [Improvement]: New styles and options added to code element
156
  - [Improvement]: Adding responsive options to row and column shortcodes
189
 
190
  == Upgrade Notice ==
191
 
192
+ = 1.3.2 =
193
+ - [New]: Introducing Before after slider element to show comparison between two images.
194
+ - [New]: Introducing tiles layout for auxin gallery element
admin/includes/metaboxes/metabox-fields-post-audio.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  // no direct access allowed
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  // no direct access allowed
admin/includes/metaboxes/metabox-fields-post-gallery.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  // no direct access allowed
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  // no direct access allowed
admin/includes/metaboxes/metabox-fields-post-quote.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  // no direct access allowed
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  // no direct access allowed
admin/includes/metaboxes/metabox-fields-post-video.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  // no direct access allowed
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  // no direct access allowed
auxin-elements.php CHANGED
@@ -7,18 +7,18 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  *
12
  * Plugin Name: Auxin Essential Elements
13
  * Plugin URI: https://wordpress.org/plugins/auxin-elements/
14
  * Description: Powerful and comprehensive plugin that extends the functionality of Phlox theme by adding new shortcodes, widgets and options
15
- * Version: 1.3.1
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
19
  * License URI: LICENSE.txt
20
  * Domain Path: /languages
21
- * Tested up to: 4.6.1
22
  */
23
 
24
  // If this file is called directly, abort.
@@ -31,18 +31,30 @@ if ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) {
31
  return;
32
  }
33
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  function auel_requirement_notice() {
35
  echo '<div class="error"><p>' . __( 'PHP version 5.3.0 or above is required for "Auxin Elements" plugin', 'auxin-elements' ) . '</p></div>';
36
  }
37
-
38
  if ( version_compare( PHP_VERSION, '5.3.0', '<' ) ) {
39
  add_action( 'admin_notices', 'auel_requirement_notice' );
40
  return;
41
  }
42
 
 
43
  // Check if the theme meets the plugin requirements
44
  function auel_auxin_theme_requirement_notice() {
45
- if ( defined('THEME_VERSION') && version_compare( THEME_VERSION, '1.5.8', '<' ) ) {
46
  echo '<div class="error"><p>'.
47
  sprintf(
48
  __( 'You are using %1$s theme version %2$s. You need to update the %1$s theme to latest version in order to use %3$s plugin', 'auxin-elements' ),
@@ -55,6 +67,7 @@ function auel_auxin_theme_requirement_notice() {
55
  }
56
  add_action( 'admin_notices', 'auel_auxin_theme_requirement_notice' );
57
 
 
58
  /*----------------------------------------------------------------------------*/
59
 
60
  require_once( plugin_dir_path( __FILE__ ) . 'includes/define.php' );
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  *
12
  * Plugin Name: Auxin Essential Elements
13
  * Plugin URI: https://wordpress.org/plugins/auxin-elements/
14
  * Description: Powerful and comprehensive plugin that extends the functionality of Phlox theme by adding new shortcodes, widgets and options
15
+ * Version: 1.3.2
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
19
  * License URI: LICENSE.txt
20
  * Domain Path: /languages
21
+ * Tested up to: 4.7.0
22
  */
23
 
24
  // If this file is called directly, abort.
31
  return;
32
  }
33
 
34
+ /*----------------------------------------------------------------------------*/
35
+
36
+
37
+ // Run the plugin only for Phlox theme
38
+ if ( ! wp_installing() || 'wp-activate.php' === $pagenow ) {
39
+ if ( ! file_exists( get_template_directory() . '/auxin/auxin-include/auxin.php' ) ){
40
+ return;
41
+ }
42
+ }
43
+
44
+
45
+ // Make sure the client has PHP version 5.3 or higher, otherwise, throw a notice
46
  function auel_requirement_notice() {
47
  echo '<div class="error"><p>' . __( 'PHP version 5.3.0 or above is required for "Auxin Elements" plugin', 'auxin-elements' ) . '</p></div>';
48
  }
 
49
  if ( version_compare( PHP_VERSION, '5.3.0', '<' ) ) {
50
  add_action( 'admin_notices', 'auel_requirement_notice' );
51
  return;
52
  }
53
 
54
+
55
  // Check if the theme meets the plugin requirements
56
  function auel_auxin_theme_requirement_notice() {
57
+ if ( defined('THEME_VERSION') && version_compare( THEME_VERSION, '1.6.0', '<' ) ) {
58
  echo '<div class="error"><p>'.
59
  sprintf(
60
  __( 'You are using %1$s theme version %2$s. You need to update the %1$s theme to latest version in order to use %3$s plugin', 'auxin-elements' ),
67
  }
68
  add_action( 'admin_notices', 'auel_auxin_theme_requirement_notice' );
69
 
70
+
71
  /*----------------------------------------------------------------------------*/
72
 
73
  require_once( plugin_dir_path( __FILE__ ) . 'includes/define.php' );
includes/classes/class-auxin-siteorigin-widget.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  // no direct access allowed
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  // no direct access allowed
includes/classes/class-auxin-widget-shortcode-map.php CHANGED
@@ -8,7 +8,7 @@
8
  * @license LICENSE.txt
9
  * @author
10
  * @link https://bitbucket.org/averta/
11
- * @copyright (c) 2010-2016
12
  */
13
 
14
  // no direct access allowed
@@ -223,7 +223,7 @@ class Auxin_Widget_Shortcode_Map {
223
  $widget_params['value'] = $param['def_value'];
224
  }
225
  elseif( 1 ) {
226
- $widget_params['value'] = $param['value'];
227
  }
228
  if( $widget_params['type'] == 'aux_visual_select' ) {
229
  $widget_params['choices'] = $param['choices'];
@@ -339,6 +339,9 @@ class Auxin_Widget_Shortcode_Map {
339
  */
340
  function add_siteorigin_widget_object( $object, $widget ) {
341
 
 
 
 
342
  $master_array = $this->get_master_array();
343
 
344
  if ( ! isset( $master_array[ $widget ] ) ) {
8
  * @license LICENSE.txt
9
  * @author
10
  * @link https://bitbucket.org/averta/
11
+ * @copyright (c) 2010-2017
12
  */
13
 
14
  // no direct access allowed
223
  $widget_params['value'] = $param['def_value'];
224
  }
225
  elseif( 1 ) {
226
+ $widget_params['value'] = isset( $param['value'] ) ? $param['value'] : '';
227
  }
228
  if( $widget_params['type'] == 'aux_visual_select' ) {
229
  $widget_params['choices'] = $param['choices'];
339
  */
340
  function add_siteorigin_widget_object( $object, $widget ) {
341
 
342
+ // Try to load the class again if the auxin-elements plugin was loaded prior to siteorigin
343
+ include AUXELS_INC_DIR . '/classes/class-auxin-siteorigin-widget.php';
344
+
345
  $master_array = $this->get_master_array();
346
 
347
  if ( ! isset( $master_array[ $widget ] ) ) {
includes/define.php CHANGED
@@ -12,10 +12,9 @@ if( ! defined( 'THEME_NAME' ) ){
12
  }
13
 
14
 
15
- define( 'AUXELS_VERSION' , '1.3.1' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
- define( 'AUXELS_TEXT_DOMAIN' , 'auxin-elements' );
19
 
20
 
21
  define( 'AUXELS_DIR' , dirname( plugin_dir_path( __FILE__ ) ) );
12
  }
13
 
14
 
15
+ define( 'AUXELS_VERSION' , '1.3.2' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
 
18
 
19
 
20
  define( 'AUXELS_DIR' , dirname( plugin_dir_path( __FILE__ ) ) );
includes/elements/about-widget.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  function get_auxin_about_widget( $master_array ) {
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  function get_auxin_about_widget( $master_array ) {
includes/elements/accordion.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  function auxin_get_new_accordion_master_array( $master_array ) {
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  function auxin_get_new_accordion_master_array( $master_array ) {
includes/elements/attachment-url.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  add_shortcode( 'aux_attach_url', 'auxin_shortcode_attach_id' );
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  add_shortcode( 'aux_attach_url', 'auxin_shortcode_attach_id' );
includes/elements/audio.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
  function auxin_get_audio_master_array( $master_array ) {
13
 
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
  function auxin_get_audio_master_array( $master_array ) {
13
 
includes/elements/before-after.php ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Before after slider element
4
+ *
5
+ *
6
+ * @package auxin-elements
7
+ * @license LICENSE.txt
8
+ * @author
9
+ * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
+ */
12
+ function auxin_get_before_after_master_array( $master_array ) {
13
+
14
+ $master_array['aux_before_after'] = array(
15
+ 'name' => __("[Phlox] Before After Slider", 'auxin-elements' ),
16
+ 'auxin_output_callback' => 'auxin_widget_before_after_callback',
17
+ 'base' => 'aux_before_after',
18
+ 'description' => __('Before after comparison slider.', 'auxin-elements' ),
19
+ 'class' => 'aux-widget-before-after',
20
+ 'show_settings_on_create' => true,
21
+ 'weight' => 1,
22
+ 'is_widget' => true,
23
+ 'is_shortcode' => true,
24
+ 'is_so' => true,
25
+ 'is_vc' => true,
26
+ 'category' => THEME_NAME,
27
+ 'group' => '',
28
+ 'admin_enqueue_js' => '',
29
+ 'admin_enqueue_css' => '',
30
+ 'front_enqueue_js' => '',
31
+ 'front_enqueue_css' => '',
32
+ 'icon' => 'auxin-element auxin-image',
33
+ 'custom_markup' => '',
34
+ 'js_view' => '',
35
+ 'html_template' => '',
36
+ 'deprecated' => '',
37
+ 'content_element' => '',
38
+ 'as_parent' => '',
39
+ 'as_child' => '',
40
+ 'params' => array(
41
+ array(
42
+ 'heading' => __('Title','auxin-elements' ),
43
+ 'description' => __('Element title, leave it empty if you don`t need title.', 'auxin-elements'),
44
+ 'param_name' => 'title',
45
+ 'type' => 'textfield',
46
+ 'value' => '',
47
+ 'def_value' => '',
48
+ 'holder' => 'textfield',
49
+ 'class' => 'id',
50
+ 'admin_label' => true,
51
+ 'dependency' => '',
52
+ 'weight' => '',
53
+ 'group' => '' ,
54
+ 'edit_field_class' => ''
55
+ ),
56
+ array(
57
+ 'heading' => __('Before image','auxin-elements' ),
58
+ 'description' => '',
59
+ 'param_name' => 'before_attach_id',
60
+ 'type' => 'attach_image',
61
+ 'value' => '',
62
+ 'def_value' => '',
63
+ 'holder' => 'textfield',
64
+ 'class' => 'before_attach_id',
65
+ 'admin_label' => false,
66
+ 'dependency' => '',
67
+ 'weight' => '',
68
+ 'group' => '' ,
69
+ 'edit_field_class' => ''
70
+ ),
71
+ array(
72
+ 'heading' => __('After image','auxin-elements' ),
73
+ 'description' => '',
74
+ 'param_name' => 'after_attach_id',
75
+ 'type' => 'attach_image',
76
+ 'value' => '',
77
+ 'def_value' => '',
78
+ 'holder' => 'textfield',
79
+ 'class' => 'after_attach_id',
80
+ 'admin_label' => false,
81
+ 'dependency' => '',
82
+ 'weight' => '',
83
+ 'group' => '' ,
84
+ 'edit_field_class' => ''
85
+ ),
86
+
87
+ array(
88
+ 'heading' => __( 'Start offset','auxin-elements' ),
89
+ 'description' => __( 'How much of the before image is visible when the page loads, between 0 to 1.', 'auxin-elements' ),
90
+ 'param_name' => 'default_offset',
91
+ 'type' => 'textfield',
92
+ 'value' => '0.5',
93
+ 'def_value' => '',
94
+ 'holder' => 'textfield',
95
+ 'class' => 'default_offset',
96
+ 'admin_label' => false,
97
+ 'dependency' => '',
98
+ 'weight' => '',
99
+ 'group' => '' ,
100
+ 'edit_field_class' => ''
101
+ ),
102
+
103
+ array(
104
+ 'heading' => __('Image size','auxin-elements' ),
105
+ 'description' => '',
106
+ 'param_name' => 'size',
107
+ 'type' => 'dropdown',
108
+ 'def_value' => 'large',
109
+ 'value' => array(
110
+ 'thumbnail' => __('Thumbnail' , 'auxin-elements' ),
111
+ 'medium' => __('Medium' , 'auxin-elements' ),
112
+ 'large' => __('Large' , 'auxin-elements' ),
113
+ 'full' => __('Full' , 'auxin-elements' )
114
+ ),
115
+ 'holder' => 'dropdown',
116
+ 'admin_label' => false,
117
+ 'dependency' => '',
118
+ 'weight' => '',
119
+ 'group' => '' ,
120
+ 'edit_field_class' => ''
121
+ ),
122
+
123
+ array(
124
+ 'heading' => __('Width','auxin-elements' ),
125
+ 'description' => '',
126
+ 'param_name' => 'width',
127
+ 'type' => 'textfield',
128
+ 'value' => '',
129
+ 'def_value' => '',
130
+ 'holder' => 'textfield',
131
+ 'class' => 'width',
132
+ 'admin_label' => false,
133
+ 'dependency' => '',
134
+ 'weight' => '',
135
+ 'group' => '' ,
136
+ 'edit_field_class' => ''
137
+ ),
138
+
139
+ array(
140
+ 'heading' => __('Height','auxin-elements' ),
141
+ 'description' => '',
142
+ 'param_name' => 'height',
143
+ 'type' => 'textfield',
144
+ 'value' => '',
145
+ 'def_value' => '',
146
+ 'holder' => 'textfield',
147
+ 'class' => 'height',
148
+ 'admin_label' => false,
149
+ 'dependency' => '',
150
+ 'weight' => '',
151
+ 'group' => '' ,
152
+ 'edit_field_class' => ''
153
+ ),
154
+
155
+ array(
156
+ 'heading' => __('Extra class name','auxin-elements' ),
157
+ '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-elements' ),
158
+ 'param_name' => 'extra_classes',
159
+ 'type' => 'textfield',
160
+ 'value' => '',
161
+ 'def_value' => '',
162
+ 'holder' => 'textfield',
163
+ 'class' => 'extra_classes',
164
+ 'admin_label' => false,
165
+ 'dependency' => '',
166
+ 'weight' => '',
167
+ 'group' => '' ,
168
+ 'edit_field_class' => ''
169
+ )
170
+
171
+ )
172
+ );
173
+
174
+ return $master_array;
175
+ }
176
+
177
+ add_filter( 'auxin_master_array_shortcodes', 'auxin_get_before_after_master_array', 10, 1 );
178
+
179
+ // This is the widget call back in fact the front end out put of this widget comes from this function
180
+ function auxin_widget_before_after_callback( $atts, $shortcode_content = null ){
181
+
182
+ // Defining default attributes
183
+ $default_atts = array(
184
+ 'title' => '', // header title
185
+ 'before_attach_id' => '', // attachment id of before image
186
+ 'after_attach_id' => '', // attachment id of after image
187
+ 'width' => '', // final width of image
188
+ 'height' => '', // final height of image
189
+ 'size' => 'large',
190
+ 'crop' => true,
191
+ 'default_offset' => '0.5',
192
+ 'extra_classes' => '', // custom css class names for this element
193
+ 'custom_el_id' => '', // custom id attribute for this element
194
+ 'base_class' => 'aux-widget-before-after' // base class name for container
195
+ );
196
+
197
+ $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
198
+ extract( $result['parsed_atts'] );
199
+
200
+ $before_image = '';
201
+ $after_image = '';
202
+ $style_attr = '';
203
+
204
+ if ( ! empty( $width ) && is_numeric( $width ) ) {
205
+ $style_attr .= 'max-width:' . $width . 'px;';
206
+ }
207
+
208
+ if ( ! empty( $height ) && is_numeric( $height ) ) {
209
+ $style_attr .= 'max-height:' . $height . 'px ';
210
+ }
211
+
212
+ if( ! empty( $before_attach_id ) && is_numeric( $before_attach_id ) ) {
213
+ $before_image = wp_get_attachment_image( $before_attach_id, $size );
214
+ }
215
+
216
+ if( ! empty( $after_attach_id ) && is_numeric( $after_attach_id ) ) {
217
+ $after_image = wp_get_attachment_image( $after_attach_id, $size );
218
+ }
219
+
220
+ ob_start();
221
+
222
+ // widget header ------------------------------
223
+ echo $result['widget_header'];
224
+ echo $result['widget_title'];
225
+
226
+ // widget output -----------------------
227
+ if ( !empty( $after_image ) ) {
228
+ ?>
229
+ <div class="aux-before-after" style="<?php echo $style_attr ?>" data-offset="<?php echo $default_offset; ?>">
230
+ <?php echo $before_image ?>
231
+ <?php echo $after_image; ?>
232
+ </div>
233
+ <?php } else { ?>
234
+ <div class="aux-before-after" style="<?php echo $style_attr ?>" data-offset="<?php echo $default_offset; ?>">
235
+ <?php echo $before_image ?>
236
+ </div>
237
+ <?php
238
+ }
239
+
240
+ // widget footer ------------------------------
241
+ echo $result['widget_footer'];
242
+
243
+ return ob_get_clean();
244
+ }
includes/elements/button.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  function auxin_get_button_master_array( $master_array ) {
@@ -205,9 +205,9 @@ function auxin_get_button_master_array( $master_array ) {
205
  'heading' => __('Color of button','auxin-elements' ),
206
  'description' => '',
207
  'param_name' => 'color_name',
208
- 'type' => 'dropdown',
209
  'def_value' => 'carmine-pink',
210
- 'value' => auxin_get_famous_colors_list(),
211
  'holder' => '',
212
  'class' => 'color',
213
  'admin_label' => true,
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  function auxin_get_button_master_array( $master_array ) {
205
  'heading' => __('Color of button','auxin-elements' ),
206
  'description' => '',
207
  'param_name' => 'color_name',
208
+ 'type' => 'aux_visual_select',
209
  'def_value' => 'carmine-pink',
210
+ 'choices' => auxin_get_famous_colors_list(),
211
  'holder' => '',
212
  'class' => 'color',
213
  'admin_label' => true,
includes/elements/code.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  function auxin_get_code_master_array( $master_array ) {
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  function auxin_get_code_master_array( $master_array ) {
includes/elements/contact-box.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  function get_auxin_contact_box( $master_array ) {
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  function get_auxin_contact_box( $master_array ) {
includes/elements/contact-form.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  function auxin_get_contact_form_master_array( $master_array ) {
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  function auxin_get_contact_form_master_array( $master_array ) {
includes/elements/divider.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  function auxin_get_divider_master_array( $master_array ) {
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  function auxin_get_divider_master_array( $master_array ) {
includes/elements/dropcap.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
  function auxin_get_dropcap_master_array( $master_array ) {
13
 
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
  function auxin_get_dropcap_master_array( $master_array ) {
13
 
includes/elements/facebook.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  function auxin_get_facebook_master_array( $master_array ) {
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  function auxin_get_facebook_master_array( $master_array ) {
includes/elements/flickr.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  function auxin_get_flickr_master_array( $master_array ) {
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  function auxin_get_flickr_master_array( $master_array ) {
includes/elements/gallery.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
  function auxin_get_gallery_master_array( $master_array ) {
13
 
@@ -68,28 +68,6 @@ function auxin_get_gallery_master_array( $master_array ) {
68
  'group' => '' ,
69
  'edit_field_class' => ''
70
  ),
71
- array(
72
- 'heading' => __('Column number','auxin-elements'),
73
- 'description' => '',
74
- 'param_name' => 'columns',
75
- 'type' => 'dropdown',
76
- 'value' => array(
77
- '1' => __('1 Column' , 'auxin-elements'),
78
- '2' => __('2 Columns', 'auxin-elements'),
79
- '3' => __('3 Columns', 'auxin-elements'),
80
- '4' => __('4 Columns', 'auxin-elements'),
81
- '5' => __('5 Columns', 'auxin-elements'),
82
- '6' => __('6 Columns', 'auxin-elements')
83
- ),
84
- 'def_value' => '2',
85
- 'holder' => 'dropdown',
86
- 'class' => 'columns',
87
- 'admin_label' => true,
88
- 'dependency' => '',
89
- 'weight' => '',
90
- 'group' => '' ,
91
- 'edit_field_class' => ''
92
- ),
93
  array(
94
  'heading' => __('Order images by query','auxin-elements'),
95
  'description' => '',
@@ -155,7 +133,8 @@ function auxin_get_gallery_master_array( $master_array ) {
155
  'def_value' => 'grid',
156
  'value' => array(
157
  'grid' => __('Grid', 'auxin-elements'),
158
- 'masonry' => __('Masonry', 'auxin-elements')//,
 
159
  //'justify-rows' => __('Justify rows', 'auxin-elements')
160
  ),
161
  'holder' => 'dropdown',
@@ -166,6 +145,69 @@ function auxin_get_gallery_master_array( $master_array ) {
166
  'group' => '' ,
167
  'edit_field_class' => ''
168
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  array(
170
  'heading' => __('Space','auxin-elements'),
171
  'description' => __('Space between gallery items in pixel.', 'auxin-elements'),
@@ -175,8 +217,34 @@ function auxin_get_gallery_master_array( $master_array ) {
175
  'def_value' => '',
176
  'holder' => 'textfield',
177
  'class' => 'space',
178
- 'admin_label' => true,
179
- 'dependency' => '',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  'weight' => '',
181
  'group' => '' ,
182
  'edit_field_class' => ''
@@ -202,20 +270,12 @@ function auxin_get_gallery_master_array( $master_array ) {
202
  'edit_field_class' => ''
203
  ),
204
  array(
205
- 'heading' => __('Image size','auxin-elements'),
206
  'description' => '',
207
- 'param_name' => 'size',
208
- 'type' => 'dropdown',
209
- 'def_value' => 'medium',
210
- 'value' => array(
211
- 'full' => __('Original' , 'auxin-elements'),
212
- 'large' => __('Large' , 'auxin-elements'),
213
- 'medium' => __('Medium' , 'auxin-elements'),
214
- 'small' => __('Small' , 'auxin-elements'),
215
- 'thumbnail' => __('Thumbnail' , 'auxin-elements')
216
- ),
217
- 'holder' => 'dropdown',
218
- 'class' => 'size',
219
  'admin_label' => true,
220
  'dependency' => '',
221
  'weight' => '',
@@ -223,14 +283,17 @@ function auxin_get_gallery_master_array( $master_array ) {
223
  'edit_field_class' => ''
224
  ),
225
  array(
226
- 'heading' => __('Enable pagination','auxin-elements'),
227
- 'description' => '',
228
- 'param_name' => 'pagination',
229
  'type' => 'aux_switch',
230
  'value' => '0',
231
  'class' => '',
232
  'admin_label' => true,
233
- 'dependency' => '',
 
 
 
234
  'weight' => '',
235
  'group' => '' ,
236
  'edit_field_class' => ''
@@ -244,7 +307,7 @@ function auxin_get_gallery_master_array( $master_array ) {
244
  'def_value' => '',
245
  'holder' => 'textfield',
246
  'class' => 'id',
247
- 'admin_label' => true,
248
  'dependency' => array(
249
  'element' => 'pagination',
250
  'value' => '1'
@@ -262,13 +325,12 @@ function auxin_get_gallery_master_array( $master_array ) {
262
  'def_value' => '',
263
  'holder' => 'textfield',
264
  'class' => 'extra_classes',
265
- 'admin_label' => true,
266
  'dependency' => '',
267
  'weight' => '',
268
  'group' => '' ,
269
  'edit_field_class' => ''
270
  )
271
-
272
  )
273
  );
274
 
@@ -277,64 +339,32 @@ function auxin_get_gallery_master_array( $master_array ) {
277
 
278
  add_filter( 'auxin_master_array_shortcodes', 'auxin_get_gallery_master_array', 10, 1 );
279
 
280
-
281
-
282
-
283
-
284
-
285
  // This is the widget call back in fact the front end out put of this widget comes from this function
286
  function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
287
-
288
- global $axi_img_size;
289
- $post = get_post();
290
-
291
- static $instance = 0;
292
- $instance++;
293
-
294
  if ( ! empty( $attr['ids'] ) ) {
295
- // 'ids' is explicitly ordered, unless you specify otherwise.
296
- if ( empty( $attr['orderby'] ) ) {
297
- $attr['orderby'] = 'post__in';
298
- }
299
  $attr['include'] = $attr['ids'];
300
  }
301
 
302
- // Allow plugins/themes to override the default gallery template.
303
- $output = apply_filters( 'post_gallery', '', $attr, $instance );
304
- if ( $output != '' ) {
305
- return $output;
306
- }
307
-
308
- // We're trusting author input, so let's at least make sure it looks like a valid orderby statement
309
- if ( isset( $attr['orderby'] ) ) {
310
- $attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );
311
- if ( ! $attr['orderby'] )
312
- unset( $attr['orderby'] );
313
- }
314
 
315
- $html5 = true;
316
  // Defining default attributes
317
  $default_atts = array(
318
- 'wp_order' => '0',
319
- 'order' => 'ASC',
320
- 'orderby' => 'menu_order ID',
321
- 'id' => $post ? $post->ID : 0,
322
- 'itemtag' => $html5 ? 'figure' : 'dl',
323
- 'icontag' => $html5 ? 'div' : 'dt',
324
- 'captiontag' => $html5 ? 'figcaption' : 'dd',
325
- 'columns' => 4,
326
- 'space' => 10,
327
- 'size' => 'medium',
328
- 'hardcrop' => "yes",
329
- 'layout' => 'grid', // grid, masonry, justify-rows, packery
330
- 'include' => '',
331
- 'exclude' => '',
332
- 'link' => 'lightbox', // none, file, empty(attachment), lightbox
333
- 'perpage' => 24,
334
- 'pagination' => false,
335
- 'lazyload' => false,
336
- 'gutter' => '1',
337
-
338
  'title' => '', // header title
339
  'extra_classes' => '', // custom css class names for this element
340
  'custom_el_id' => '', // custom id attribute for this element
@@ -342,57 +372,32 @@ function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
342
  );
343
 
344
  $result = auxin_get_widget_scafold( $attr, $default_atts );
345
- $atts = $result['parsed_atts'];
346
 
347
  // ------------------------------------------
348
 
349
- $id = intval( $atts['id'] );
350
-
351
-
352
- if ( !$atts['wp_order'] && empty( $atts['ids'] ) ) {
353
- $atts['order'] = 'ASC';
354
- $atts['orderby'] = 'post__in';
355
  }
356
 
357
- if ( ! empty( $atts['include'] ) ) {
 
 
358
  $_attachments = get_posts(
359
  array(
360
- 'include' => $atts['include'],
361
  'post_status' => 'inherit',
362
  'post_type' => 'attachment',
363
  'post_mime_type' => 'image',
364
- 'order' => $atts['order'],
365
- 'orderby' => $atts['orderby']
366
  )
367
  );
368
 
369
- $attachments = array();
370
  foreach ( $_attachments as $key => $val ) {
371
  $attachments[$val->ID] = $_attachments[$key];
372
  }
373
-
374
- } elseif ( ! empty( $atts['exclude'] ) ) {
375
-
376
- $attachments = get_children( array(
377
- 'post_parent' => $id,
378
- 'exclude' => $atts['exclude'],
379
- 'post_status' => 'inherit',
380
- 'post_type' => 'attachment',
381
- 'post_mime_type' => 'image',
382
- 'order' => $atts['order'],
383
- 'orderby' => $atts['orderby']
384
- ));
385
-
386
- } else {
387
-
388
- $attachments = get_children( array(
389
- 'post_parent' => $ids,
390
- 'post_status' => 'inherit',
391
- 'post_type' => 'attachment',
392
- 'post_mime_type' => 'image',
393
- 'order' => $atts['order'],
394
- 'orderby' => $atts['orderby']
395
- ));
396
  }
397
 
398
  if ( empty( $attachments ) ) {
@@ -402,198 +407,147 @@ function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
402
  if ( is_feed() ) {
403
  $output = "\n";
404
  foreach ( $attachments as $att_id => $attachment ) {
405
- $output .= wp_get_attachment_link( $att_id, $atts['size'], true ) . "\n";
406
  }
407
  return $output;
408
  }
409
 
410
- $itemtag = tag_escape( $atts['itemtag'] );
411
- $captiontag = tag_escape( $atts['captiontag'] );
412
- $icontag = tag_escape( $atts['icontag'] );
413
- $valid_tags = wp_kses_allowed_html( 'post' );
414
- if ( ! isset( $valid_tags[ $itemtag ] ) ) {
415
- $itemtag = 'dl';
416
- }
417
- if ( ! isset( $valid_tags[ $captiontag ] ) ) {
418
- $captiontag = 'dd';
419
- }
420
- if ( ! isset( $valid_tags[ $icontag ] ) ) {
421
- $icontag = 'dt';
422
- }
423
 
424
- $columns = intval( $atts['columns'] );
425
- $itemwidth = $columns > 0 ? floor(100/$columns) : 100;
426
- $float = is_rtl() ? 'right' : 'left';
427
-
428
- $selector = "gallery-{$instance}";
429
-
430
- $gallery_style = '';
431
-
432
- /**
433
- * Filter whether to print default gallery styles.
434
- *
435
- * @since 3.1.0
436
- *
437
- * @param bool $print Whether to print default gallery styles.
438
- * Defaults to false if the theme supports HTML5 galleries.
439
- * Otherwise, defaults to true.
440
- */
441
- if ( apply_filters( 'use_default_gallery_style', ! $html5 ) ) {
442
- $gallery_style = "
443
- <style type='text/css'>
444
- #{$selector} {
445
- margin: auto;
446
- }
447
- #{$selector} .gallery-item {
448
- float: {$float};
449
- margin-top: 10px;
450
- text-align: center;
451
- width: {$itemwidth}%;
452
- }
453
- #{$selector} img {
454
- border: 2px solid #cfcfcf;
455
- }
456
- #{$selector} .gallery-caption {
457
- margin-left: 0;
458
- }
459
- /* see gallery_shortcode() in wp-includes/media.php */
460
- </style>\n\t\t";
461
- }
462
 
 
463
 
464
- $img_sizes = array (
465
- 'large' => 1024,
466
- 'medium' => 768,
467
- 'small' => 300,
468
- 'thumbnail' => 150
469
- );
470
 
471
- $grid_wrapper_class = '';
472
- $grid_col_class = '';
 
 
 
 
 
 
 
 
473
 
474
- $layoutAttr = $atts['layout'];
 
475
 
476
- $grid_wrapper_class = 'aux-col'. $columns;// . ' aux-no-gutter';
477
- $grid_col_class = 'aux-col';
478
 
479
- if ( empty( $atts['layout'] ) || 'grid' == $atts['layout'] ){
480
- $layoutAttr = 'masonry';
481
- } else if ( 'justify-rows' == $atts['layout'] ) {
482
- $layoutAttr = 'justifyRows';
483
- }
 
484
 
485
- // space attribute
486
- if ( '10' != $atts['space'] ) {
487
- $space_attr = 'data-space="'.$atts['space'].'"';
 
488
  } else {
489
- $space_attr = '';
 
 
 
 
 
 
 
 
490
  }
491
 
492
- $size_class = sanitize_html_class( $atts['size'] );
493
- $gallery_div = "<div id='$selector' class='gallery aux-gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class} aux-lightbox-frame'>";
494
 
495
- $gallery_div .= "<div class='aux-gallery-container aux-isotope-animated $grid_wrapper_class aux-layout-{$atts['layout']}' data-pagination='{$atts['pagination']}' data-lazyload='{$atts['lazyload']}' data-perpage='{$atts['perpage']}' data-layout='$layoutAttr' $space_attr >";
496
 
497
- /**
498
- * Filter the default gallery shortcode CSS styles.
499
- *
500
- * @param string $gallery_style Default CSS styles and opening HTML div container
501
- * for the gallery shortcode output.
502
- */
503
- $output = apply_filters( 'gallery_style', $gallery_style . $gallery_div );
504
 
505
- $i = 0;
506
  $index = 0;
507
 
508
  foreach ( $attachments as $id => $attachment ) {
509
- $item = "";
510
- $attr = ( trim( $attachment->post_excerpt ) ) ? array( 'aria-describedby' => "$selector-$id" ) : '';
511
-
512
- $url = get_attachment_link( $id );
513
- $original_src = auxin_get_attachment_url( $id, 'full' );
514
 
515
- if ( empty( $atts['link'] ) ) {
516
- $atts['link'] = 'attachment';
517
- }
518
 
519
- if ( 'file' === $atts['link'] || 'lightbox' === $atts['link'] ) {
520
- $url = $original_src;
 
 
521
  }
522
 
523
- if ( empty( $atts['size'] ) || ( $atts['size'] === 'full' && $atts['layout'] != 'grid' ) ) {
524
- $image_src = $original_src;
525
- } else {
526
- $image_src = auxin_get_the_resized_attachment_src( $id, $img_sizes[ $atts['size'] ] , $img_sizes[ $atts['size'] ], $atts['layout'] == 'grid' , 100, true );
527
  }
528
 
529
- $image_meta = wp_get_attachment_metadata( $id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
530
 
531
- $orientation = '';
532
- if ( isset( $image_meta['height'], $image_meta['width'] ) ) {
533
- $orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
534
- }
535
- // get image size
536
- $image_width = ( 'full' !== $atts['size'] && isset( $image_meta['sizes'][ $atts['size'] ]['width'] ) ) ? $image_meta['sizes'][ $atts['size'] ]['width' ] : $image_meta['width' ];
537
- $image_height = ( 'full' !== $atts['size'] && isset( $image_meta['sizes'][ $atts['size'] ]['height'] ) ) ? $image_meta['sizes'][ $atts['size'] ]['height'] : $image_meta['height'];
538
- $image_alt = trim(strip_tags( get_post_meta( $id, '_wp_attachment_image_alt', true ) ));
539
-
540
- if ( empty( $image_alt ) )
541
- $image_alt = trim( strip_tags( $attachment->post_excerpt ) ); // If not, Use the Caption
542
- if ( empty( $image_alt ) )
543
- $image_alt = trim( strip_tags( $attachment->post_title ) ); // Finally, use the title
544
-
545
- $loading_class = $atts['lazyload'] ? 'aux-loading' : '';
546
-
547
- $item_inner = "
548
- <{$icontag} class='aux-frame-mask aux-frame-darken {$orientation}'>
549
- <img src='$image_src'
550
- data-original-src-width='{$image_meta['width']}'
551
- data-original-src-height='{$image_meta['height']}'
552
- data-original-src='$original_src'
553
- alt='$image_alt'
554
- width='$image_width'
555
- height='$image_height'
556
- ".$attr."
557
- >
558
- </{$icontag}>";
559
-
560
- if ( $captiontag && trim($attachment->post_excerpt) ) {
561
- $item_inner .= "
562
- <{$captiontag} class='wp-caption-text gallery-caption' id='$selector-$id'>
563
- " . wptexturize($attachment->post_excerpt) . "
564
- </{$captiontag}>";
565
- }
566
 
567
- if ( 'lightbox' === $atts['link'] ) {
568
- $item_inner = "<a href='$url' class='aux-lightbox-btn'>
569
- <div class='aux-hover-scale-circle-plus'>
570
- <span class='aux-symbol-plus'></span>
571
- <span class='aux-symbol-circle'></span>
572
- </div>
573
- $item_inner</a>";
574
- } elseif ( 'none' != $atts['link'] ) {
575
- $item_inner = "<a href='$url'>$item_inner</a>";
 
 
 
 
 
 
 
 
 
 
 
576
  }
577
 
578
- if ( $atts['pagination'] && ++$index > $atts['perpage'] ) {
579
- $item .= "<{$itemtag} class='gallery-item aux-hover-active aux-iso-item aux-iso-hidden $loading_class {$grid_col_class}' data-width='{$image_width}' data-height='{$image_height}'>$item_inner</{$itemtag}>";
580
  } else {
581
- $item .= "<{$itemtag} class='gallery-item aux-hover-active aux-iso-item {$grid_col_class} $loading_class' data-width='{$image_width}' data-height='{$image_height}'>$item_inner</{$itemtag}>";
582
  }
583
 
584
- if ( ! $html5 && $columns > 0 && ++$i % $columns == 0 ) {
585
- $item .= '<br style="clear: both" />';
586
  }
587
 
588
- $output .= $item;
589
  }
590
 
591
- if ( ! $html5 && $columns > 0 && $i % $columns !== 0 ) {
592
- $output .= "
593
- <br style='clear: both' />";
594
- }
595
 
596
- $output .= "</div>\n</div>\n";
 
597
 
598
- return $result['widget_header'] . $result['widget_title'] . $output . $result['widget_footer'];
599
  }
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
  function auxin_get_gallery_master_array( $master_array ) {
13
 
68
  'group' => '' ,
69
  'edit_field_class' => ''
70
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  array(
72
  'heading' => __('Order images by query','auxin-elements'),
73
  'description' => '',
133
  'def_value' => 'grid',
134
  'value' => array(
135
  'grid' => __('Grid', 'auxin-elements'),
136
+ 'masonry' => __('Masonry', 'auxin-elements'),
137
+ 'tiles' => __('Tiles', 'auxin-elements')//,
138
  //'justify-rows' => __('Justify rows', 'auxin-elements')
139
  ),
140
  'holder' => 'dropdown',
145
  'group' => '' ,
146
  'edit_field_class' => ''
147
  ),
148
+ array(
149
+ 'heading' => __('Number of columns', 'auxin-elements'),
150
+ 'description' => '',
151
+ 'param_name' => 'columns',
152
+ 'type' => 'dropdown',
153
+ 'def_value' => '4',
154
+ 'holder' => 'dropdown',
155
+ 'class' => 'columns',
156
+ 'value' => array(
157
+ '1' => '1', '2' => '2', '3' => '3',
158
+ '4' => '4', '5' => '5', '6' => '6'
159
+ ),
160
+ 'admin_label' => false,
161
+ 'dependency' => array(
162
+ 'element' => 'layout',
163
+ 'value' => array( 'grid', 'masonry' )
164
+ ),
165
+ 'weight' => '',
166
+ 'group' => 'Layout' ,
167
+ 'edit_field_class' => ''
168
+ ),
169
+ array(
170
+ 'heading' => __('Number of columns in tablet size', 'auxin-elements'),
171
+ 'description' => '',
172
+ 'param_name' => 'tablet_cnum',
173
+ 'type' => 'dropdown',
174
+ 'def_value' => 'inherit',
175
+ 'holder' => 'dropdown',
176
+ 'class' => 'tablet_cnum',
177
+ 'value' => array(
178
+ 'inherit' => 'Inherited from larger',
179
+ '1' => '1', '2' => '2', '3' => '3',
180
+ '4' => '4', '5' => '5', '6' => '6'
181
+ ),
182
+ 'admin_label' => false,
183
+ 'dependency' => array(
184
+ 'element' => 'layout',
185
+ 'value' => array( 'grid', 'masonry' )
186
+ ),
187
+ 'weight' => '',
188
+ 'group' => 'Layout' ,
189
+ 'edit_field_class' => ''
190
+ ),
191
+ array(
192
+ 'heading' => __('Number of columns in phone size', 'auxin-elements'),
193
+ 'description' => '',
194
+ 'param_name' => 'phone_cnum',
195
+ 'type' => 'dropdown',
196
+ 'def_value' => '1',
197
+ 'holder' => 'dropdown',
198
+ 'class' => 'phone_cnum',
199
+ 'value' => array(
200
+ '1' => '1' , '2' => '2', '3' => '3'
201
+ ),
202
+ 'admin_label' => false,
203
+ 'dependency' => array(
204
+ 'element' => 'layout',
205
+ 'value' => array( 'grid', 'masonry' )
206
+ ),
207
+ 'weight' => '',
208
+ 'group' => 'Layout' ,
209
+ 'edit_field_class' => ''
210
+ ),
211
  array(
212
  'heading' => __('Space','auxin-elements'),
213
  'description' => __('Space between gallery items in pixel.', 'auxin-elements'),
217
  'def_value' => '',
218
  'holder' => 'textfield',
219
  'class' => 'space',
220
+ 'admin_label' => false,
221
+ 'dependency' => array(
222
+ 'element' => 'layout',
223
+ 'value' => array( 'grid', 'masonry' )
224
+ ),
225
+ 'weight' => '',
226
+ 'group' => '' ,
227
+ 'edit_field_class' => ''
228
+ ),
229
+ array(
230
+ 'heading' => __('Image aspect ratio', 'auxin-elements'),
231
+ 'description' => '',
232
+ 'param_name' => 'image_aspect_ratio',
233
+ 'type' => 'dropdown',
234
+ 'def_value' => '0.75',
235
+ 'holder' => 'dropdown',
236
+ 'class' => 'order',
237
+ 'value' =>array (
238
+ '0.75' => __('Horizontal 4:3' , 'auxin-elements'),
239
+ '0.56' => __('Horizontal 16:9', 'auxin-elements'),
240
+ '1.00' => __('Square 1:1' , 'auxin-elements'),
241
+ '1.33' => __('Vertical 3:4' , 'auxin-elements')
242
+ ),
243
+ 'admin_label' => false,
244
+ 'dependency' => array(
245
+ 'element' => 'layout',
246
+ 'value' => array( 'grid' )
247
+ ),
248
  'weight' => '',
249
  'group' => '' ,
250
  'edit_field_class' => ''
270
  'edit_field_class' => ''
271
  ),
272
  array(
273
+ 'heading' => __('Enable pagination','auxin-elements'),
274
  'description' => '',
275
+ 'param_name' => 'pagination',
276
+ 'type' => 'aux_switch',
277
+ 'value' => '0',
278
+ 'class' => '',
 
 
 
 
 
 
 
 
279
  'admin_label' => true,
280
  'dependency' => '',
281
  'weight' => '',
283
  'edit_field_class' => ''
284
  ),
285
  array(
286
+ 'heading' => __('Enable lazyload','auxin-elements'),
287
+ 'description' => __('Only load images that are in visible page','auxin-elements'),
288
+ 'param_name' => 'lazyload',
289
  'type' => 'aux_switch',
290
  'value' => '0',
291
  'class' => '',
292
  'admin_label' => true,
293
+ 'dependency' => array(
294
+ 'element' => 'pagination',
295
+ 'value' => '1'
296
+ ),
297
  'weight' => '',
298
  'group' => '' ,
299
  'edit_field_class' => ''
307
  'def_value' => '',
308
  'holder' => 'textfield',
309
  'class' => 'id',
310
+ 'admin_label' => false,
311
  'dependency' => array(
312
  'element' => 'pagination',
313
  'value' => '1'
325
  'def_value' => '',
326
  'holder' => 'textfield',
327
  'class' => 'extra_classes',
328
+ 'admin_label' => false,
329
  'dependency' => '',
330
  'weight' => '',
331
  'group' => '' ,
332
  'edit_field_class' => ''
333
  )
 
334
  )
335
  );
336
 
339
 
340
  add_filter( 'auxin_master_array_shortcodes', 'auxin_get_gallery_master_array', 10, 1 );
341
 
 
 
 
 
 
342
  // This is the widget call back in fact the front end out put of this widget comes from this function
343
  function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
 
 
 
 
 
 
 
344
  if ( ! empty( $attr['ids'] ) ) {
 
 
 
 
345
  $attr['include'] = $attr['ids'];
346
  }
347
 
348
+ static $instance = 0;
349
+ $instance++;
350
+ $selector = "aux-gallery-{$instance}";
 
 
 
 
 
 
 
 
 
351
 
 
352
  // Defining default attributes
353
  $default_atts = array(
354
+ 'order' => 'ASC',
355
+ 'orderby' => 'menu_order ID',
356
+ 'id' => $post ? $post->ID : 0,
357
+ 'columns' => 4,
358
+ 'tablet_cnum' => 'inherit',
359
+ 'phone_cnum' => 1,
360
+ 'space' => 10,
361
+ 'image_aspect_ratio' => 0.75,
362
+ 'layout' => 'grid', // grid, masonry, justify-rows, packery
363
+ 'include' => '',
364
+ 'link' => 'lightbox', // none, file, empty(attachment), lightbox
365
+ 'perpage' => 24,
366
+ 'pagination' => false,
367
+ 'lazyload' => false,
 
 
 
 
 
 
368
  'title' => '', // header title
369
  'extra_classes' => '', // custom css class names for this element
370
  'custom_el_id' => '', // custom id attribute for this element
372
  );
373
 
374
  $result = auxin_get_widget_scafold( $attr, $default_atts );
375
+ extract( $result['parsed_atts'] );
376
 
377
  // ------------------------------------------
378
 
379
+ if ( !$wp_order && empty( $ids ) ) {
380
+ $order = 'ASC';
381
+ $orderby = 'post__in';
 
 
 
382
  }
383
 
384
+ $attachments = array();
385
+
386
+ if ( ! empty( $include ) ) {
387
  $_attachments = get_posts(
388
  array(
389
+ 'include' => $include,
390
  'post_status' => 'inherit',
391
  'post_type' => 'attachment',
392
  'post_mime_type' => 'image',
393
+ 'order' => $order,
394
+ 'orderby' => $orderby
395
  )
396
  );
397
 
 
398
  foreach ( $_attachments as $key => $val ) {
399
  $attachments[$val->ID] = $_attachments[$key];
400
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
401
  }
402
 
403
  if ( empty( $attachments ) ) {
407
  if ( is_feed() ) {
408
  $output = "\n";
409
  foreach ( $attachments as $att_id => $attachment ) {
410
+ $output .= wp_get_attachment_link( $att_id, 'medium', true ) . "\n";
411
  }
412
  return $output;
413
  }
414
 
415
+ ob_start();
 
 
 
 
 
 
 
 
 
 
 
 
416
 
417
+ // widget header ------------------------------
418
+ echo $result['widget_header'];
419
+ echo $result['widget_title'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
420
 
421
+ $crop = false;
422
 
423
+ if ( 'grid' == $layout ) {
424
+ $crop = true;
425
+ }
 
 
 
426
 
427
+ if ( empty( $layout ) || 'grid' == $layout ){
428
+ $isotop_layout = 'masonry';
429
+ } elseif ( 'justify-rows' == $layout ) {
430
+ $isotop_layout = 'justifyRows';
431
+ } elseif ( 'tiles' == $layout ) {
432
+ $isotop_layout = 'packery';
433
+ $space = 0;
434
+ } else {
435
+ $isotop_layout = 'masonry';
436
+ }
437
 
438
+ $add_lightbox = ( $link == 'lightbox' );
439
+ $add_caption = false;
440
 
441
+ echo "<div id='$selector' class='aux-gallery galleryid-{$id} gallery-columns-{$columns} " . ( $add_lightbox ? 'aux-lightbox-gallery' : '' ) . "'>";
 
442
 
443
+ // isotope attributes
444
+ $isotope_attrs = ' data-pagination="' . $pagination . '"'.
445
+ ' data-lazyload="' . ( $lazyload ? 'true' : 'false' ) . '"'.
446
+ ' data-perpage="' . $perpage . '"'.
447
+ ' data-layout="' . $isotop_layout . '"'.
448
+ ' data-space="' . $space . '"';
449
 
450
+ if ( 'tiles' == $layout ) {
451
+ $column_class = 'aux-tiles-layout';
452
+ $column_media_width = auxin_get_content_column_width( 4, $space );
453
+ $isotope_item_classes = 'aux-iso-item';
454
  } else {
455
+ $column_class = 'aux-row aux-de-col' . $columns;
456
+ if ( 'inherit' == $tablet_cnum ) {
457
+ $tablet_cnum = $columns;
458
+ }
459
+
460
+ $column_class .= ' aux-tb-col'. $tablet_cnum;
461
+ $column_class .= ' aux-mb-col'. $phone_cnum;
462
+ $column_media_width = auxin_get_content_column_width( $columns, $space );
463
+ $isotope_item_classes = 'aux-iso-item aux-col';
464
  }
465
 
466
+ echo "<div class='aux-gallery-container aux-isotope-animated $column_class aux-no-gutter aux-layout-$isotop_layout' $isotope_attrs >";
 
467
 
 
468
 
469
+ if ( $lazyload ) {
470
+ $isotope_item_classes .= ' aux-loading';
471
+ }
 
 
 
 
472
 
 
473
  $index = 0;
474
 
475
  foreach ( $attachments as $id => $attachment ) {
 
 
 
 
 
476
 
477
+ $isotope_item_attrs = '';
478
+ $attachment_meta = wp_get_attachment_metadata( $id );
 
479
 
480
+ if ( $add_lightbox || 'file' == $link ) {
481
+ $attachment_url = auxin_get_attachment_url( $id, 'full' );
482
+ } elseif ( 'attachment' == $link ) {
483
+ $attachment_url = get_attachment_link( $id );
484
  }
485
 
486
+ if ( $add_lightbox ) {
487
+ $lightbox_attrs = 'data-original-width="' . $attachment_meta['width'] . '" data-original-height="' . $attachment_meta['height'] . '" ' .
488
+ 'data-caption="' . auxin_attachment_caption( $id ) . '"';
 
489
  }
490
 
491
+ if ( 'tiles' == $layout ) {
492
+ $item_pattern_info = auxin_get_tile_pattern( 'default', $index, $column_media_width );
493
+ $attachment_media = auxin_get_the_responsive_attachment(
494
+ $id,
495
+ array(
496
+ 'upscale' => true,
497
+ 'preloadable' => $lazyload,
498
+ 'crop' => true,
499
+ 'add_hw' => false, // whether add width and height attr or not
500
+ // 'size' => array( 'width' => $column_media_width, 'height' => $column_media_height ),
501
+ 'image_sizes' => $item_pattern_info['image_sizes'],
502
+ 'srcset_sizes' => $item_pattern_info['srcset_sizes']
503
+ )
504
+
505
+ );
506
 
507
+ } else {
508
+ if ( 'masonry' == $layout ) {
509
+ $image_aspect_ratio = 0;
510
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
511
 
512
+ $attachment_media = auxin_get_the_responsive_attachment(
513
+ $id,
514
+ array(
515
+ 'upscale' => true,
516
+ 'preloadable' => $lazyload,
517
+ 'crop' => $crop,
518
+ 'size' => array( 'width' => $column_media_width, 'height' => $column_media_height ),
519
+ 'add_hw' => true, // whether add width and height attr or not
520
+ 'image_sizes' => array(
521
+ array( 'min' => '', 'max' => '767px', 'width' => round( 100 / $phone_cnum ).'vw' ),
522
+ array( 'min' => '768px', 'max' => '992px', 'width' => round( 100 / $tablet_cnum ).'vw' ),
523
+ array( 'min' => '' , 'max' => '', 'width' => $column_media_width.'px' )
524
+ ),
525
+ 'srcset_sizes' => array(
526
+ array( 'width' => $column_media_width, 'height' => $column_media_width * $image_aspect_ratio ),
527
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width * $image_aspect_ratio ),
528
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width * $image_aspect_ratio )
529
+ )
530
+ )
531
+ );
532
  }
533
 
534
+ if ( $pagination && ++$index > $perpage ) {
535
+ $item_classes = 'aux-iso-hidden';
536
  } else {
537
+ $item_classes = '';
538
  }
539
 
540
+ if ( 'tiles' == $layout ) {
541
+ $item_classes .= ' aux-image-box '. $item_pattern_info['classname'];
542
  }
543
 
544
+ include( locate_template( 'templates/theme-parts/entry/gallery-image.php' ) );
545
  }
546
 
547
+ echo "</div></div>";
 
 
 
548
 
549
+ // widget footer ------------------------------
550
+ echo $result['widget_footer'];
551
 
552
+ return ob_get_clean();
553
  }
includes/elements/gmap.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
  function auxin_get_gmap_master_array( $master_array ) {
13
 
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
  function auxin_get_gmap_master_array( $master_array ) {
13
 
includes/elements/highlight.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
  function auxin_get_highlight_master_array( $master_array ) {
13
 
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
  function auxin_get_highlight_master_array( $master_array ) {
13
 
includes/elements/image.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
  function auxin_get_image_master_array( $master_array ) {
13
 
@@ -258,6 +258,7 @@ function auxin_widget_image_callback( $atts, $shortcode_content = null ){
258
  $image_primary = '';
259
  $image_primary_full = '';
260
  $image_secondary = '';
 
261
 
262
  global $aux_content_width;
263
 
@@ -266,7 +267,10 @@ function auxin_widget_image_callback( $atts, $shortcode_content = null ){
266
 
267
  if( ! empty( $attach_id ) && is_numeric( $attach_id ) ) {
268
  $image_primary = auxin_get_the_resized_attachment( $attach_id, $width, $height, true );
269
- $image_primary_full_src = auxin_get_the_resized_attachment_src( $attach_id, 3000, 3000 * 0.75 );
 
 
 
270
  }
271
 
272
  if( ! empty( $attach_id_hover ) && is_numeric( $attach_id_hover ) ) {
@@ -298,7 +302,7 @@ function auxin_widget_image_callback( $atts, $shortcode_content = null ){
298
  <div class="aux-media-frame aux-media-image aux-lightbox-frame <?php echo $hover_class; ?>" >
299
 
300
  <?php if( !empty($anchor_link) ) { ?>
301
- <a class="<?php echo $anchor_class; ?>" href="<?php echo $anchor_link; ?>" <?php echo $target; ?> >
302
  <?php } ?>
303
 
304
  <?php if( 'plus' == $icon ) { ?>
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
  function auxin_get_image_master_array( $master_array ) {
13
 
258
  $image_primary = '';
259
  $image_primary_full = '';
260
  $image_secondary = '';
261
+ $lightbox_attrs = '';
262
 
263
  global $aux_content_width;
264
 
267
 
268
  if( ! empty( $attach_id ) && is_numeric( $attach_id ) ) {
269
  $image_primary = auxin_get_the_resized_attachment( $attach_id, $width, $height, true );
270
+ $image_primary_full_src = auxin_get_attachment_url( $attach_id, 'full' );
271
+ $image_primary_meta = wp_get_attachment_metadata( $attach_id );
272
+ $lightbox_attrs = 'data-original-width="' . $image_primary_meta['width'] . '" data-original-height="' . $image_primary_meta['height'] . '" ' .
273
+ 'data-caption="' . auxin_attachment_caption( $attach_id ) . '"';
274
  }
275
 
276
  if( ! empty( $attach_id_hover ) && is_numeric( $attach_id_hover ) ) {
302
  <div class="aux-media-frame aux-media-image aux-lightbox-frame <?php echo $hover_class; ?>" >
303
 
304
  <?php if( !empty($anchor_link) ) { ?>
305
+ <a class="<?php echo $anchor_class; ?>" href="<?php echo $anchor_link; ?>" <?php echo $lightbox_attrs . ' ' . $target; ?> >
306
  <?php } ?>
307
 
308
  <?php if( 'plus' == $icon ) { ?>
includes/elements/instagram-feed.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
  function auxin_get_instagram_master_array( $master_array ) {
13
 
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
  function auxin_get_instagram_master_array( $master_array ) {
13
 
includes/elements/latest-posts-slider.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
  function auxin_get_post_slider_master_array( $master_array ) {
13
 
@@ -466,8 +466,7 @@ function auxin_latest_posts_slider_callback( $atts, $shortcode_content = null ){
466
 
467
  // get image
468
  if ( 'custom' == $image_from && !empty( $custom_image ) ) {
469
- $custom_image = aq_resize( $custom_image, $width, $height, true, 100, true, true );
470
- $slide_image = '<img alt="" src="$custom_image">';
471
  } else {
472
  $slide_image = auxin_get_auto_post_thumbnail( $query_res->post->ID, $image_from, $width, $height, true, 100, true );
473
  }
@@ -506,7 +505,7 @@ function auxin_latest_posts_slider_callback( $atts, $shortcode_content = null ){
506
  </div>
507
  </section>
508
  <?php } ?>
509
- </div>
510
 
511
  <?php endwhile;
512
 
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
  function auxin_get_post_slider_master_array( $master_array ) {
13
 
466
 
467
  // get image
468
  if ( 'custom' == $image_from && !empty( $custom_image ) ) {
469
+ $slide_image = auxin_get_the_resized_image( $custom_image, $width, $height, true , 100 );
 
470
  } else {
471
  $slide_image = auxin_get_auto_post_thumbnail( $query_res->post->ID, $image_from, $width, $height, true, 100, true );
472
  }
505
  </div>
506
  </section>
507
  <?php } ?>
508
+ </div>
509
 
510
  <?php endwhile;
511
 
includes/elements/popular-posts-widget.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  function auxin_get_popular_post_widget_master_array( $master_array ) {
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  function auxin_get_popular_post_widget_master_array( $master_array ) {
includes/elements/quote.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
  function auxin_get_quote_master_array( $master_array ) {
13
 
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
  function auxin_get_quote_master_array( $master_array ) {
13
 
includes/elements/recent-posts-grid-carousel.php CHANGED
@@ -7,7 +7,7 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
13
  function auxin_get_recent_posts_master_array( $master_array ) {
@@ -67,24 +67,6 @@ function auxin_get_recent_posts_master_array( $master_array ) {
67
  'group' => '' ,
68
  'edit_field_class' => ''
69
  ),
70
- // array(
71
- // 'param_name' => 'post_type',
72
- // 'type' => 'dropdown',
73
- // 'def_value' => 'post',
74
- // 'value' => array(
75
- // 'post' => __('Posts', 'auxin-elements' ),
76
- // 'page' => __('Pages', 'auxin-elements' ),
77
- // ),
78
- // 'holder' => 'dropdown',
79
- // 'class' => 'border',
80
- // 'heading' => __('Create items from','auxin-elements' ),
81
- // 'description' => '',
82
- // 'admin_label' => true,
83
- // 'dependency' => '',
84
- // 'weight' => '',
85
- // 'group' => '' ,
86
- // 'edit_field_class' => ''
87
- // ),
88
  array(
89
  'heading' => __('Categories', 'auxin-elements'),
90
  'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
@@ -128,7 +110,7 @@ function auxin_get_recent_posts_master_array( $master_array ) {
128
  'edit_field_class' => ''
129
  ),
130
  array(
131
- 'heading' => __('Exclude custom post formats','auxin-elements' ),
132
  'description' => '',
133
  'param_name' => 'exclude_custom_post_formats',
134
  'type' => 'aux_switch',
@@ -143,7 +125,7 @@ function auxin_get_recent_posts_master_array( $master_array ) {
143
  array(
144
  'heading' => __('Exclude quote and link post formats','auxin-elements' ),
145
  'description' => '',
146
- 'param_name' => 'exclude_qoute_link',
147
  'type' => 'aux_switch',
148
  'value' => '0',
149
  'class' => '',
@@ -411,8 +393,8 @@ function auxin_get_recent_posts_master_array( $master_array ) {
411
  'holder' => 'dropdown',
412
  'class' => 'num',
413
  'value' => array(
414
- '1' => '1' , '2' => '2' , '3' => '3' ,
415
- '4' => '4' , '5' => '5' , '6' => '6'
416
  ),
417
  'admin_label' => true,
418
  'dependency' => '',
@@ -430,8 +412,8 @@ function auxin_get_recent_posts_master_array( $master_array ) {
430
  'class' => 'num',
431
  'value' => array(
432
  'inherit' => 'Inherited from larger',
433
- '1' => '1' , '2' => '2' , '3' => '3' ,
434
- '4' => '4'
435
  ),
436
  'admin_label' => true,
437
  'dependency' => '',
@@ -444,12 +426,11 @@ function auxin_get_recent_posts_master_array( $master_array ) {
444
  'description' => '',
445
  'param_name' => 'phone_cnum',
446
  'type' => 'dropdown',
447
- 'def_value' => 'inherit',
448
  'holder' => 'dropdown',
449
  'class' => 'num',
450
  'value' => array(
451
- 'inherit' => 'Inherited from larger',
452
- '1' => '1' , '2' => '2'
453
  ),
454
  'admin_label' => true,
455
  'dependency' => '',
@@ -661,14 +642,16 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
661
  'ignore_media' => false, // whether to ignore media for this
662
  'exclude' => '',
663
  'include' => '',
664
- 'posts_per_page' => -1,
665
  'offset' => '',
666
  'paged' => '',
 
 
667
  'order_by' => 'menu_order date',
668
  'order' => 'desc',
669
  'exclude_without_media' => 0,
670
  'exclude_custom_post_formats' => 0,
671
- 'exclude_qoute_link' => 0,
 
672
  'show_media' => true,
673
  'display_like' => true,
674
  'display_categories' => true,
@@ -677,16 +660,18 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
677
  'display_title' => true,
678
  'show_excerpt' => true,
679
  'show_info' => true,
 
680
  'post_info_position' => 'after-title',
681
  'author_or_readmore' => 'readmore', // readmore, author, none
682
  'image_aspect_ratio' => 0.75,
683
  'desktop_cnum' => 4,
684
  'tablet_cnum' => 'inherit',
685
- 'phone_cnum' => 'inherit',
686
  'preview_mode' => 'grid',
687
  'grid_table_hover' => 'bgimage-bgcolor',
688
  'tag' => '',
689
  'extra_classes' => '',
 
690
  'custom_el_id' => '',
691
  'carousel_space' => '30',
692
  'carousel_autoplay' => false,
@@ -696,12 +681,17 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
696
  'carousel_loop' => 1,
697
  'reset_query' => true,
698
  'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
 
 
699
  'base_class' => 'aux-widget-recent-posts'
700
  );
701
 
702
  $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
703
  extract( $result['parsed_atts'] );
704
 
 
 
 
705
  // post-olumn needs to have below variables
706
  if( $author_or_readmore == 'readmore') {
707
  $show_readmore = true;
@@ -714,15 +704,32 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
714
  $show_author_footer = false;
715
  }
716
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
717
  ob_start();
718
 
719
  global $wp_query;
720
 
721
- if( ! $use_wp_query ){
 
 
 
722
 
723
  // create wp_query to get latest items -----------
724
  $args = array(
725
- 'post_type' => 'post',
726
  'orderby' => $order_by,
727
  'order' => $order,
728
  'offset' => $offset,
@@ -731,10 +738,47 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
731
  'post__not_in' => array_filter( explode( ',', $exclude ) ),
732
  'post__in' => array_filter( explode( ',', $include ) ),
733
  'post_status' => 'publish',
734
- 'posts_per_page' => $posts_per_page,
735
  'ignore_sticky_posts' => 1
736
  );
737
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
738
  $wp_query = new WP_Query( $args );
739
  }
740
 
@@ -758,8 +802,8 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
758
  // generate columns class
759
  $column_class = 'aux-match-height aux-row aux-de-col' . $desktop_cnum;
760
 
761
- $column_class .= 'inherit' != $tablet_cnum ? ' aux-tb-col'. $tablet_cnum : ' aux-tb-col' . $desktop_cnum;
762
- $column_class .= 'inherit' != $phone_cnum ? ' aux-mb-col'. $phone_cnum : ' aux-mb-col1';
763
 
764
  $column_class .= 'entry-boxed' == $content_layout ? ' aux-entry-boxed' : '';
765
 
@@ -796,21 +840,17 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
796
 
797
  // Specifies whether the columns have footer meta or not
798
  $column_class .= ! $show_author_footer && ! $show_readmore ? ' aux-no-meta' : '';
 
799
 
800
  $column_media_width = auxin_get_content_column_width( $desktop_cnum, 15 );
801
 
802
  $have_posts = $wp_query->have_posts();
803
 
804
  if( $have_posts ){
805
- ?><div class="<?php echo $column_class ?>" <?php echo $carousel_attrs ?>> <?php
806
- while ( $wp_query->have_posts() ) {
807
 
808
- // break the loop if it is reached to the limit
809
- if ( $post_counter < $num ) {
810
- $post_counter ++;
811
- } else {
812
- break;
813
- }
814
 
815
  $wp_query->the_post();
816
  $post = $wp_query->post;
@@ -843,15 +883,6 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
843
  extract( $post_vars );
844
  $the_format = get_post_format( $post );
845
 
846
- if(
847
- ( $exclude_custom_post_formats && ! empty( $the_format ) ) ||
848
- ( $exclude_qoute_link && ( 'link' == $the_format || 'quote' == $the_format ) ) ||
849
- ( $exclude_without_media && ! $has_attach )
850
- ){
851
- $post_counter --;
852
- continue;
853
- }
854
-
855
  // dont show media tag if media is ignored
856
  $show_media = ! $ignore_media;
857
 
@@ -890,25 +921,23 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
890
  }
891
 
892
  }
893
- ?>
894
- <div class="<?php echo $item_class . ' post-'.$post->ID ?>">
895
- <?php include( locate_template( 'templates/theme-parts/entry/post-column.php' ) ); ?>
896
- </div>
897
- <?php
898
  }
899
 
900
  if ( 'carousel' == $preview_mode && 'arrows' == $carousel_navigation_control ) {
901
  ?>
902
- <div class="aux-carousel-controls">
903
- <div class="aux-next-arrow aux-arrow-nav aux-outline aux-hover-fill">
904