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
- <span class="aux-svg-arrow aux-small-right"></span>
905
- <span class="aux-hover-arrow aux-white aux-svg-arrow aux-small-right"></span>
906
- </div>
907
- <div class="aux-prev-arrow aux-arrow-nav aux-outline aux-hover-fill">
908
- <span class="aux-svg-arrow aux-small-left"></span>
909
- <span class="aux-hover-arrow aux-white aux-svg-arrow aux-small-left"></span>
910
- </div>
911
- </div>
912
  <?php
913
  }
914
 
@@ -916,9 +945,7 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
916
  $ajax_nonce = wp_create_nonce( 'post-recent-grid-nonce' );
917
  // print the custom inline style if available
918
  echo $columns_custom_styles ? "<style>$columns_custom_styles</style>" : '';
919
- ?>
920
- </div>
921
- <?php
922
  }
923
 
924
  if( $reset_query ){
@@ -985,3 +1012,27 @@ function auxin_widget_recent_posts_grid_ajax_callback(){
985
  add_action( 'wp_ajax_recent-post-grid', 'auxin_widget_recent_posts_grid_ajax_callback' );
986
 
987
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  function auxin_get_recent_posts_master_array( $master_array ) {
67
  'group' => '' ,
68
  'edit_field_class' => ''
69
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  array(
71
  'heading' => __('Categories', 'auxin-elements'),
72
  'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
110
  'edit_field_class' => ''
111
  ),
112
  array(
113
+ 'heading' => __('Exclude all custom post formats','auxin-elements' ),
114
  'description' => '',
115
  'param_name' => 'exclude_custom_post_formats',
116
  'type' => 'aux_switch',
125
  array(
126
  'heading' => __('Exclude quote and link post formats','auxin-elements' ),
127
  'description' => '',
128
+ 'param_name' => 'exclude_quote_link',
129
  'type' => 'aux_switch',
130
  'value' => '0',
131
  'class' => '',
393
  'holder' => 'dropdown',
394
  'class' => 'num',
395
  'value' => array(
396
+ '1' => '1', '2' => '2', '3' => '3',
397
+ '4' => '4', '5' => '5', '6' => '6'
398
  ),
399
  'admin_label' => true,
400
  'dependency' => '',
412
  'class' => 'num',
413
  'value' => array(
414
  'inherit' => 'Inherited from larger',
415
+ '1' => '1', '2' => '2', '3' => '3',
416
+ '4' => '4', '5' => '5', '6' => '6'
417
  ),
418
  'admin_label' => true,
419
  'dependency' => '',
426
  'description' => '',
427
  'param_name' => 'phone_cnum',
428
  'type' => 'dropdown',
429
+ 'def_value' => '1',
430
  'holder' => 'dropdown',
431
  'class' => 'num',
432
  'value' => array(
433
+ '1' => '1', '2' => '2', '3' => '3'
 
434
  ),
435
  'admin_label' => true,
436
  'dependency' => '',
642
  'ignore_media' => false, // whether to ignore media for this
643
  'exclude' => '',
644
  'include' => '',
 
645
  'offset' => '',
646
  'paged' => '',
647
+ 'post_type' => 'post',
648
+ 'taxonomy_name' => 'category', // the taxonomy that we intent to display in post info
649
  'order_by' => 'menu_order date',
650
  'order' => 'desc',
651
  'exclude_without_media' => 0,
652
  'exclude_custom_post_formats' => 0,
653
+ 'exclude_quote_link' => 0,
654
+ 'exclude_post_formats_in' => array(), // the list od post formats to exclude
655
  'show_media' => true,
656
  'display_like' => true,
657
  'display_categories' => true,
660
  'display_title' => true,
661
  'show_excerpt' => true,
662
  'show_info' => true,
663
+ 'show_date' => true,
664
  'post_info_position' => 'after-title',
665
  'author_or_readmore' => 'readmore', // readmore, author, none
666
  'image_aspect_ratio' => 0.75,
667
  'desktop_cnum' => 4,
668
  'tablet_cnum' => 'inherit',
669
+ 'phone_cnum' => '1',
670
  'preview_mode' => 'grid',
671
  'grid_table_hover' => 'bgimage-bgcolor',
672
  'tag' => '',
673
  'extra_classes' => '',
674
+ 'extra_column_classes' => '',
675
  'custom_el_id' => '',
676
  'carousel_space' => '30',
677
  'carousel_autoplay' => false,
681
  'carousel_loop' => 1,
682
  'reset_query' => true,
683
  'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
684
+ 'custom_wp_query' => '',
685
+ 'wp_query_args' => array(), // additional wp_query args
686
  'base_class' => 'aux-widget-recent-posts'
687
  );
688
 
689
  $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
690
  extract( $result['parsed_atts'] );
691
 
692
+ // get content width
693
+ global $aux_content_width;
694
+
695
  // post-olumn needs to have below variables
696
  if( $author_or_readmore == 'readmore') {
697
  $show_readmore = true;
704
  $show_author_footer = false;
705
  }
706
 
707
+ // specify the post formats that should be excluded -------
708
+ $exclude_post_formats_in = (array) $exclude_post_formats_in;
709
+
710
+ if( $exclude_custom_post_formats ){
711
+ $exclude_post_formats_in = array_merge( $exclude_post_formats_in, array( 'aside', 'gallery', 'image', 'link', 'quote', 'video', 'audio' ) );
712
+ }
713
+ if( $exclude_quote_link ){
714
+ $exclude_post_formats_in[] = 'quote';
715
+ $exclude_post_formats_in[] = 'link';
716
+ }
717
+ $exclude_post_formats_in = array_unique( $exclude_post_formats_in );
718
+
719
+ // --------------
720
+
721
  ob_start();
722
 
723
  global $wp_query;
724
 
725
+ if( $custom_wp_query ){
726
+ $wp_query = $custom_wp_query;
727
+
728
+ } else if( ! $use_wp_query ){
729
 
730
  // create wp_query to get latest items -----------
731
  $args = array(
732
+ 'post_type' => $post_type,
733
  'orderby' => $order_by,
734
  'order' => $order,
735
  'offset' => $offset,
738
  'post__not_in' => array_filter( explode( ',', $exclude ) ),
739
  'post__in' => array_filter( explode( ',', $include ) ),
740
  'post_status' => 'publish',
741
+ 'posts_per_page' => $num,
742
  'ignore_sticky_posts' => 1
743
  );
744
 
745
+ // add the additional query args if available
746
+ if( $wp_query_args ){
747
+ $args = wp_parse_args( $args, $wp_query_args );
748
+ }
749
+
750
+ // exclude post formats if required
751
+ if( ! empty( $exclude_post_formats_in ) ){
752
+
753
+ // generate post-format terms (i.e post-format-aside)
754
+ $post_format_terms = array();
755
+ foreach ( $exclude_post_formats_in as $_post_format ) {
756
+ $post_format_terms[] = 'post-format-' . $_post_format;
757
+ }
758
+
759
+ // exclude the redundant taxonomies (post-format)
760
+ $args['tax_query'] = array(
761
+ array(
762
+ 'taxonomy' => 'post_format',
763
+ 'field' => 'slug',
764
+ 'terms' => $post_format_terms,
765
+ 'operator' => 'NOT IN'
766
+ )
767
+ );
768
+
769
+ }
770
+
771
+ // whether to exclude posts without featured-image or not
772
+ if( $exclude_without_media ){
773
+ $args['meta_query'] = array(
774
+ array(
775
+ 'key' => '_thumbnail_id',
776
+ 'value' => '',
777
+ 'compare' => '!='
778
+ )
779
+ );
780
+ }
781
+
782
  $wp_query = new WP_Query( $args );
783
  }
784
 
802
  // generate columns class
803
  $column_class = 'aux-match-height aux-row aux-de-col' . $desktop_cnum;
804
 
805
+ $tablet_cnum = ('inherit' == $tablet_cnum ) ? $desktop_cnum : $tablet_cnum ;
806
+ $column_class .= ' aux-tb-col'.$tablet_cnum . ' aux-mb-col'.$phone_cnum;
807
 
808
  $column_class .= 'entry-boxed' == $content_layout ? ' aux-entry-boxed' : '';
809
 
840
 
841
  // Specifies whether the columns have footer meta or not
842
  $column_class .= ! $show_author_footer && ! $show_readmore ? ' aux-no-meta' : '';
843
+ $column_class .= ' ' . $extra_column_classes;
844
 
845
  $column_media_width = auxin_get_content_column_width( $desktop_cnum, 15 );
846
 
847
  $have_posts = $wp_query->have_posts();
848
 
849
  if( $have_posts ){
 
 
850
 
851
+ echo sprintf( '<div class="%s" %s>', $column_class, $carousel_attrs );
852
+
853
+ while ( $wp_query->have_posts() ) {
 
 
 
854
 
855
  $wp_query->the_post();
856
  $post = $wp_query->post;
883
  extract( $post_vars );
884
  $the_format = get_post_format( $post );
885
 
 
 
 
 
 
 
 
 
 
886
  // dont show media tag if media is ignored
887
  $show_media = ! $ignore_media;
888
 
921
  }
922
 
923
  }
924
+ printf( '<div class="%s post-%s">', $item_class, $post->ID );
925
+ include( locate_template( 'templates/theme-parts/entry/post-column.php' ) );
926
+ echo "</div>";
 
 
927
  }
928
 
929
  if ( 'carousel' == $preview_mode && 'arrows' == $carousel_navigation_control ) {
930
  ?>
931
+ <div class="aux-carousel-controls">
932
+ <div class="aux-next-arrow aux-arrow-nav aux-outline aux-hover-fill">
933
+ <span class="aux-svg-arrow aux-small-right"></span>
934
+ <span class="aux-hover-arrow aux-white aux-svg-arrow aux-small-right"></span>
935
+ </div>
936
+ <div class="aux-prev-arrow aux-arrow-nav aux-outline aux-hover-fill">
937
+ <span class="aux-svg-arrow aux-small-left"></span>
938
+ <span class="aux-hover-arrow aux-white aux-svg-arrow aux-small-left"></span>
939
+ </div>
940
+ </div>
941
  <?php
942
  }
943
 
945
  $ajax_nonce = wp_create_nonce( 'post-recent-grid-nonce' );
946
  // print the custom inline style if available
947
  echo $columns_custom_styles ? "<style>$columns_custom_styles</style>" : '';
948
+ echo '</div>';
 
 
949
  }
950
 
951
  if( $reset_query ){
1012
  add_action( 'wp_ajax_recent-post-grid', 'auxin_widget_recent_posts_grid_ajax_callback' );
1013
 
1014
 
1015
+
1016
+ $data = array(
1017
+ 'blog_style' => 'timeline',
1018
+ 'slider_autoscroll' => '0',
1019
+ 'blog_post_per_page' => '5',
1020
+ 'blog_categories' => 'development',
1021
+ 'blog_post_types' => 'post',
1022
+ 'blog_pagination' => 'more',
1023
+ 'blog_ignore_sticky' => '',
1024
+ 'is_ajax' => '0',
1025
+ 'paged' => '2',
1026
+ 'loading_animation' => 'move-up',
1027
+ 'hide_date' => '0',
1028
+ 'hide_author' => '0',
1029
+ 'hide_comments' => '0',
1030
+ 'hide_likes' => '0',
1031
+ 'buttom' => array(
1032
+ 'text' => 'Load More...',
1033
+ 'style' => 'flat',
1034
+ 'icon' => 'material',
1035
+ 'icon_position' => 'left',
1036
+ 'separator' => 'load-more'
1037
+ )
1038
+ );
includes/elements/recent-posts-land-style.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_land_master_array( $master_array ) {
@@ -67,25 +67,6 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
67
  'group' => '' ,
68
  'edit_field_class' => ''
69
  ),
70
-
71
- // array(
72
- // 'param_name' => 'post_type',
73
- // 'type' => 'dropdown',
74
- // 'def_value' => 'post',
75
- // 'value' => array(
76
- // 'post' => __('Posts', 'auxin-elements' ),
77
- // 'page' => __('Pages', 'auxin-elements' ),
78
- // ),
79
- // 'holder' => 'dropdown',
80
- // 'class' => 'border',
81
- // 'heading' => __('Create items from','auxin-elements' ),
82
- // 'description' => '',
83
- // 'admin_label' => true,
84
- // 'dependency' => '',
85
- // 'weight' => '',
86
- // 'group' => '' ,
87
- // 'edit_field_class' => ''
88
- // ),
89
  array(
90
  'heading' => __('Categories', 'auxin-elements'),
91
  'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
@@ -144,7 +125,7 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
144
  array(
145
  'heading' => __('Exclude quote and link post formats','auxin-elements' ),
146
  'description' => '',
147
- 'param_name' => 'exclude_qoute_link',
148
  'type' => 'aux_switch',
149
  'value' => '0',
150
  'class' => '',
@@ -421,12 +402,14 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
421
  'order' => 'desc',
422
  'exclude_without_media' => 0,
423
  'exclude_custom_post_formats' => 0,
424
- 'exclude_qoute_link' => 0,
 
425
  'show_media' => true,
426
  'show_excerpt' => true,
427
  'excerpt_len' => '160',
428
  'display_title' => true,
429
- 'display_like' => true,
 
430
  'show_info' => true,
431
  'author_or_readmore' => 'readmore',
432
  'image_aspect_ratio' => 0.75,
@@ -441,13 +424,32 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
441
  $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
442
  extract( $result['parsed_atts'] );
443
 
 
 
 
 
444
  if( $author_or_readmore == 'readmore') {
445
- $show_readmore = true;
446
  $show_author_footer = false;
447
  } else {
448
  $show_author_footer = true;
449
- $show_readmore = false;
 
 
 
 
 
 
 
450
  }
 
 
 
 
 
 
 
 
451
 
452
  ob_start();
453
 
@@ -466,10 +468,42 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
466
  'post__not_in' => array_filter( explode( ',', $exclude ) ),
467
  'post__in' => array_filter( explode( ',', $include ) ),
468
  'post_status' => 'publish',
469
- 'posts_per_page' => $posts_per_page,
470
  'ignore_sticky_posts' => 1
471
  );
472
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
473
  $wp_query = new WP_Query( $args );
474
  }
475
 
@@ -493,15 +527,9 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
493
  $have_posts = $wp_query->have_posts();
494
 
495
  if( $wp_query->have_posts() ){
496
- ?><div class="<?php echo $wrapper_class ?>" > <?php
497
- while ( $wp_query->have_posts() ) {
498
 
499
- // break the loop if it is reached to the limit
500
- if ( $post_counter < $num ) {
501
- $post_counter ++;
502
- } else {
503
- break;
504
- }
505
 
506
  $wp_query->the_post();
507
  $post = $wp_query->post;
@@ -521,21 +549,11 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
521
 
522
  extract( $post_vars );
523
 
524
- $the_format = get_post_format($post);
525
-
526
- if (
527
- ( $exclude_custom_post_formats && !empty( $the_format ) ) ||
528
- ( $exclude_qoute_link && ( 'link' == $the_format || 'quote' == $the_format ) ) ||
529
- ( $exclude_without_media && !$has_attach )
530
- ) {
531
- $post_counter --;
532
- continue;
533
- }
534
-
535
  include( locate_template( 'templates/theme-parts/entry/post-column.php' ) );
536
-
537
  }
538
- ?> </div> <?php
 
539
  }
540
 
541
  if( $reset_query ){
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  function auxin_get_recent_posts_land_master_array( $master_array ) {
67
  'group' => '' ,
68
  'edit_field_class' => ''
69
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  array(
71
  'heading' => __('Categories', 'auxin-elements'),
72
  'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
125
  array(
126
  'heading' => __('Exclude quote and link post formats','auxin-elements' ),
127
  'description' => '',
128
+ 'param_name' => 'exclude_quote_link',
129
  'type' => 'aux_switch',
130
  'value' => '0',
131
  'class' => '',
402
  'order' => 'desc',
403
  'exclude_without_media' => 0,
404
  'exclude_custom_post_formats' => 0,
405
+ 'exclude_quote_link' => 0,
406
+ 'exclude_post_formats_in' => array(), // the list od post formats to exclude
407
  'show_media' => true,
408
  'show_excerpt' => true,
409
  'excerpt_len' => '160',
410
  'display_title' => true,
411
+ 'display_like' => true,
412
+ 'display_categories' => true,
413
  'show_info' => true,
414
  'author_or_readmore' => 'readmore',
415
  'image_aspect_ratio' => 0.75,
424
  $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
425
  extract( $result['parsed_atts'] );
426
 
427
+ // get content width
428
+ global $aux_content_width;
429
+
430
+ // post-olumn needs to have below variables
431
  if( $author_or_readmore == 'readmore') {
432
+ $show_readmore = true;
433
  $show_author_footer = false;
434
  } else {
435
  $show_author_footer = true;
436
+ $show_readmore = false;
437
+ }
438
+
439
+ // specify the post formats that should be excluded -------
440
+ $exclude_post_formats_in = (array) $exclude_post_formats_in;
441
+
442
+ if( $exclude_custom_post_formats ){
443
+ $exclude_post_formats_in = array_merge( $exclude_post_formats_in, array( 'aside', 'gallery', 'image', 'link', 'quote', 'video', 'audio' ) );
444
  }
445
+ if( $exclude_quote_link ){
446
+ $exclude_post_formats_in[] = 'quote';
447
+ $exclude_post_formats_in[] = 'link';
448
+ }
449
+ $exclude_post_formats_in = array_unique( $exclude_post_formats_in );
450
+
451
+ // --------------
452
+
453
 
454
  ob_start();
455
 
468
  'post__not_in' => array_filter( explode( ',', $exclude ) ),
469
  'post__in' => array_filter( explode( ',', $include ) ),
470
  'post_status' => 'publish',
471
+ 'posts_per_page' => $num,
472
  'ignore_sticky_posts' => 1
473
  );
474
 
475
+ // exclude post formats if required
476
+ if( ! empty( $exclude_post_formats_in ) ){
477
+
478
+ // generate post-format terms (i.e post-format-aside)
479
+ $post_format_terms = array();
480
+ foreach ( $exclude_post_formats_in as $_post_format ) {
481
+ $post_format_terms[] = 'post-format-' . $_post_format;
482
+ }
483
+
484
+ // exclude the redundant taxonomies (post-format)
485
+ $args['tax_query'] = array(
486
+ array(
487
+ 'taxonomy' => 'post_format',
488
+ 'field' => 'slug',
489
+ 'terms' => $post_format_terms,
490
+ 'operator' => 'NOT IN'
491
+ )
492
+ );
493
+
494
+ }
495
+
496
+ // whether to exclude posts without featured-image or not
497
+ if( $exclude_without_media ){
498
+ $args['meta_query'] = array(
499
+ array(
500
+ 'key' => '_thumbnail_id',
501
+ 'value' => '',
502
+ 'compare' => '!='
503
+ )
504
+ );
505
+ }
506
+
507
  $wp_query = new WP_Query( $args );
508
  }
509
 
527
  $have_posts = $wp_query->have_posts();
528
 
529
  if( $wp_query->have_posts() ){
530
+ echo sprintf( '<div class="%s">', $wrapper_class );
 
531
 
532
+ while ( $wp_query->have_posts() ) {
 
 
 
 
 
533
 
534
  $wp_query->the_post();
535
  $post = $wp_query->post;
549
 
550
  extract( $post_vars );
551
 
552
+ $the_format = get_post_format( $post );
 
 
 
 
 
 
 
 
 
 
553
  include( locate_template( 'templates/theme-parts/entry/post-column.php' ) );
 
554
  }
555
+
556
+ echo '</div>';
557
  }
558
 
559
  if( $reset_query ){
includes/elements/recent-posts-masonry.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_masonry_master_array( $master_array ) {
@@ -67,24 +67,6 @@ function auxin_get_recent_posts_masonry_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_masonry_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_masonry_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' => '',
@@ -355,8 +337,8 @@ function auxin_get_recent_posts_masonry_master_array( $master_array ) {
355
  'holder' => 'dropdown',
356
  'class' => 'desktop_cnum',
357
  'value' => array(
358
- '1' => '1' , '2' => '2' , '3' => '3' ,
359
- '4' => '4' , '5' => '5' , '6' => '6'
360
  ),
361
  'admin_label' => true,
362
  'dependency' => '',
@@ -374,8 +356,8 @@ function auxin_get_recent_posts_masonry_master_array( $master_array ) {
374
  'class' => 'tablet_cnum',
375
  'value' => array(
376
  'inherit' => 'Inherited from larger',
377
- '1' => '1' , '2' => '2' , '3' => '3' ,
378
- '4' => '4'
379
  ),
380
  'admin_label' => true,
381
  'dependency' => '',
@@ -388,12 +370,11 @@ function auxin_get_recent_posts_masonry_master_array( $master_array ) {
388
  'description' => '',
389
  'param_name' => 'phone_cnum',
390
  'type' => 'dropdown',
391
- 'def_value' => 'inherit',
392
  'holder' => 'dropdown',
393
  'class' => 'phone_cnum',
394
  'value' => array(
395
- 'inherit' => 'Inherited from larger',
396
- '1' => '1' , '2' => '2'
397
  ),
398
  'admin_label' => true,
399
  'dependency' => '',
@@ -446,16 +427,17 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
446
  'num' => '8', // max generated entry
447
  'exclude' => '',
448
  'include' => '',
449
- 'posts_per_page' => -1,
450
  'offset' => '',
451
  'paged' => '',
452
  'order_by' => 'menu_order date',
453
  'order' => 'desc',
454
  'exclude_without_media' => 0,
455
  'exclude_custom_post_formats' => 0,
456
- 'exclude_qoute_link' => 0,
 
457
  'show_media' => true,
458
  'display_like' => true,
 
459
  'content_layout' => 'entry-boxed', // entry-boxed
460
  'excerpt_len' => '160',
461
  'display_title' => true,
@@ -465,7 +447,7 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
465
  // 'image_aspect_ratio' => 0.75,
466
  'desktop_cnum' => 4,
467
  'tablet_cnum' => 'inherit',
468
- 'phone_cnum' => 'inherit',
469
  'tag' => '',
470
  'extra_classes' => '',
471
  'custom_el_id' => '',
@@ -477,14 +459,31 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
477
  $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
478
  extract( $result['parsed_atts'] );
479
 
 
 
 
480
  // post-olumn needs to have below variables
481
  if( $author_or_readmore == 'readmore') {
482
- $show_readmore = true;
483
  $show_author_footer = false;
484
  } else {
485
  $show_author_footer = true;
486
- $show_readmore = false;
 
 
 
 
 
 
 
 
 
 
 
487
  }
 
 
 
488
 
489
  ob_start();
490
 
@@ -503,10 +502,42 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
503
  'post__not_in' => array_filter( explode( ',', $exclude ) ),
504
  'post__in' => array_filter( explode( ',', $include ) ),
505
  'post_status' => 'publish',
506
- 'posts_per_page' => $posts_per_page,
507
  'ignore_sticky_posts' => 1
508
  );
509
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
510
  $wp_query = new WP_Query( $args );
511
  }
512
 
@@ -520,6 +551,7 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
520
 
521
  $show_comments = true; // shows comments icon
522
  $post_counter = 0;
 
523
  $column_class = '';
524
  $item_class = 'aux-col aux-post-masonry';
525
  $carousel_attrs = '';
@@ -528,8 +560,8 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
528
 
529
  // generate columns class
530
  $column_class = $container_class . ' aux-row aux-de-col' . $desktop_cnum;
531
- $column_class .= 'inherit' != $tablet_cnum ? ' aux-tb-col'.$tablet_cnum : '';
532
- $column_class .= 'inherit' != $phone_cnum ? ' aux-mb-col'.$phone_cnum : '';
533
  $column_class .= 'entry-boxed' == $content_layout ? ' aux-entry-boxed' : '';
534
 
535
 
@@ -538,15 +570,9 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
538
  $have_posts = $wp_query->have_posts();
539
 
540
  if( $have_posts ){
541
- ?><div class="<?php echo $column_class ?>" > <?php
542
- while ( $wp_query->have_posts() ) {
543
 
544
- // break the loop if it is reached to the limit
545
- if ( $post_counter < $num ) {
546
- $post_counter ++;
547
- } else {
548
- break;
549
- }
550
 
551
  $wp_query->the_post();
552
  $post = $wp_query->post;
@@ -578,31 +604,15 @@ function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content =
578
 
579
  $the_format = get_post_format( $post );
580
 
581
- if(
582
- ( $exclude_custom_post_formats && !empty( $the_format ) ) ||
583
- ( $exclude_qoute_link && ( 'link' == $the_format || 'quote' == $the_format ) ) ||
584
- ( $exclude_without_media && ! $has_attach )
585
- ){
586
- $post_counter --;
587
- continue;
588
- }
589
-
590
- ?>
591
- <div class="<?php echo $item_class ?>">
592
- <?php
593
- include( locate_template( 'templates/theme-parts/entry/post-column.php' ) ); ?>
594
- </div>
595
- <?php
596
  }
597
 
598
-
599
-
600
  // use it as data attribute on load more button
601
  $ajax_nonce = wp_create_nonce( 'post-recent-grid-nonce' );
602
 
603
- ?>
604
- </div>
605
- <?php
606
  }
607
 
608
  if( $reset_query ){
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  function auxin_get_recent_posts_masonry_master_array( $master_array ) {
67
  'group' => '' ,
68
  'edit_field_class' => ''
69
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  array(
71
  'heading' => __('Categories', 'auxin-elements'),
72
  'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
110
  'edit_field_class' => ''
111
  ),
112
  array(
113
+ 'heading' => __('Exclude all custom post formats','auxin-elements' ),
114
  'description' => '',
115
  'param_name' => 'exclude_custom_post_formats',
116
  'type' => 'aux_switch',
125
  array(
126
  'heading' => __('Exclude quote and link post formats','auxin-elements' ),
127
  'description' => '',
128
+ 'param_name' => 'exclude_quote_link',
129
  'type' => 'aux_switch',
130
  'value' => '0',
131
  'class' => '',
337
  'holder' => 'dropdown',
338
  'class' => 'desktop_cnum',
339
  'value' => array(
340
+ '1' => '1', '2' => '2', '3' => '3',
341
+ '4' => '4', '5' => '5', '6' => '6'
342
  ),
343
  'admin_label' => true,
344
  'dependency' => '',
356
  'class' => 'tablet_cnum',
357
  'value' => array(
358
  'inherit' => 'Inherited from larger',
359
+ '1' => '1', '2' => '2', '3' => '3',
360
+ '4' => '4', '5' => '5', '6' => '6'
361
  ),
362
  'admin_label' => true,
363
  'dependency' => '',
370
  'description' => '',
371
  'param_name' => 'phone_cnum',
372
  'type' => 'dropdown',
373
+ 'def_value' => '1',
374
  'holder' => 'dropdown',
375
  'class' => 'phone_cnum',
376
  'value' => array(
377
+ '1' => '1' , '2' => '2', '3' => '3'
 
378
  ),
379
  'admin_label' => true,
380
  'dependency' => '',
427
  'num' => '8', // max generated entry
428
  'exclude' => '',
429
  'include' => '',
 
430
  'offset' => '',
431
  'paged' => '',
432
  'order_by' => 'menu_order date',
433
  'order' => 'desc',
434
  'exclude_without_media' => 0,
435
  'exclude_custom_post_formats' => 0,
436
+ 'exclude_quote_link' => 0,
437
+ 'exclude_post_formats_in' => array(), // the list od post formats to exclude
438
  'show_media' => true,
439
  'display_like' => true,
440
+ 'display_categories' => true,
441
  'content_layout' => 'entry-boxed', // entry-boxed
442
  'excerpt_len' => '160',
443
  'display_title' => true,
447
  // 'image_aspect_ratio' => 0.75,
448
  'desktop_cnum' => 4,
449
  'tablet_cnum' => 'inherit',
450
+ 'phone_cnum' => '1',
451
  'tag' => '',
452
  'extra_classes' => '',
453
  'custom_el_id' => '',
459
  $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
460
  extract( $result['parsed_atts'] );
461
 
462
+ // get content width
463
+ global $aux_content_width;
464
+
465
  // post-olumn needs to have below variables
466
  if( $author_or_readmore == 'readmore') {
467
+ $show_readmore = true;
468
  $show_author_footer = false;
469
  } else {
470
  $show_author_footer = true;
471
+ $show_readmore = false;
472
+ }
473
+
474
+ // specify the post formats that should be excluded -------
475
+ $exclude_post_formats_in = (array) $exclude_post_formats_in;
476
+
477
+ if( $exclude_custom_post_formats ){
478
+ $exclude_post_formats_in = array_merge( $exclude_post_formats_in, array( 'aside', 'gallery', 'image', 'link', 'quote', 'video', 'audio' ) );
479
+ }
480
+ if( $exclude_quote_link ){
481
+ $exclude_post_formats_in[] = 'quote';
482
+ $exclude_post_formats_in[] = 'link';
483
  }
484
+ $exclude_post_formats_in = array_unique( $exclude_post_formats_in );
485
+
486
+ // --------------
487
 
488
  ob_start();
489
 
502
  'post__not_in' => array_filter( explode( ',', $exclude ) ),
503
  'post__in' => array_filter( explode( ',', $include ) ),
504
  'post_status' => 'publish',
505
+ 'posts_per_page' => $num,
506
  'ignore_sticky_posts' => 1
507
  );
508
 
509
+ // exclude post formats if required
510
+ if( ! empty( $exclude_post_formats_in ) ){
511
+
512
+ // generate post-format terms (i.e post-format-aside)
513
+ $post_format_terms = array();
514
+ foreach ( $exclude_post_formats_in as $_post_format ) {
515
+ $post_format_terms[] = 'post-format-' . $_post_format;
516
+ }
517
+
518
+ // exclude the redundant taxonomies (post-format)
519
+ $args['tax_query'] = array(
520
+ array(
521
+ 'taxonomy' => 'post_format',
522
+ 'field' => 'slug',
523
+ 'terms' => $post_format_terms,
524
+ 'operator' => 'NOT IN'
525
+ )
526
+ );
527
+
528
+ }
529
+
530
+ // whether to exclude posts without featured-image or not
531
+ if( $exclude_without_media ){
532
+ $args['meta_query'] = array(
533
+ array(
534
+ 'key' => '_thumbnail_id',
535
+ 'value' => '',
536
+ 'compare' => '!='
537
+ )
538
+ );
539
+ }
540
+
541
  $wp_query = new WP_Query( $args );
542
  }
543
 
551
 
552
  $show_comments = true; // shows comments icon
553
  $post_counter = 0;
554
+ $post_classes = '';
555
  $column_class = '';
556
  $item_class = 'aux-col aux-post-masonry';
557
  $carousel_attrs = '';
560
 
561
  // generate columns class
562
  $column_class = $container_class . ' aux-row aux-de-col' . $desktop_cnum;
563
+ $tablet_cnum = ('inherit' == $tablet_cnum ) ? $desktop_cnum : $tablet_cnum ;
564
+ $column_class .= ' aux-tb-col'.$tablet_cnum . ' aux-mb-col'.$phone_cnum;
565
  $column_class .= 'entry-boxed' == $content_layout ? ' aux-entry-boxed' : '';
566
 
567
 
570
  $have_posts = $wp_query->have_posts();
571
 
572
  if( $have_posts ){
573
+ echo sprintf( '<div class="%s">', $column_class );
 
574
 
575
+ while ( $wp_query->have_posts() ) {
 
 
 
 
 
576
 
577
  $wp_query->the_post();
578
  $post = $wp_query->post;
604
 
605
  $the_format = get_post_format( $post );
606
 
607
+ printf( '<div class="%s">', $item_class );
608
+ include( locate_template( 'templates/theme-parts/entry/post-column.php' ) );
609
+ echo '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
610
  }
611
 
 
 
612
  // use it as data attribute on load more button
613
  $ajax_nonce = wp_create_nonce( 'post-recent-grid-nonce' );
614
 
615
+ echo '</div>';
 
 
616
  }
617
 
618
  if( $reset_query ){
includes/elements/recent-posts-tiles.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_tiles_master_array( $master_array ) {
@@ -67,25 +67,6 @@ function auxin_get_recent_posts_tiles_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
-
89
  array(
90
  'heading' => __('Categories', 'auxin-elements'),
91
  'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
@@ -148,7 +129,7 @@ function auxin_get_recent_posts_tiles_master_array( $master_array ) {
148
  array(
149
  'heading' => __('Exclude quote and link post formats','auxin-elements' ),
150
  'description' => '',
151
- 'param_name' => 'exclude_qoute_link',
152
  'type' => 'aux_switch',
153
  'value' => '1',
154
  'class' => '',
@@ -343,7 +324,6 @@ function auxin_widget_recent_posts_tiles_callback( $atts, $shortcode_content = n
343
  'num' => '4', // max generated entry
344
  'exclude' => '',
345
  'include' => '',
346
- 'posts_per_page' => -1,
347
  'offset' => '',
348
  'paged' => '',
349
  'order_by' => 'menu_order date',
@@ -351,7 +331,8 @@ function auxin_widget_recent_posts_tiles_callback( $atts, $shortcode_content = n
351
  'excerpt_len' => '160',
352
  'exclude_without_media' => 1,
353
  'exclude_custom_post_formats' => 1,
354
- 'exclude_qoute_link' => 1,
 
355
  'tile_style' => '',
356
  'display_title' => true,
357
  'show_info' => true,
@@ -365,6 +346,24 @@ function auxin_widget_recent_posts_tiles_callback( $atts, $shortcode_content = n
365
  $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
366
  extract( $result['parsed_atts'] );
367
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
368
  ob_start();
369
 
370
  global $wp_query;
@@ -382,10 +381,42 @@ function auxin_widget_recent_posts_tiles_callback( $atts, $shortcode_content = n
382
  'post__not_in' => array_filter( explode( ',', $exclude ) ),
383
  'post__in' => array_filter( explode( ',', $include ) ),
384
  'post_status' => 'publish',
385
- 'posts_per_page' => $posts_per_page,
386
  'ignore_sticky_posts' => 1
387
  );
388
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
389
  $wp_query = new WP_Query( $args );
390
  }
391
 
@@ -400,29 +431,23 @@ function auxin_widget_recent_posts_tiles_callback( $atts, $shortcode_content = n
400
  $post_counter = 0;
401
  $item_class = 'aux-post-tile aux-image-box';
402
 
403
- $container_class = 'aux-tiles-layout ' . $tile_style;
404
-
405
  $column_media_width = auxin_get_content_column_width( 4, 0 );
406
 
407
  $have_posts = $wp_query->have_posts();
408
 
409
  if( $have_posts ){
410
- ?><div class="<?php echo $container_class ?>"aux-tiles-layout> <?php
411
 
412
- while ( $wp_query->have_posts() ) {
413
 
414
- // break the loop if it xis reached to the limit
415
- if ( $post_counter < $num ) {
416
- $post_counter ++;
417
- } else {
418
- break;
419
- }
420
 
421
  $wp_query->the_post();
422
  $post = $wp_query->post;
423
 
424
  $the_format = get_post_format( $post );
425
- $item_pattern_info = auxin_get_tile_pattern( 'default', $post_counter - 1, $column_media_width );
 
426
 
427
  $post_vars = auxin_get_post_format_media(
428
  $post,
@@ -440,23 +465,12 @@ function auxin_widget_recent_posts_tiles_callback( $atts, $shortcode_content = n
440
 
441
  extract( $post_vars );
442
 
443
- if (
444
- ( $exclude_custom_post_formats && !empty( $the_format ) ) ||
445
- ( $exclude_qoute_link && ( 'link' == $the_format || 'quote' == $the_format ) ) ||
446
- ( $exclude_without_media && !$has_attach )
447
- ) {
448
- $post_counter --;
449
- continue;
450
- }
451
-
452
-
453
-
454
  $post_classes = $item_class .' '. $item_pattern_info['classname'];
455
 
456
  include( locate_template( 'templates/theme-parts/entry/post-tile.php' ) );
457
  }
458
 
459
- ?> </div> <?php
460
  }
461
 
462
  if( $reset_query ){
@@ -474,72 +488,3 @@ function auxin_widget_recent_posts_tiles_callback( $atts, $shortcode_content = n
474
 
475
  return ob_get_clean();
476
  }
477
-
478
- /**
479
- * Defines the size of post tile based on pattern and given index
480
- * @param string $pattern
481
- * @param int $index
482
- * @return Array classname, image size
483
- */
484
- function auxin_get_tile_pattern( $pattern = 'default', $index, $column_media_width ) {
485
-
486
- $div_index = $index % 12;
487
- $return_value = array();
488
-
489
- switch ( $div_index ) {
490
-
491
- // large squares
492
- case 0:
493
- case 7:
494
- $return_value = array(
495
- 'classname' => 'aux-tile-2-2 aux-t-tile-4-2 aux-m-tile-4-2',
496
- 'image_sizes' => array(
497
- array( 'min' => '' , 'max' => '992px', 'width' => '100vw' ),
498
- array( 'min' => '' , 'max' => '', 'width' => '50vw' )
499
- ),
500
- 'srcset_sizes' => array(
501
- array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
502
- array( 'width' => 992, 'height' => 992 * 0.5 ),
503
- array( 'width' => 767, 'height' => 766 * 0.5 )
504
- )
505
- );
506
- break;
507
-
508
- // full width
509
- case 5:
510
- case 11:
511
- $return_value = array(
512
- 'classname' => 'aux-tile-4-2',
513
- 'image_sizes' => array(
514
-
515
- ),
516
- 'srcset_sizes' => array(
517
- array( 'width' => $column_media_width, 'height' => $column_media_width * 0.5),
518
- array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width * 0.5),
519
- array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width * 0.5 )
520
- )
521
- );
522
- break;
523
-
524
- // small squares
525
- default:
526
- $return_value = array(
527
- 'classname' => 'aux-tile-1-1 aux-t-tile-2-2 aux-m-tile-4-2',
528
- 'image_sizes' => array(
529
- array( 'min' => '', 'max' => '767px', 'width' => '100vw' ),
530
- array( 'min' => '' , 'max' => '992px', 'width' => '50vw' ),
531
- array( 'min' => '' , 'max' => '', 'width' => '25vw' )
532
- ),
533
- 'srcset_sizes' => array(
534
- array( 'width' => $column_media_width, 'height' => $column_media_width ),
535
- array( 'width' => 992 * 0.5, 'height' => 992 * 0.5 ),
536
- array( 'width' => 767, 'height' => 766 * 0.5 )
537
-
538
- )
539
- );
540
-
541
- }
542
-
543
- return $return_value;
544
- }
545
-
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  function auxin_get_recent_posts_tiles_master_array( $master_array ) {
67
  'group' => '' ,
68
  'edit_field_class' => ''
69
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  array(
71
  'heading' => __('Categories', 'auxin-elements'),
72
  'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
129
  array(
130
  'heading' => __('Exclude quote and link post formats','auxin-elements' ),
131
  'description' => '',
132
+ 'param_name' => 'exclude_quote_link',
133
  'type' => 'aux_switch',
134
  'value' => '1',
135
  'class' => '',
324
  'num' => '4', // max generated entry
325
  'exclude' => '',
326
  'include' => '',
 
327
  'offset' => '',
328
  'paged' => '',
329
  'order_by' => 'menu_order date',
331
  'excerpt_len' => '160',
332
  'exclude_without_media' => 1,
333
  'exclude_custom_post_formats' => 1,
334
+ 'exclude_quote_link' => 1,
335
+ 'exclude_post_formats_in' => array(), // the list od post formats to exclude
336
  'tile_style' => '',
337
  'display_title' => true,
338
  'show_info' => true,
346
  $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
347
  extract( $result['parsed_atts'] );
348
 
349
+
350
+ // get content width
351
+ global $aux_content_width;
352
+
353
+ // specify the post formats that should be excluded -------
354
+ $exclude_post_formats_in = (array) $exclude_post_formats_in;
355
+
356
+ if( $exclude_custom_post_formats ){
357
+ $exclude_post_formats_in = array_merge( $exclude_post_formats_in, array( 'aside', 'gallery', 'image', 'link', 'quote', 'video', 'audio' ) );
358
+ }
359
+ if( $exclude_quote_link ){
360
+ $exclude_post_formats_in[] = 'quote';
361
+ $exclude_post_formats_in[] = 'link';
362
+ }
363
+ $exclude_post_formats_in = array_unique( $exclude_post_formats_in );
364
+
365
+ // --------------
366
+
367
  ob_start();
368
 
369
  global $wp_query;
381
  'post__not_in' => array_filter( explode( ',', $exclude ) ),
382
  'post__in' => array_filter( explode( ',', $include ) ),
383
  'post_status' => 'publish',
384
+ 'posts_per_page' => $num,
385
  'ignore_sticky_posts' => 1
386
  );
387
 
388
+ // exclude post formats if required
389
+ if( ! empty( $exclude_post_formats_in ) ){
390
+
391
+ // generate post-format terms (i.e post-format-aside)
392
+ $post_format_terms = array();
393
+ foreach ( $exclude_post_formats_in as $_post_format ) {
394
+ $post_format_terms[] = 'post-format-' . $_post_format;
395
+ }
396
+
397
+ // exclude the redundant taxonomies (post-format)
398
+ $args['tax_query'] = array(
399
+ array(
400
+ 'taxonomy' => 'post_format',
401
+ 'field' => 'slug',
402
+ 'terms' => $post_format_terms,
403
+ 'operator' => 'NOT IN'
404
+ )
405
+ );
406
+
407
+ }
408
+
409
+ // whether to exclude posts without featured-image or not
410
+ if( $exclude_without_media ){
411
+ $args['meta_query'] = array(
412
+ array(
413
+ 'key' => '_thumbnail_id',
414
+ 'value' => '',
415
+ 'compare' => '!='
416
+ )
417
+ );
418
+ }
419
+
420
  $wp_query = new WP_Query( $args );
421
  }
422
 
431
  $post_counter = 0;
432
  $item_class = 'aux-post-tile aux-image-box';
433
 
434
+ $container_class = 'aux-tiles-layout ' . $tile_style;
 
435
  $column_media_width = auxin_get_content_column_width( 4, 0 );
436
 
437
  $have_posts = $wp_query->have_posts();
438
 
439
  if( $have_posts ){
 
440
 
441
+ echo sprintf( '<div class="%s">', $container_class );
442
 
443
+ while ( $wp_query->have_posts() ) {
 
 
 
 
 
444
 
445
  $wp_query->the_post();
446
  $post = $wp_query->post;
447
 
448
  $the_format = get_post_format( $post );
449
+ $item_pattern_info = auxin_get_tile_pattern( 'default', $post_counter, $column_media_width );
450
+ $post_counter++;
451
 
452
  $post_vars = auxin_get_post_format_media(
453
  $post,
465
 
466
  extract( $post_vars );
467
 
 
 
 
 
 
 
 
 
 
 
 
468
  $post_classes = $item_class .' '. $item_pattern_info['classname'];
469
 
470
  include( locate_template( 'templates/theme-parts/entry/post-tile.php' ) );
471
  }
472
 
473
+ echo '</div>';
474
  }
475
 
476
  if( $reset_query ){
488
 
489
  return ob_get_clean();
490
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/elements/recent-posts-timeline.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_timeline_master_array( $master_array ) {
@@ -18,12 +18,6 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
18
  $categories_list[$value->term_id] = $value->name;
19
  }
20
 
21
- // $tags = get_terms( 'post_tag', 'orderby=count&hide_empty=0' );
22
- // $tags_list;
23
- // foreach ($tags as $key => $value) {
24
- // $tags_list["$value->term_id"] = $value->name;
25
- // }
26
-
27
 
28
  $master_array['aux_recent_posts_timeline'] = array(
29
  'name' => __('[Phlox] Timeline Recent Posts', 'auxin-elements' ),
@@ -94,24 +88,6 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
94
  'group' => '' ,
95
  'edit_field_class' => ''
96
  ),
97
- // array(
98
- // 'param_name' => 'post_type',
99
- // 'type' => 'dropdown',
100
- // 'def_value' => 'post',
101
- // 'value' => array(
102
- // 'post' => __('Posts', 'auxin-elements' ),
103
- // 'page' => __('Pages', 'auxin-elements' ),
104
- // ),
105
- // 'holder' => 'dropdown',
106
- // 'class' => 'border',
107
- // 'heading' => __('Create items from','auxin-elements' ),
108
- // 'description' => '',
109
- // 'admin_label' => true,
110
- // 'dependency' => '',
111
- // 'weight' => '',
112
- // 'group' => '' ,
113
- // 'edit_field_class' => ''
114
- // ),
115
  array(
116
  'heading' => __('Categories', 'auxin-elements'),
117
  'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
@@ -155,7 +131,7 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
155
  'edit_field_class' => ''
156
  ),
157
  array(
158
- 'heading' => __('Exclude custom post formats','auxin-elements' ),
159
  'description' => '',
160
  'param_name' => 'exclude_custom_post_formats',
161
  'type' => 'aux_switch',
@@ -170,9 +146,9 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
170
  array(
171
  'heading' => __('Exclude quote and link post formats','auxin-elements' ),
172
  'description' => '',
173
- 'param_name' => 'exclude_qoute_link',
174
  'type' => 'aux_switch',
175
- 'value' => '0',
176
  'class' => '',
177
  'admin_label' => true,
178
  'dependency' => array(
@@ -405,8 +381,7 @@ add_filter( 'auxin_master_array_shortcodes', 'auxin_get_recent_posts_timeline_ma
405
 
406
 
407
  /**
408
- * Element without loop and column
409
- * The front-end output of this element is returned by the following function
410
  *
411
  * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above.
412
  * @param string $shortcode_content The shorcode content
@@ -423,14 +398,14 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
423
  'num' => '8',
424
  'exclude' => '',
425
  'include' => '',
426
- 'posts_per_page' => -1,
427
  'paged' => '',
428
  'offset' => '',
429
  'order_by' => 'menu_order date',
430
  'order' => 'desc',
431
  'exclude_without_media' => 0,
432
  'exclude_custom_post_formats' => 0,
433
- 'exclude_qoute_link' => 0,
 
434
  'show_media' => true,
435
  'show_excerpt' => true,
436
  'excerpt_len' => '160',
@@ -440,6 +415,7 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
440
  'author_or_readmore' => 'readmore',
441
  'timeline_alignment' => 'center',
442
  'display_like' => true,
 
443
  'tag' => '',
444
  'extra_classes' => '',
445
  'custom_el_id' => '',
@@ -451,13 +427,31 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
451
  $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
452
  extract( $result['parsed_atts'] );
453
 
 
 
 
 
454
  if( $author_or_readmore == 'readmore') {
455
- $show_readmore = true;
456
  $show_author_footer = false;
457
  } else {
458
  $show_author_footer = true;
459
- $show_readmore = false;
 
 
 
 
 
 
 
460
  }
 
 
 
 
 
 
 
461
 
462
  ob_start();
463
 
@@ -476,10 +470,42 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
476
  'post__not_in' => array_filter( explode( ',', $exclude ) ),
477
  'post__in' => array_filter( explode( ',', $include ) ),
478
  'post_status' => 'publish',
479
- 'posts_per_page' => $posts_per_page,
480
  'ignore_sticky_posts' => 1
481
  );
482
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
483
  $wp_query = new WP_Query( $args );
484
  }
485
 
@@ -488,32 +514,28 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
488
  echo $result['widget_title'];
489
 
490
 
491
- $phone_break_point = 767;
492
- $tablet_break_point = 992;
493
- $column_media_width = auxin_get_content_column_width( 2, 15 );
494
 
495
- $show_comments = true; // shows comments icon
496
- $post_counter = 0;
497
- $wrapper_class = 'aux-timeline aux-'.$timeline_alignment;
498
- $item_class = 'aux-block';
499
- $post_classes = 'aux-block';
500
- $post_info_position = 'after-title';
501
- $post_month;
502
- $old_post_month = '';
 
503
 
504
  // whether any result was found or not
505
  $have_posts = $wp_query->have_posts();
506
 
 
507
  if( $wp_query->have_posts() ){
508
- ?><div class="<?php echo $wrapper_class ?>" data-layout="<?php echo $timeline_alignment ?>"> <?php
509
- while ( $wp_query->have_posts() ) {
510
 
511
- // break the loop if it is reached to the limit
512
- if ( $post_counter < $num ) {
513
- $post_counter ++;
514
- } else {
515
- break;
516
- }
517
 
518
  $wp_query->the_post();
519
  $post = $wp_query->post;
@@ -524,47 +546,41 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
524
  'post_type' => 'post',
525
  'request_from' => 'archive',
526
  'media_width' => $phone_break_point,
527
- 'media_size' => 'large',//array( 'width' => $column_media_width, 'height' => $column_media_width * $image_aspect_ratio ),
528
  'upscale_image' => true,
529
  'image_from_content' => ! $exclude_without_media, // whether to try to get image from content or not
530
  'add_image_hw' => false, // whether add width and height attr or not
531
  'image_sizes' => array(
532
  array( 'min' => '', 'max' => '767px', 'width' => '80vw' ),
533
  array( 'min' => '768px', 'max' => '992px', 'width' => '40vw' ),
534
- array( 'min' => '' , 'max' => '', 'width' => $column_media_width.'px' )
535
  ),
536
  'srcset_sizes' => array(
537
- array( 'width' => $column_media_width, 'height' => $column_media_width * $image_aspect_ratio ),
538
- array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width * $image_aspect_ratio ),
539
- array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width * $image_aspect_ratio )
540
  )
541
  )
542
  );
543
 
544
  extract( $post_vars );
545
 
546
- $the_format = get_post_format($post);
 
547
 
548
- if (
549
- ( $exclude_custom_post_formats && !empty( $the_format ) ) ||
550
- ( $exclude_qoute_link && ( 'link' == $the_format || 'quote' == $the_format ) ) ||
551
- ( $exclude_without_media && !$has_attach )
552
- ) {
553
- $post_counter --;
554
- continue;
555
- }
556
- $post_month = date('m', strtotime(str_replace('/', '-', get_the_date() ) ) );
557
- if($post_month != $old_post_month){
558
- ?>
559
- <span class="aux-date-label"><?php the_time('M, Y'); ?></span>
560
- <?php
561
  }
562
- ?>
563
- <?php include( locate_template( 'templates/theme-parts/entry/post-column.php' ) ); ?>
564
- <?php
565
- $old_post_month = $post_month;
566
  }
567
- ?> </div> <?php
 
568
  }
569
 
570
  if( $reset_query ){
@@ -577,7 +593,7 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
577
  return false;
578
  }
579
 
580
- // widget footer ------------------------------
581
  echo $result['widget_footer'];
582
 
583
  return ob_get_clean();
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  function auxin_get_recent_posts_timeline_master_array( $master_array ) {
18
  $categories_list[$value->term_id] = $value->name;
19
  }
20
 
 
 
 
 
 
 
21
 
22
  $master_array['aux_recent_posts_timeline'] = array(
23
  'name' => __('[Phlox] Timeline Recent Posts', 'auxin-elements' ),
88
  'group' => '' ,
89
  'edit_field_class' => ''
90
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  array(
92
  'heading' => __('Categories', 'auxin-elements'),
93
  'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
131
  'edit_field_class' => ''
132
  ),
133
  array(
134
+ 'heading' => __('Exclude all custom post formats','auxin-elements' ),
135
  'description' => '',
136
  'param_name' => 'exclude_custom_post_formats',
137
  'type' => 'aux_switch',
146
  array(
147
  'heading' => __('Exclude quote and link post formats','auxin-elements' ),
148
  'description' => '',
149
+ 'param_name' => 'exclude_quote_link',
150
  'type' => 'aux_switch',
151
+ 'value' => '1',
152
  'class' => '',
153
  'admin_label' => true,
154
  'dependency' => array(
381
 
382
 
383
  /**
384
+ *
 
385
  *
386
  * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above.
387
  * @param string $shortcode_content The shorcode content
398
  'num' => '8',
399
  'exclude' => '',
400
  'include' => '',
 
401
  'paged' => '',
402
  'offset' => '',
403
  'order_by' => 'menu_order date',
404
  'order' => 'desc',
405
  'exclude_without_media' => 0,
406
  'exclude_custom_post_formats' => 0,
407
+ 'exclude_quote_link' => 1,
408
+ 'exclude_post_formats_in' => array(), // the list od post formats to exclude
409
  'show_media' => true,
410
  'show_excerpt' => true,
411
  'excerpt_len' => '160',
415
  'author_or_readmore' => 'readmore',
416
  'timeline_alignment' => 'center',
417
  'display_like' => true,
418
+ 'display_categories' => true,
419
  'tag' => '',
420
  'extra_classes' => '',
421
  'custom_el_id' => '',
427
  $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
428
  extract( $result['parsed_atts'] );
429
 
430
+ // get content width
431
+ global $aux_content_width;
432
+
433
+ // show "author" or "readmore" btn in footer
434
  if( $author_or_readmore == 'readmore') {
435
+ $show_readmore = true;
436
  $show_author_footer = false;
437
  } else {
438
  $show_author_footer = true;
439
+ $show_readmore = false;
440
+ }
441
+
442
+ // specify the post formats that should be excluded -------
443
+ $exclude_post_formats_in = (array) $exclude_post_formats_in;
444
+
445
+ if( $exclude_custom_post_formats ){
446
+ $exclude_post_formats_in = array_merge( $exclude_post_formats_in, array( 'aside', 'gallery', 'image', 'link', 'quote', 'video', 'audio' ) );
447
  }
448
+ if( $exclude_quote_link ){
449
+ $exclude_post_formats_in[] = 'quote';
450
+ $exclude_post_formats_in[] = 'link';
451
+ }
452
+ $exclude_post_formats_in = array_unique( $exclude_post_formats_in );
453
+
454
+ // --------------
455
 
456
  ob_start();
457
 
470
  'post__not_in' => array_filter( explode( ',', $exclude ) ),
471
  'post__in' => array_filter( explode( ',', $include ) ),
472
  'post_status' => 'publish',
473
+ 'posts_per_page' => $num,
474
  'ignore_sticky_posts' => 1
475
  );
476
 
477
+ // exclude post formats if required
478
+ if( ! empty( $exclude_post_formats_in ) ){
479
+
480
+ // generate post-format terms (i.e post-format-aside)
481
+ $post_format_terms = array();
482
+ foreach ( $exclude_post_formats_in as $_post_format ) {
483
+ $post_format_terms[] = 'post-format-' . $_post_format;
484
+ }
485
+
486
+ // exclude the redundant taxonomies (post-format)
487
+ $args['tax_query'] = array(
488
+ array(
489
+ 'taxonomy' => 'post_format',
490
+ 'field' => 'slug',
491
+ 'terms' => $post_format_terms,
492
+ 'operator' => 'NOT IN'
493
+ )
494
+ );
495
+
496
+ }
497
+
498
+ // whether to exclude posts without featured-image or not
499
+ if( $exclude_without_media ){
500
+ $args['meta_query'] = array(
501
+ array(
502
+ 'key' => '_thumbnail_id',
503
+ 'value' => '',
504
+ 'compare' => '!='
505
+ )
506
+ );
507
+ }
508
+
509
  $wp_query = new WP_Query( $args );
510
  }
511
 
514
  echo $result['widget_title'];
515
 
516
 
517
+ $phone_break_point = 767;
518
+ $tablet_break_point = 992;
 
519
 
520
+ $show_comments = true; // shows comments icon
521
+ $wrapper_class = 'aux-timeline aux-'.$timeline_alignment;
522
+ $item_class = 'aux-block';
523
+ $post_classes = 'aux-block';
524
+ $post_info_position = 'after-title';
525
+ $previous_post_month = '';
526
+
527
+ // calculate the media width
528
+ $media_width = 'center' == $timeline_alignment ? $aux_content_width / 2 : $aux_content_width;
529
 
530
  // whether any result was found or not
531
  $have_posts = $wp_query->have_posts();
532
 
533
+
534
  if( $wp_query->have_posts() ){
 
 
535
 
536
+ echo sprintf( '<div class="%s" data-layout="%s">', $wrapper_class, $timeline_alignment );
537
+
538
+ while ( $wp_query->have_posts() ) {
 
 
 
539
 
540
  $wp_query->the_post();
541
  $post = $wp_query->post;
546
  'post_type' => 'post',
547
  'request_from' => 'archive',
548
  'media_width' => $phone_break_point,
549
+ 'media_size' => 'large',
550
  'upscale_image' => true,
551
  'image_from_content' => ! $exclude_without_media, // whether to try to get image from content or not
552
  'add_image_hw' => false, // whether add width and height attr or not
553
  'image_sizes' => array(
554
  array( 'min' => '', 'max' => '767px', 'width' => '80vw' ),
555
  array( 'min' => '768px', 'max' => '992px', 'width' => '40vw' ),
556
+ array( 'min' => '' , 'max' => '', 'width' => $media_width.'px' )
557
  ),
558
  'srcset_sizes' => array(
559
+ array( 'width' => 550, 'height' => 550 * $image_aspect_ratio ),
560
+ array( 'width' => 2 * 550, 'height' => 2 * 550 * $image_aspect_ratio ),
561
+ array( 'width' => 4 * 550, 'height' => 4 * 550 * $image_aspect_ratio )
562
  )
563
  )
564
  );
565
 
566
  extract( $post_vars );
567
 
568
+ // get the post format
569
+ $the_format = get_post_format( $post );
570
 
571
+ // get current post month
572
+ $post_month = date( 'm', strtotime( get_the_date() ) );
573
+
574
+ // add month label on timeline main line
575
+ if( $post_month != $previous_post_month ){
576
+ ?><span class="aux-date-label"><?php the_time('M, Y'); ?></span><?php
 
 
 
 
 
 
 
577
  }
578
+
579
+ include( locate_template( 'templates/theme-parts/entry/post-column.php' ) );
580
+ $previous_post_month = $post_month;
 
581
  }
582
+
583
+ echo "</div>";
584
  }
585
 
586
  if( $reset_query ){
593
  return false;
594
  }
595
 
596
+ // widget footer -----------------------
597
  echo $result['widget_footer'];
598
 
599
  return ob_get_clean();
includes/elements/recent-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_recent_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_recent_post_widget_master_array( $master_array ) {
includes/elements/related-posts.php ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Related Posts for any post type
5
+ *
6
+ * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above.
7
+ * @param string $shortcode_content The shorcode content
8
+ * @return string The output of element markup
9
+ */
10
+
11
+ function auxin_get_the_related_posts( $args = array() ){
12
+
13
+ global $post;
14
+
15
+ // the recent posts args
16
+ $defaults = array(
17
+ 'title' => '',
18
+ 'post_type' => $post->post_type,
19
+ 'taxonomy_name' => '', // the taxonomy that we intent to display in post info
20
+ 'taxonomy' => array(),
21
+ 'orderbr' => 'menu_order date',
22
+ 'num' => 3,
23
+ 'desktop_cnum' => 3,
24
+ 'tablet_cnum' => 2,
25
+ 'phone_cnum' => 1,
26
+
27
+ 'display_title' => true,
28
+ 'show_info' => true,
29
+ 'show_date' => false,
30
+ 'author_or_readmore' => '', // readmore, author, none
31
+ 'display_categories' => true,
32
+ 'max_taxonomy_num' => 3,
33
+ 'wp_query_args' => array(),
34
+
35
+ 'show_media' => true,
36
+ 'content_layout' => 'entry-boxed', // entry-boxed
37
+ 'show_excerpt' => false,
38
+ 'excerpt_len' => '0',
39
+ 'post_info_position' => 'after-title',
40
+ 'image_aspect_ratio' => 0.75,
41
+ 'preview_mode' => 'grid',
42
+ 'grid_table_hover' => 'bgimage-bgcolor',
43
+
44
+ 'ignore_media' => false, // whether to ignore media for this
45
+ 'exclude' => '',
46
+ 'include' => '',
47
+ 'order_by' => 'menu_order date',
48
+ 'order' => 'desc',
49
+ 'exclude_without_media' => 0,
50
+ 'exclude_custom_post_formats' => 0,
51
+ 'exclude_quote_link' => 0,
52
+ 'exclude_post_formats_in' => array(), // the list od post formats to exclude
53
+ 'display_like' => true,
54
+
55
+ 'extra_classes' => '',
56
+ 'extra_column_classes' => '',
57
+ 'custom_el_id' => '',
58
+ 'carousel_space' => '30',
59
+ 'carousel_autoplay' => false,
60
+ 'carousel_autoplay_delay' => '2',
61
+ 'carousel_navigation' => 'peritem',
62
+ 'carousel_navigation_control' => 'bullets',
63
+ 'carousel_loop' => 1,
64
+
65
+ 'reset_query' => true,
66
+ 'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
67
+ 'custom_wp_query' => '',
68
+ 'base_class' => 'aux-widget-recent-posts aux-widget-related-posts',
69
+
70
+ 'text_alignment' => '',
71
+ 'container_start_tag' => '<div class="container aux-fold">',
72
+ 'container_end_tag' => '</div>'
73
+ );
74
+
75
+
76
+ // update the setting base on preview mode
77
+ if( ! isset( $args['num'] ) && isset( $args['desktop_cnum'] ) ){
78
+ $args['num'] = 'carousel' == $args['preview_mode'] ? $args['desktop_cnum'] * 2 : $args['desktop_cnum'];
79
+ }
80
+
81
+ $args = wp_parse_args( $args, $defaults );
82
+
83
+ // query the related posts base on taxonimy --------------------------------
84
+
85
+ // the taxonomies
86
+ $taxonomy = $args['taxonomy'];
87
+
88
+ // the taxonomy that we intend to display its corresponding terms (required in post-column.php)
89
+ $taxonomy_name = isset( $taxonomy[0] ) ? $taxonomy[0] : $taxonomy;
90
+
91
+ // query the post with the same cat or categories
92
+ if( $taxonomy ){
93
+
94
+ $args['wp_query_args']['tax_query'] = array();
95
+
96
+ foreach ( $taxonomy as $tax ) {
97
+ $tax_terms = get_the_terms( $post->ID, $tax );
98
+ $tax_slugs = array();
99
+
100
+ if( $tax_terms && is_array( $tax_terms ) ) {
101
+ // loop through current item terms and get all tax slugs
102
+ foreach ( $tax_terms as $tax_term ) {
103
+ $tax_slugs[] = $tax_term->slug;
104
+ }
105
+ $tax_slugs = array_unique( $tax_slugs );
106
+
107
+ if( count( $args['wp_query_args']['tax_query'] ) ){
108
+ $args['wp_query_args']['tax_query']['relation'] = 'OR';
109
+ }
110
+
111
+ $args['wp_query_args']['tax_query'][] = array(
112
+ 'taxonomy' => $tax,
113
+ 'field' => 'slug',
114
+ 'terms' => $tax_slugs,
115
+ 'operator' => 'IN'
116
+ );
117
+ }
118
+
119
+ }
120
+
121
+ }
122
+
123
+ // query the related posts base on taxonimy --------------------------------
124
+
125
+ $args = apply_filters( 'auxin_get_the_related_posts_args', $args );
126
+
127
+ return $args['container_start_tag'] . auxin_widget_recent_posts_callback( $args ) . $args['container_end_tag'];
128
+ }
129
+
includes/elements/sample-element.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_sample_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_sample_master_array( $master_array ) {
includes/elements/search.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_search_master_array( $master_array ) {
13
  $master_array['aux_search'] = array(
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
  function auxin_get_search_master_array( $master_array ) {
13
  $master_array['aux_search'] = array(
includes/elements/slider.php ADDED
File without changes
includes/elements/socials-list.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_social_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_social_master_array( $master_array ) {
13
 
includes/elements/tabs.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_tabs_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_tabs_master_array( $master_array ) {
13
 
includes/elements/text.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_text_master_array( $master_array ) {
13
 
@@ -226,7 +226,7 @@ function auxin_get_text_master_array( $master_array ) {
226
  'image' => AUX_URL . 'images/visual-select/icon-style-circle.svg'
227
  ),
228
  'semi-circle' => array(
229
- 'label' => __('Semi-Circle', 'auxin-elements'),
230
  'image' => AUX_URL . 'images/visual-select/icon-style-semi-circle.svg'
231
  ),
232
  'round-rect' => array(
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
  function auxin_get_text_master_array( $master_array ) {
13
 
226
  'image' => AUX_URL . 'images/visual-select/icon-style-circle.svg'
227
  ),
228
  'semi-circle' => array(
229
+ 'label' => __('Semi-circle', 'auxin-elements'),
230
  'image' => AUX_URL . 'images/visual-select/icon-style-semi-circle.svg'
231
  ),
232
  'round-rect' => array(
includes/elements/touch-slider.php ADDED
@@ -0,0 +1,301 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Touch slider element
4
+ * You should have 'Master Slider' plugin installed to use this element
5
+ *
6
+ *
7
+ * @package auxin-elements
8
+ * @license LICENSE.txt
9
+ * @author
10
+ * @link https://bitbucket.org/averta/
11
+ * @copyright (c) 2010-2017
12
+ */
13
+ function auxin_touch_slider_master_array( $master_array ) {
14
+
15
+ $master_array['aux_touch_slider'] = array(
16
+ 'name' => __('[Phlox] Simple Image Slider ', 'auxin-elements' ),
17
+ 'auxin_output_callback' => 'auxin_touch_slider_callback',
18
+ 'base' => 'aux_touch_slider',
19
+ 'description' => __('Responsive image slider with touch swipe feature.', 'auxin-elements' ),
20
+ 'class' => 'aux-widget-touch-slider',
21
+ 'show_settings_on_create' => true,
22
+ 'weight' => 1,
23
+ 'is_widget' => false,
24
+ 'is_shortcode' => true,
25
+ 'is_so' => true,
26
+ 'is_vc' => true,
27
+ 'category' => THEME_NAME,
28
+ 'group' => '',
29
+ 'admin_enqueue_js' => '',
30
+ 'admin_enqueue_css' => '',
31
+ 'front_enqueue_js' => '',
32
+ 'front_enqueue_css' => '',
33
+ 'icon' => 'auxin-element auxin-touch-slider',
34
+ 'custom_markup' => '',
35
+ 'js_view' => '',
36
+ 'html_template' => '',
37
+ 'deprecated' => '',
38
+ 'content_element' => '',
39
+ 'as_parent' => '',
40
+ 'as_child' => '',
41
+ 'params' => array(
42
+ array(
43
+ 'heading' => __('Title','auxin-elements' ),
44
+ 'description' => __('The slider title, leave it empty if you don`t need title.', 'auxin-elements'),
45
+ 'param_name' => 'title',
46
+ 'type' => 'textfield',
47
+ 'value' => '',
48
+ 'holder' => 'textfield',
49
+ 'class' => 'title',
50
+ 'admin_label' => true,
51
+ 'dependency' => '',
52
+ 'weight' => '',
53
+ 'group' => '' ,
54
+ 'edit_field_class' => ''
55
+ ),
56
+ array(
57
+ 'heading' => __('Images','auxin-elements'),
58
+ 'description' => '',
59
+ 'param_name' => 'images',
60
+ 'type' => 'attach_images',
61
+ 'value' => '',
62
+ 'def_value' => '',
63
+ 'holder' => 'attach_images',
64
+ 'class' => 'images',
65
+ 'admin_label' => true,
66
+ 'dependency' => '',
67
+ 'weight' => '',
68
+ 'group' => '' ,
69
+ 'edit_field_class' => ''
70
+ ),
71
+ array(
72
+ 'heading' => __('Slider image width','auxin-elements' ),
73
+ 'param_name' => 'width',
74
+ 'type' => 'textfield',
75
+ 'value' => '960',
76
+ 'holder' => 'textfield',
77
+ 'class' => '',
78
+ 'admin_label' => true,
79
+ 'dependency' => '',
80
+ 'weight' => '',
81
+ 'group' => '' ,
82
+ 'edit_field_class' => ''
83
+ ),
84
+ array(
85
+ 'heading' => __('Slider image height','auxin-elements' ),
86
+ 'param_name' => 'height',
87
+ 'type' => 'textfield',
88
+ 'value' => '560',
89
+ 'holder' => 'textfield',
90
+ 'class' => '',
91
+ 'admin_label' => true,
92
+ 'dependency' => '',
93
+ 'weight' => '',
94
+ 'group' => '' ,
95
+ 'edit_field_class' => ''
96
+ ),
97
+ array(
98
+ 'heading' => __('Arrow navigation','auxin-elements' ),
99
+ 'description' => '',
100
+ 'param_name' => 'arrows',
101
+ 'type' => 'aux_switch',
102
+ 'value' => '1',
103
+ 'class' => '',
104
+ 'admin_label' => true,
105
+ 'dependency' => '',
106
+ 'weight' => '',
107
+ 'group' => 'Extras' ,
108
+ 'edit_field_class' => ''
109
+ ),
110
+ array(
111
+ 'heading' => __('Space between slides','auxin-elements' ),
112
+ 'param_name' => 'space',
113
+ 'type' => 'textfield',
114
+ 'value' => '5',
115
+ 'holder' => 'textfield',
116
+ 'class' => '',
117
+ 'admin_label' => true,
118
+ 'dependency' => '',
119
+ 'weight' => '',
120
+ 'group' => 'Extras' ,
121
+ 'edit_field_class' => ''
122
+ ),
123
+ array(
124
+ 'heading' => __('Looped navigation','auxin-elements' ),
125
+ 'description' => '',
126
+ 'param_name' => 'loop',
127
+ 'type' => 'aux_switch',
128
+ 'value' => '0',
129
+ 'class' => '',
130
+ 'admin_label' => true,
131
+ 'dependency' => '',
132
+ 'weight' => '',
133
+ 'group' => 'Extras' ,
134
+ 'edit_field_class' => ''
135
+ ),
136
+ array(
137
+ 'heading' => __('Slideshow','auxin-elements' ),
138
+ 'description' => '',
139
+ 'param_name' => 'slideshow',
140
+ 'type' => 'aux_switch',
141
+ 'value' => '0',
142
+ 'class' => '',
143
+ 'admin_label' => true,
144
+ 'dependency' => '',
145
+ 'weight' => '',
146
+ 'group' => 'Extras' ,
147
+ 'edit_field_class' => ''
148
+ ),
149
+ array(
150
+ 'heading' => __('Slideshow delay in seconds','auxin-elements' ),
151
+ 'param_name' => 'slideshow_delay',
152
+ 'type' => 'textfield',
153
+ 'value' => '2',
154
+ 'holder' => 'textfield',
155
+ 'class' => '',
156
+ 'admin_label' => true,
157
+ 'dependency' => array(
158
+ 'element' => 'slideshow',
159
+ 'value' => '1'
160
+ ),
161
+ 'weight' => '',
162
+ 'group' => 'Extras' ,
163
+ 'edit_field_class' => ''
164
+ ),
165
+
166
+ array(
167
+ 'heading' => __('Display image title','auxin-elements' ),
168
+ 'description' => '',
169
+ 'param_name' => 'add_title',
170
+ 'type' => 'aux_switch',
171
+ 'value' => '0',
172
+ 'class' => '',
173
+ 'admin_label' => true,
174
+ 'dependency' => '',
175
+ 'weight' => '',
176
+ 'group' => '' ,
177
+ 'edit_field_class' => ''
178
+ ),
179
+ array(
180
+ 'heading' => __('Display image caption','auxin-elements' ),
181
+ 'description' => '',
182
+ 'param_name' => 'add_caption',
183
+ 'type' => 'aux_switch',
184
+ 'value' => '0',
185
+ 'class' => '',
186
+ 'dependency' => array(),
187
+ 'admin_label' => true,
188
+ 'weight' => '',
189
+ 'group' => '' ,
190
+ 'edit_field_class' => ''
191
+ )
192
+ )
193
+ );
194
+
195
+ return $master_array;
196
+ }
197
+
198
+ add_filter( 'auxin_master_array_shortcodes', 'auxin_touch_slider_master_array', 10, 1 );
199
+
200
+ /**
201
+ * Dynamic element with result in columns
202
+ * The front-end output of this element is returned by the following function
203
+ *
204
+ * @param array $atts The array containing the parsed values from shortcode
205
+ * containing widget info too
206
+ * @param string $shortcode_content The shorcode content
207
+ * @return string The output of element markup
208
+ */
209
+ function auxin_touch_slider_callback( $atts, $shortcode_content = null ){
210
+
211
+ // Defining default attributes
212
+ $default_atts = array(
213
+ 'title' => '',
214
+ 'images' => '',
215
+ 'width' => '960',
216
+ 'height' => '560',
217
+ 'loop' => '1',
218
+ 'space' => '5',
219
+ 'slideshow' => '0',
220
+ 'slideshow_delay' => '2',
221
+ 'arrows' => '1',
222
+ 'skin' => 'default',
223
+ 'add_title' => false,
224
+ 'add_caption' => false,
225
+
226
+ 'skin' => 'aux-light-skin',
227
+ 'width' => '960',
228
+ 'height' => '560',
229
+ 'loop' => '1',
230
+ 'space' => '5',
231
+ 'slideshow' => '0',
232
+ 'slideshow_delay' => '2',
233
+ 'arrows' => '0',
234
+
235
+ 'extra_classes' => '', // custom css class names for this element
236
+ 'custom_el_id' => '', // custom id attribute for this element
237
+ 'base_class' => 'aux-widget-touch-slider aux-widget-post-slider' // base class name for container
238
+ );
239
+
240
+ $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
241
+ extract( $result['parsed_atts'] );
242
+
243
+ $attachments = auxin_get_the_resized_images_by_attach_ids( $images, $width , $height, true );
244
+
245
+ ob_start();
246
+
247
+ // widget header ------------------------------
248
+ echo $result['widget_header'];
249
+ echo $result['widget_title'];
250
+
251
+ echo '<div class="master-carousel-slider aux-latest-posts-slider aux-no-js '.$skin.'" data-empty-height="'.$height.'" data-navigation="peritem" data-space="'.$space.'" data-auto-height="true" data-delay="'.$slideshow_delay.'" data-loop="'.$loop.'" data-autoplay="'.$slideshow.'">';
252
+
253
+ // widget custom output -----------------------
254
+
255
+ foreach ( $attachments as $attachment_id => $attachment ) {
256
+
257
+ $slide_image = '';
258
+ ?>
259
+ <div class="aux-mc-item" >
260
+ <div class="aux-slide-media">
261
+ <div class="aux-media-frame aux-media-image"><?php echo $attachment; ?></div>
262
+ </div>
263
+ <?php if( $add_title || $add_caption ) { ?>
264
+ <section class="aux-info-container">
265
+ <?php if( $add_title ) { ?>
266
+ <div class="aux-slide-title">
267
+ <h3><?php echo auxin_get_trimmed_string( get_the_title( $attachment_id ), 70, '...'); ?></h3>
268
+ </div>
269
+ <?php } if ( $add_caption ) { ?>
270
+ <div class="aux-slide-info">
271
+ <?php auxin_the_attachment_caption( $attachment_id ); ?>
272
+ </div>
273
+ <?php } ?>
274
+ </section>
275
+ <?php } ?>
276
+ </div>
277
+
278
+ <?php
279
+ }
280
+ if ( $arrows ) {
281
+ ?>
282
+ <div class="aux-next-arrow aux-arrow-nav aux-white aux-round aux-hover-slide">
283
+ <span class="aux-overlay"></span>
284
+ <span class="aux-svg-arrow aux-medium-right"></span>
285
+ <span class="aux-hover-arrow aux-svg-arrow aux-medium-right"></span>
286
+ </div>
287
+ <div class="aux-prev-arrow aux-arrow-nav aux-white aux-round aux-hover-slide">
288
+ <span class="aux-overlay"></span>
289
+ <span class="aux-svg-arrow aux-medium-left"></span>
290
+ <span class="aux-hover-arrow aux-svg-arrow aux-medium-left"></span>
291
+ </div>
292
+ <?php
293
+ }
294
+
295
+ // widget footer ------------------------------
296
+ echo '</div><!-- aux-col-wrapper -->';
297
+
298
+ echo $result['widget_footer'];
299
+
300
+ return ob_get_clean();
301
+ }
includes/elements/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
  function auxin_get_video_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_video_master_array( $master_array ) {
13
 
includes/general-functions.php CHANGED
@@ -6,7 +6,7 @@
6
  * @license LICENSE.txt
7
  * @author
8
  * @link https://bitbucket.org/averta/
9
- * @copyright (c) 2010-2016
10
  */
11
 
12
  /**
6
  * @license LICENSE.txt
7
  * @author
8
  * @link https://bitbucket.org/averta/
9
+ * @copyright (c) 2010-2017
10
  */
11
 
12
  /**
includes/general-hooks.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
 
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
 
includes/index.php CHANGED
@@ -24,7 +24,7 @@ if( auxin_is_plugin_active( 'so-widgets-bundle/so-widgets-bundle.php' ) ) {
24
  include_once( 'elements/accordion.php' );
25
  include_once( 'elements/tabs.php' );
26
  include_once( 'elements/text.php' );
27
- }
28
 
29
  include_once( 'elements/recent-posts-tiles.php' );
30
  include_once( 'elements/attachment-url.php' );
@@ -38,6 +38,10 @@ include_once( 'elements/gallery.php' );
38
  include_once( 'elements/gmap.php' ); // check
39
  include_once( 'elements/highlight.php' );
40
  include_once( 'elements/image.php' );
 
 
 
 
41
  // check if instagram-feed is activated then it adds its element to page builder and widget
42
  if( auxin_is_plugin_active( 'instagram-feed/instagram-feed.php' ) ) {
43
  include_once( 'elements/instagram-feed.php' );
24
  include_once( 'elements/accordion.php' );
25
  include_once( 'elements/tabs.php' );
26
  include_once( 'elements/text.php' );
27
+ }
28
 
29
  include_once( 'elements/recent-posts-tiles.php' );
30
  include_once( 'elements/attachment-url.php' );
38
  include_once( 'elements/gmap.php' ); // check
39
  include_once( 'elements/highlight.php' );
40
  include_once( 'elements/image.php' );
41
+ include_once( 'elements/touch-slider.php' );
42
+ include_once( 'elements/related-posts.php' );
43
+ include_once( 'elements/before-after.php' );
44
+
45
  // check if instagram-feed is activated then it adds its element to page builder and widget
46
  if( auxin_is_plugin_active( 'instagram-feed/instagram-feed.php' ) ) {
47
  include_once( 'elements/instagram-feed.php' );
languages/fa_IR.po CHANGED
@@ -4418,7 +4418,7 @@ msgid "Icon background shape"
4418
  msgstr "شکل پس زمینه شکلک"
4419
 
4420
  #: includes/elements/text.php:211
4421
- msgid "Semi-Circle"
4422
  msgstr "نیم دایره"
4423
 
4424
  #: includes/elements/text.php:212
4418
  msgstr "شکل پس زمینه شکلک"
4419
 
4420
  #: includes/elements/text.php:211
4421
+ msgid "Semi-circle"
4422
  msgstr "نیم دایره"
4423
 
4424
  #: includes/elements/text.php:212
public/class-auxels.php CHANGED
@@ -276,9 +276,9 @@ class AUXELS {
276
  */
277
  public function load_plugin_textdomain() {
278
 
279
- $locale = apply_filters( 'plugin_locale', get_locale(), AUXELS_TEXT_DOMAIN );
280
- load_textdomain( AUXELS_TEXT_DOMAIN, trailingslashit( WP_LANG_DIR ) . AUXELS_TEXT_DOMAIN . '/' . AUXELS_TEXT_DOMAIN . '-' . $locale . '.mo' );
281
- load_plugin_textdomain( AUXELS_TEXT_DOMAIN, FALSE, basename( AUXELS_DIR ) . '/languages/' );
282
  }
283
 
284
  }
276
  */
277
  public function load_plugin_textdomain() {
278
 
279
+ $locale = apply_filters( 'plugin_locale', get_locale(), 'auxin-elements' );
280
+ load_textdomain( 'auxin-elements', trailingslashit( WP_LANG_DIR ) . 'auxin-elements' . '/' . 'auxin-elements' . '-' . $locale . '.mo' );
281
+ load_plugin_textdomain( 'auxin-elements', FALSE, basename( AUXELS_DIR ) . '/languages/' );
282
  }
283
 
284
  }
public/includes/class-auxels-frontend-assets.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
  /**
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  /**
public/templates/vcomposer/auxin_shortcode_mapper.php CHANGED
@@ -7,6 +7,6 @@
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
- * @copyright (c) 2010-2016
11
  */
12
 
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
uninstall.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
  // If uninstall not called from WordPress, then exit
7
  * @license LICENSE.txt
8
  * @author
9
  * @link https://bitbucket.org/averta/
10
+ * @copyright (c) 2010-2017
11
  */
12
 
13
  // If uninstall not called from WordPress, then exit