Shortcodes and extra features for Phlox theme - Version 1.1.0

Version Description

Download this release

Release Info

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

Code changes from version 1.0.9 to 1.1.0

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.3
8
  Tested up to: 4.6.1
9
- Stable tag: 1.0.9
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl.html
12
 
@@ -140,6 +140,9 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
140
 
141
  == Changelog ==
142
 
 
 
 
143
  = Version 1.0.9 / (6.10.2016) =
144
  - [New]: New shortcodes and widgets added
145
 
@@ -156,5 +159,5 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
156
 
157
  == Upgrade Notice ==
158
 
159
- = 1.0.9 =
160
- - [New]: New shortcodes and widgets added
6
  Tags: banner SEO, shortcode, page-builder, siteorigin, auxin, framework, widget, element, phlox, averta, fullwidth, masonry, timeline
7
  Requires at least: 4.3
8
  Tested up to: 4.6.1
9
+ Stable tag: 1.1.0
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl.html
12
 
140
 
141
  == Changelog ==
142
 
143
+ = Version 1.1.0 / (22.10.2016) =
144
+ - [New]: Introducing blog timeline view
145
+
146
  = Version 1.0.9 / (6.10.2016) =
147
  - [New]: New shortcodes and widgets added
148
 
159
 
160
  == Upgrade Notice ==
161
 
162
+ = 1.1.0 =
163
+ - [New]: Introducing blog timeline view
auxin-elements.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Auxin 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.0.9
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
12
  * Plugin Name: Auxin 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.1.0
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
includes/classes/class-auxin-siteorigin-widget.php CHANGED
@@ -176,7 +176,8 @@ class Auxin_SiteOrigin_Widget extends SiteOrigin_Widget {
176
  if ( ! isset( $so_fields[ $repeater_name ] ) ) {
177
  $so_fields[ $repeater_name ] = array(
178
  'type' => 'repeater',
179
- 'label' => $field['repeater'],
 
180
  'hide' => true,
181
  'fields' => array()
182
  );
176
  if ( ! isset( $so_fields[ $repeater_name ] ) ) {
177
  $so_fields[ $repeater_name ] = array(
178
  'type' => 'repeater',
179
+ 'label' => (isset($field['repeater-label']))? $field['repeater-label'] : $field['repeater'],
180
+ 'item_name' => (isset($field['section-name']))? $field['section-name'] : "Item",
181
  'hide' => true,
182
  'fields' => array()
183
  );
includes/define.php CHANGED
@@ -12,7 +12,7 @@ if( ! defined( 'THEME_NAME' ) ){
12
  }
13
 
14
 
15
- define( 'AUXELS_VERSION' , '1.0.9' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
  define( 'AUXELS_TEXT_DOMAIN' , 'auxin-elements' );
12
  }
13
 
14
 
15
+ define( 'AUXELS_VERSION' , '1.1.0' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
  define( 'AUXELS_TEXT_DOMAIN' , 'auxin-elements' );
includes/elements/about-widget.php CHANGED
@@ -40,14 +40,14 @@ function get_auxin_about_widget( $master_array ) {
40
  'as_child' => '',
41
  'params' => array(
42
  array(
 
 
43
  'param_name' => 'title',
44
  'type' => 'textfield',
45
  'value' => '',
46
  'def_value' => '',
47
  'holder' => 'textfield',
48
  'class' => 'id',
49
- 'heading' => __('Title','auxin-elements' ),
50
- 'description' => '',
51
  'admin_label' => true,
52
  'dependency' => '',
53
  'weight' => '',
@@ -55,13 +55,13 @@ function get_auxin_about_widget( $master_array ) {
55
  'edit_field_class' => ''
56
  ),
57
  array(
 
 
58
  'param_name' => 'name',
59
  'type' => 'textfield',
60
  'value' => '',
61
  'holder' => 'textfield',
62
  'class' => 'title',
63
- 'heading' => __('Name','auxin-elements' ),
64
- 'description' => __('The name which appears in about widget.', 'auxin-elements' ),
65
  'admin_label' => true,
66
  'dependency' => '',
67
  'weight' => '',
@@ -69,27 +69,27 @@ function get_auxin_about_widget( $master_array ) {
69
  'edit_field_class' => ''
70
  ),
71
  array(
 
 
72
  'param_name' => 'skills',
73
  'type' => 'textfield',
74
  'value' => '',
75
  'holder' => 'textfield',
76
  'class' => 'skills',
77
- 'heading' => __('Skills','auxin-elements' ),
78
- 'description' => __('It appears below the name.', 'auxin-elements' ),
79
  'admin_label' => true,
80
  'weight' => '',
81
  'group' => '',
82
  'edit_field_class' => ''
83
  ),
84
  array(
 
 
85
  'param_name' => 'info',
86
  'type' => 'textarea_html',
87
  'def_value' => '',
88
  'value' => '',
89
  'holder' => 'div',
90
  'class' => 'info',
91
- 'heading' => __('Info','auxin-elements' ),
92
- 'description' => __('Biographical info or any other content.', 'auxin-elements' ),
93
  'admin_label' => false,
94
  'dependency' => '',
95
  'weight' => '',
@@ -97,14 +97,14 @@ function get_auxin_about_widget( $master_array ) {
97
  'edit_field_class' => ''
98
  ),
99
  array(
 
 
100
  'param_name' => 'about_image',
101
  'type' => 'attach_image',
102
  'value' => '',
103
  'def_value' => '',
104
  'holder' => 'textfield',
105
  'class' => 'about_image',
106
- 'heading' => __('Image','auxin-elements' ),
107
- 'description' => __('It appears above the name.', 'auxin-elements' ),
108
  'admin_label' => true,
109
  'dependency' => '',
110
  'weight' => '',
@@ -112,6 +112,8 @@ function get_auxin_about_widget( $master_array ) {
112
  'edit_field_class' => ''
113
  ),
114
  array(
 
 
115
  'param_name' => 'image_style',
116
  'type' => 'dropdown',
117
  'def_value' => 'circle',
@@ -121,8 +123,6 @@ function get_auxin_about_widget( $master_array ) {
121
  ),
122
  'holder' => 'dropdown',
123
  'class' => 'image_style',
124
- 'heading' => __('Image style','auxin-elements' ),
125
- 'description' => '',
126
  'admin_label' => true,
127
  'dependency' => '',
128
  'weight' => '',
@@ -130,14 +130,14 @@ function get_auxin_about_widget( $master_array ) {
130
  'edit_field_class' => ''
131
  ),
132
  array(
 
 
133
  'param_name' => 'align_center',
134
  'type' => 'aux_switch',
135
  'def_value' => '',
136
  'value' => '1',
137
  'holder' => 'dropdown',
138
  'class' => 'align_center',
139
- 'heading' => __('Align center texts', 'auxin-elements' ),
140
- 'description' => '',
141
  'admin_label' => true,
142
  'dependency' => '',
143
  'weight' => '',
@@ -145,14 +145,14 @@ function get_auxin_about_widget( $master_array ) {
145
  'edit_field_class' => ''
146
  ),
147
  array(
 
 
148
  'param_name' => 'show_socials',
149
  'type' => 'aux_switch',
150
  'def_value' => '',
151
  'value' => '0',
152
  'holder' => 'dropdown',
153
  'class' => 'show_socials',
154
- 'heading' => __('Show socials below the info','auxin-elements' ),
155
- 'description' => '',
156
  'admin_label' => true,
157
  'dependency' => '',
158
  'weight' => '',
@@ -160,14 +160,14 @@ function get_auxin_about_widget( $master_array ) {
160
  'edit_field_class' => ''
161
  ),
162
  array(
 
 
163
  'param_name' => 'extra_classes',
164
  'type' => 'textfield',
165
  'value' => '',
166
  'def_value' => '',
167
  'holder' => 'textfield',
168
  'class' => 'extra_classes',
169
- 'heading' => __('Extra class name','auxin-elements' ),
170
- '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' ),
171
  'admin_label' => true,
172
  'dependency' => '',
173
  'weight' => '',
40
  'as_child' => '',
41
  'params' => array(
42
  array(
43
+ 'heading' => __('Title','auxin-elements' ),
44
+ 'description' => '',
45
  'param_name' => 'title',
46
  'type' => 'textfield',
47
  'value' => '',
48
  'def_value' => '',
49
  'holder' => 'textfield',
50
  'class' => 'id',
 
 
51
  'admin_label' => true,
52
  'dependency' => '',
53
  'weight' => '',
55
  'edit_field_class' => ''
56
  ),
57
  array(
58
+ 'heading' => __('Name','auxin-elements' ),
59
+ 'description' => __('The name which appears in about widget.', 'auxin-elements' ),
60
  'param_name' => 'name',
61
  'type' => 'textfield',
62
  'value' => '',
63
  'holder' => 'textfield',
64
  'class' => 'title',
 
 
65
  'admin_label' => true,
66
  'dependency' => '',
67
  'weight' => '',
69
  'edit_field_class' => ''
70
  ),
71
  array(
72
+ 'heading' => __('Skills','auxin-elements' ),
73
+ 'description' => __('It appears below the name.', 'auxin-elements' ),
74
  'param_name' => 'skills',
75
  'type' => 'textfield',
76
  'value' => '',
77
  'holder' => 'textfield',
78
  'class' => 'skills',
 
 
79
  'admin_label' => true,
80
  'weight' => '',
81
  'group' => '',
82
  'edit_field_class' => ''
83
  ),
84
  array(
85
+ 'heading' => __('Info','auxin-elements' ),
86
+ 'description' => __('Biographical info or any other content.', 'auxin-elements' ),
87
  'param_name' => 'info',
88
  'type' => 'textarea_html',
89
  'def_value' => '',
90
  'value' => '',
91
  'holder' => 'div',
92
  'class' => 'info',
 
 
93
  'admin_label' => false,
94
  'dependency' => '',
95
  'weight' => '',
97
  'edit_field_class' => ''
98
  ),
99
  array(
100
+ 'heading' => __('Image','auxin-elements' ),
101
+ 'description' => __('It appears above the name.', 'auxin-elements' ),
102
  'param_name' => 'about_image',
103
  'type' => 'attach_image',
104
  'value' => '',
105
  'def_value' => '',
106
  'holder' => 'textfield',
107
  'class' => 'about_image',
 
 
108
  'admin_label' => true,
109
  'dependency' => '',
110
  'weight' => '',
112
  'edit_field_class' => ''
113
  ),
114
  array(
115
+ 'heading' => __('Image style','auxin-elements' ),
116
+ 'description' => '',
117
  'param_name' => 'image_style',
118
  'type' => 'dropdown',
119
  'def_value' => 'circle',
123
  ),
124
  'holder' => 'dropdown',
125
  'class' => 'image_style',
 
 
126
  'admin_label' => true,
127
  'dependency' => '',
128
  'weight' => '',
130
  'edit_field_class' => ''
131
  ),
132
  array(
133
+ 'heading' => __('Align center texts', 'auxin-elements' ),
134
+ 'description' => '',
135
  'param_name' => 'align_center',
136
  'type' => 'aux_switch',
137
  'def_value' => '',
138
  'value' => '1',
139
  'holder' => 'dropdown',
140
  'class' => 'align_center',
 
 
141
  'admin_label' => true,
142
  'dependency' => '',
143
  'weight' => '',
145
  'edit_field_class' => ''
146
  ),
147
  array(
148
+ 'heading' => __('Show socials below the info','auxin-elements' ),
149
+ 'description' => '',
150
  'param_name' => 'show_socials',
151
  'type' => 'aux_switch',
152
  'def_value' => '',
153
  'value' => '0',
154
  'holder' => 'dropdown',
155
  'class' => 'show_socials',
 
 
156
  'admin_label' => true,
157
  'dependency' => '',
158
  'weight' => '',
160
  'edit_field_class' => ''
161
  ),
162
  array(
163
+ 'heading' => __('Extra class name','auxin-elements' ),
164
+ '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' ),
165
  'param_name' => 'extra_classes',
166
  'type' => 'textfield',
167
  'value' => '',
168
  'def_value' => '',
169
  'holder' => 'textfield',
170
  'class' => 'extra_classes',
 
 
171
  'admin_label' => true,
172
  'dependency' => '',
173
  'weight' => '',
includes/elements/accordion-api.php ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Accordion element if site origin bundle plugin is activaited
4
+ *
5
+ *
6
+ * @package auxin-elements
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 ) {
14
+
15
+ $master_array['aux_accordion'] = array(
16
+ 'name' => __('[Phlox] Accordion ', 'auxin-elements'),
17
+ 'auxin_output_callback' => 'auxin_widget_accordion_callback',
18
+ 'base' => 'aux_accordion',
19
+ 'description' => __('Collapsible content', 'auxin-elements'),
20
+ 'class' => 'aux-widget-accordion widget-toggle',
21
+ 'show_settings_on_create' => true,
22
+ 'weight' => 1,
23
+ 'category' => THEME_NAME,
24
+ 'group' => '',
25
+ 'so_api' => true,
26
+ 'admin_enqueue_js' => '',
27
+ 'admin_enqueue_css' => '',
28
+ 'front_enqueue_js' => '',
29
+ 'front_enqueue_css' => '',
30
+ 'icon' => 'auxin-element auxin-accordion',
31
+ 'custom_markup' => '',
32
+ 'js_view' => '',
33
+ 'html_template' => '',
34
+ 'deprecated' => '',
35
+ 'content_element' => '',
36
+ 'as_parent' => '',
37
+ 'as_child' => '',
38
+ 'params' => array(
39
+ array(
40
+ 'heading' => __('Title','auxin-elements'),
41
+ 'description' => __('Accordion title, leave it empty if you don`t need title.', 'auxin-elements'),
42
+ 'param_name' => 'title',
43
+ 'type' => 'textfield',
44
+ 'value' => '',
45
+ 'holder' => 'textfield',
46
+ 'class' => 'title',
47
+ 'admin_label' => true,
48
+ 'dependency' => '',
49
+ 'weight' => '',
50
+ 'group' => '' ,
51
+ 'edit_field_class' => ''
52
+ ),
53
+ array(
54
+ 'heading' => __('Type','auxin-elements'),
55
+ 'description' => __('Whether to show only 1 element opens at a time or multiple.','auxin-elements'),
56
+ 'param_name' => 'type',
57
+ 'type' => 'dropdown',
58
+ 'def_value' => 'true',
59
+ 'value' => array(
60
+ 'false' => __('Toggle', 'auxin-elements'),
61
+ 'true' => __('Accordion', 'auxin-elements'),
62
+ ),
63
+ 'holder' => 'dropdown',
64
+ 'class' => 'type',
65
+ 'admin_label' => true,
66
+ 'dependency' => '',
67
+ 'weight' => '',
68
+ 'group' => '' ,
69
+ 'edit_field_class' => ''
70
+ ),
71
+ array(
72
+ 'heading' => __('Accordion label','auxin-elements'),
73
+ 'description' => __('Enter your accordion item label.', 'auxin-elements'),
74
+ 'repeater' => 'accordion',
75
+ 'repeater-label' => __('Accordion', 'auxin-elements'),
76
+ 'section-name' => __('Accordion Section', 'auxin-elements'),
77
+ 'param_name' => 'accordion_label',
78
+ 'type' => 'textfield',
79
+ 'value' => '',
80
+ 'holder' => 'textfield',
81
+ 'class' => 'accordion_label',
82
+ 'admin_label' => true,
83
+ 'dependency' => '',
84
+ 'weight' => '',
85
+ 'group' => '' ,
86
+ 'edit_field_class' => ''
87
+ ),
88
+ array(
89
+ 'heading' => __('Content', 'auxin-elements'),
90
+ 'description' => __('Enter your accordion item content.', 'auxin-elements'),
91
+ 'repeater' => 'accordion',
92
+ 'repeater-label' => __('Accordion', 'auxin-elements'),
93
+ 'section-name' => __('Accordion Section', 'auxin-elements'),
94
+ 'param_name' => 'content',
95
+ 'type' => 'textarea_html',
96
+ 'value' => '',
97
+ 'def_value' => '',
98
+ 'holder' => 'div',
99
+ 'class' => 'content',
100
+ 'admin_label' => true,
101
+ 'dependency' => '',
102
+ 'weight' => '',
103
+ 'group' => '',
104
+ 'edit_field_class' => ''
105
+ ),
106
+ array(
107
+ 'heading' => __('Extra class name','auxin-elements'),
108
+ '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'),
109
+ 'param_name' => 'extra_classes',
110
+ 'type' => 'textfield',
111
+ 'value' => '',
112
+ 'def_value' => '',
113
+ 'holder' => 'textfield',
114
+ 'class' => 'extra_classes',
115
+ 'admin_label' => true,
116
+ 'dependency' => '',
117
+ 'weight' => '',
118
+ 'group' => '' ,
119
+ 'edit_field_class' => ''
120
+ )
121
+ )
122
+ );
123
+
124
+ return $master_array;
125
+ }
126
+
127
+ add_filter( 'auxin_master_array_shortcodes', 'auxin_get_new_accordion_master_array', 10, 1 );
128
+
129
+
130
+ /**
131
+ * Element without loop and column
132
+ * The front-end output of this element is returned by the following function
133
+ *
134
+ * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above.
135
+ * @param string $shortcode_content The shorcode content
136
+ * @return string The output of element markup
137
+ */
138
+ function auxin_widget_accordion_callback( $atts, $shortcode_content = null ){
139
+
140
+ // Defining default attributes
141
+ $default_atts = array(
142
+ 'title' => '', // header title
143
+ 'type' => 'true', // accordion/toggle
144
+ 'accordion' => '', // accordion/toggle
145
+ 'extra_classes' => '', // custom css class names for this element
146
+ 'custom_el_id' => '', // custom id attribute for this element
147
+ 'base_class' => 'aux-widget-accordion widget-toggle' // base class name for container
148
+ );
149
+
150
+ $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
151
+ extract( $result['parsed_atts'] );
152
+
153
+ // widget header ------------------------------
154
+ $output = $result['widget_header'];
155
+ $output .= $result['widget_title'];
156
+ $output .= '<div class="widget-inner ' .$extra_classes . '" data-toggle="' . $type . '">';
157
+
158
+ // widget custom output -----------------------
159
+ foreach ( $accordion as $key => $value ) {
160
+
161
+
162
+ $output .= '<section>';
163
+ $section_title = $value['accordion_label'];
164
+ $section_content = $value['content'];
165
+ $output .= '<h6 class="toggle-header">' . $section_title . '</h6>';
166
+ $output .= '<div class="toggle-content"><p>' . $section_content . '</p></div>';
167
+ $output .= '</section>';
168
+ }
169
+
170
+ $output .= '</div>'; // End od widget-toggle
171
+ $output .= $result['widget_footer'];
172
+
173
+ // widget footer ------------------------------
174
+
175
+ return $output;
176
+ }
includes/elements/accordion.php CHANGED
@@ -53,17 +53,11 @@ function auxin_get_new_accordion_master_array( $master_array ) {
53
  'heading' => __('Type','auxin-elements'),
54
  'description' => __('Whether to show only 1 element opens at a time or multiple.','auxin-elements'),
55
  'param_name' => 'type',
56
- 'type' => 'aux_visual_select',
57
- 'def_value' => 'accordion',
58
- 'choices' => array(
59
- 'false' => array(
60
- 'label' => __('Toggle', 'auxin-elements'),
61
- 'image' => AUX_URL . 'images/visual-select/toggle.svg'
62
- ),
63
- 'true' => array(
64
- 'label' => __('Accordion', 'auxin-elements'),
65
- 'image' => AUX_URL . 'images/visual-select/accordion.svg'
66
- )
67
  ),
68
  'holder' => 'dropdown',
69
  'class' => 'type',
53
  'heading' => __('Type','auxin-elements'),
54
  'description' => __('Whether to show only 1 element opens at a time or multiple.','auxin-elements'),
55
  'param_name' => 'type',
56
+ 'type' => 'dropdown',
57
+ 'def_value' => 'true',
58
+ 'value' => array(
59
+ 'false' => __('Toggle', 'auxin-elements'),
60
+ 'true' => __('Accordion', 'auxin-elements'),
 
 
 
 
 
 
61
  ),
62
  'holder' => 'dropdown',
63
  'class' => 'type',
includes/elements/button.php CHANGED
@@ -30,7 +30,7 @@ function auxin_get_button_master_array( $master_array ) {
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
- 'icon' => 'auxin-element auxin-image',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
@@ -40,7 +40,7 @@ function auxin_get_button_master_array( $master_array ) {
40
  'as_child' => '',
41
  'params' => array(
42
  array(
43
- 'heading' => __('Button Label','auxin-elements' ),
44
  'description' => __('The label of button.','auxin-elements' ),
45
  'param_name' => 'label',
46
  'type' => 'textfield',
@@ -54,7 +54,7 @@ function auxin_get_button_master_array( $master_array ) {
54
  'edit_field_class' => ''
55
  ),
56
  array(
57
- 'heading' => __('Button Size','auxin-elements' ),
58
  'description' => '',
59
  'param_name' => 'size',
60
  'type' => 'dropdown',
@@ -202,7 +202,7 @@ function auxin_get_button_master_array( $master_array ) {
202
  'edit_field_class' => ''
203
  ),
204
  array(
205
- 'heading' => __('Color of Button','auxin-elements' ),
206
  'description' => '',
207
  'param_name' => 'color_name',
208
  'type' => 'dropdown',
30
  'admin_enqueue_css' => '',
31
  'front_enqueue_js' => '',
32
  'front_enqueue_css' => '',
33
+ 'icon' => 'auxin-element auxin-button',
34
  'custom_markup' => '',
35
  'js_view' => '',
36
  'html_template' => '',
40
  'as_child' => '',
41
  'params' => array(
42
  array(
43
+ 'heading' => __('Button label','auxin-elements' ),
44
  'description' => __('The label of button.','auxin-elements' ),
45
  'param_name' => 'label',
46
  'type' => 'textfield',
54
  'edit_field_class' => ''
55
  ),
56
  array(
57
+ 'heading' => __('Button size','auxin-elements' ),
58
  'description' => '',
59
  'param_name' => 'size',
60
  'type' => 'dropdown',
202
  'edit_field_class' => ''
203
  ),
204
  array(
205
+ 'heading' => __('Color of button','auxin-elements' ),
206
  'description' => '',
207
  'param_name' => 'color_name',
208
  'type' => 'dropdown',
includes/elements/contact-box.php CHANGED
@@ -91,7 +91,7 @@ function get_auxin_contact_box( $master_array ) {
91
  'edit_field_class' => ''
92
  ),
93
  array(
94
- 'heading' => __('Show Socials','auxin-elements'),
95
  'description' => __('Show socials below the info.','auxin-elements'),
96
  'param_name' => 'show_socials',
97
  'type' => 'aux_switch',
@@ -106,7 +106,7 @@ function get_auxin_contact_box( $master_array ) {
106
  'edit_field_class' => ''
107
  ),
108
  array(
109
- 'heading' => __('Show Map','auxin-elements'),
110
  'description' => __('Show map above the info.','auxin-elements'),
111
  'param_name' => 'show_map',
112
  'type' => 'aux_switch',
@@ -173,7 +173,7 @@ function get_auxin_contact_box( $master_array ) {
173
  'edit_field_class' => ''
174
  ),
175
  array(
176
- 'heading' => __('Map Type','auxin-elements'),
177
  'param_name' => 'type',
178
  'type' => 'dropdown',
179
  'def_value' => 'ROADMAP',
91
  'edit_field_class' => ''
92
  ),
93
  array(
94
+ 'heading' => __('Show socials','auxin-elements'),
95
  'description' => __('Show socials below the info.','auxin-elements'),
96
  'param_name' => 'show_socials',
97
  'type' => 'aux_switch',
106
  'edit_field_class' => ''
107
  ),
108
  array(
109
+ 'heading' => __('Show map','auxin-elements'),
110
  'description' => __('Show map above the info.','auxin-elements'),
111
  'param_name' => 'show_map',
112
  'type' => 'aux_switch',
173
  'edit_field_class' => ''
174
  ),
175
  array(
176
+ 'heading' => __('Map type','auxin-elements'),
177
  'param_name' => 'type',
178
  'type' => 'dropdown',
179
  'def_value' => 'ROADMAP',
includes/elements/divider.php CHANGED
@@ -40,7 +40,7 @@ function auxin_get_divider_master_array( $master_array ) {
40
  'as_child' => '',
41
  'params' => array(
42
  array(
43
- 'heading' => __('Divider Style','auxin-elements'),
44
  'description' => '',
45
  'param_name' => 'style',
46
  'type' => 'aux_visual_select',
@@ -76,7 +76,7 @@ function auxin_get_divider_master_array( $master_array ) {
76
  )
77
  ),
78
  array(
79
- 'heading' => __('Divider Width','auxin-elements'),
80
  'description' => __('Specifies the width size of divider.', 'auxin-elements'),
81
  'param_name' => 'width',
82
  'type' => 'dropdown',
40
  'as_child' => '',
41
  'params' => array(
42
  array(
43
+ 'heading' => __('Divider style','auxin-elements'),
44
  'description' => '',
45
  'param_name' => 'style',
46
  'type' => 'aux_visual_select',
76
  )
77
  ),
78
  array(
79
+ 'heading' => __('Divider width','auxin-elements'),
80
  'description' => __('Specifies the width size of divider.', 'auxin-elements'),
81
  'param_name' => 'width',
82
  'type' => 'dropdown',
includes/elements/dropcap.php CHANGED
@@ -39,7 +39,7 @@ function auxin_get_dropcap_master_array( $master_array ) {
39
  'as_child' => '',
40
  'params' => array(
41
  array(
42
- 'heading' => __('Dropcap Style','auxin-elements' ),
43
  'description' => '',
44
  'param_name' => 'style',
45
  'type' => 'aux_visual_select',
39
  'as_child' => '',
40
  'params' => array(
41
  array(
42
+ 'heading' => __('Dropcap style','auxin-elements' ),
43
  'description' => '',
44
  'param_name' => 'style',
45
  'type' => 'aux_visual_select',
includes/elements/facebook.php ADDED
@@ -0,0 +1,250 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Divider element
4
+ *
5
+ *
6
+ * @package auxin-elements
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 ) {
14
+
15
+ $master_array['aux_facebook'] = array(
16
+ 'name' => __('[Phlox] Custom Facebook Feed', 'auxin-elements' ),
17
+ 'auxin_output_callback' => 'auxin_widget_facebook_callback',
18
+ 'base' => 'aux_facebook',
19
+ 'description' => __('It uses Custom Facebook Feed plugin.', 'auxin-elements'),
20
+ 'class' => 'aux-widget-facebook',
21
+ 'show_settings_on_create' => true,
22
+ 'weight' => 1,
23
+ 'is_widget' => true,
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-facebook',
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' => __('Page ID', 'auxin-elements'),
44
+ 'description' => sprintf(__('ID of your Facebook Page or Group. Use %sthis tool%s to help you in finding this.', 'auxin-elements'), '<a target="_blank" href="https://lookup-id.com/">','</a>'),
45
+ 'param_name' => 'id',
46
+ 'type' => 'textfield',
47
+ 'value' => '',
48
+ 'def_value' => '',
49
+ 'holder' => 'textfield',
50
+ 'class' => 'id',
51
+ 'admin_label' => false,
52
+ 'dependency' => '',
53
+ 'weight' => '',
54
+ 'group' => '' ,
55
+ 'edit_field_class' => ''
56
+ ),
57
+ array(
58
+ 'heading' => __('Page type', 'auxin-elements'),
59
+ 'description' => __('Specifies whether to display posts from a page or group.','auxin-elements'),
60
+ 'param_name' => 'pagetype',
61
+ 'type' => 'dropdown',
62
+ 'value' => array(
63
+ 'page' => __('Page' , 'auxin-elements'),
64
+ 'group' => __('Group', 'auxin-elements')
65
+ ),
66
+ 'def_value' => 'page',
67
+ 'holder' => 'dropdown',
68
+ 'class' => 'pagetype',
69
+ 'admin_label' => true,
70
+ 'dependency' => '',
71
+ 'weight' => '',
72
+ 'group' => '' ,
73
+ 'edit_field_class' => ''
74
+ ),
75
+ array(
76
+ 'heading' => __('Number of posts', 'auxin-elements'),
77
+ 'description' => __('The number of posts you wish to display.', 'auxin-elements'),
78
+ 'param_name' => 'num',
79
+ 'type' => 'textfield',
80
+ 'value' => '',
81
+ 'def_value' => '',
82
+ 'holder' => 'textfield',
83
+ 'class' => 'num',
84
+ 'admin_label' => false,
85
+ 'dependency' => '',
86
+ 'weight' => '',
87
+ 'group' => '' ,
88
+ 'edit_field_class' => ''
89
+ ),
90
+ array(
91
+ 'heading' => __('Display posts by others', 'auxin-elements'),
92
+ 'description' => __('Specifies to display posts by only the page owner, anyone who posts on your page, or only others who post on your page.', 'auxin-elements'),
93
+ 'param_name' => 'showpostsby',
94
+ 'type' => 'dropdown',
95
+ 'value' => array(
96
+ 'me' => __('Only the page owner' , 'auxin-elements'),
97
+ 'others' => __('Page owner and other people', 'auxin-elements'),
98
+ 'onlyothers' => __('Only other people', 'auxin-elements')
99
+ ),
100
+ 'def_value' => 'me',
101
+ 'holder' => 'dropdown',
102
+ 'class' => 'showpostsby',
103
+ 'admin_label' => true,
104
+ 'dependency' => '',
105
+ 'weight' => '',
106
+ 'group' => '' ,
107
+ 'edit_field_class' => ''
108
+ ),
109
+ array(
110
+ 'heading' => __('Post text length', 'auxin-elements'),
111
+ 'description' => __('The maximum character length of the post text.', 'auxin-elements'),
112
+ 'param_name' => 'textlength',
113
+ 'type' => 'textfield',
114
+ 'value' => '',
115
+ 'class' => 'textlength',
116
+ 'admin_label' => false,
117
+ 'dependency' => '',
118
+ 'weight' => '',
119
+ 'group' => '' ,
120
+ 'edit_field_class' => ''
121
+ ),
122
+ array(
123
+ 'heading' => __('Display post author', 'auxin-elements'),
124
+ 'description' => __('Enable it to display name and avatar of the post author.', 'auxin-elements'),
125
+ 'param_name' => 'showauthor',
126
+ 'type' => 'aux_switch',
127
+ 'value' => '1',
128
+ 'class' => 'showauthor',
129
+ 'admin_label' => false,
130
+ 'dependency' => '',
131
+ 'weight' => '',
132
+ 'group' => '' ,
133
+ 'edit_field_class' => ''
134
+ ),
135
+ array(
136
+ 'heading' => __('Display the feed header', 'auxin-elements'),
137
+ 'description' => __('Enable it to display a customizable header at the top of the feed.', 'auxin-elements'),
138
+ 'param_name' => 'showheader',
139
+ 'type' => 'aux_switch',
140
+ 'value' => '0',
141
+ 'class' => 'showheader',
142
+ 'admin_label' => false,
143
+ 'dependency' => '',
144
+ 'weight' => '',
145
+ 'group' => '' ,
146
+ 'edit_field_class' => ''
147
+ ),
148
+ array(
149
+ 'heading' => __('Ajax', 'auxin-elements'),
150
+ 'description' => __('Enable it for being loaded via Ajax.', 'auxin-elements'),
151
+ 'param_name' => 'ajax',
152
+ 'type' => 'aux_switch',
153
+ 'value' => '1',
154
+ 'class' => 'ajax',
155
+ 'admin_label' => false,
156
+ 'dependency' => '',
157
+ 'weight' => '',
158
+ 'group' => '' ,
159
+ 'edit_field_class' => ''
160
+ ),
161
+ array(
162
+ 'heading' => __('Extra class name','auxin-elements' ),
163
+ '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' ),
164
+ 'param_name' => 'extra_classes',
165
+ 'type' => 'textfield',
166
+ 'value' => '',
167
+ 'def_value' => '',
168
+ 'holder' => 'textfield',
169
+ 'class' => 'extra_classes',
170
+ 'admin_label' => true,
171
+ 'dependency' => '',
172
+ 'weight' => '',
173
+ 'group' => 'Extras' ,
174
+ 'edit_field_class' => ''
175
+ )
176
+ )
177
+ );
178
+
179
+ return $master_array;
180
+ }
181
+
182
+ add_filter( 'auxin_master_array_shortcodes', 'auxin_get_facebook_master_array', 10, 1 );
183
+
184
+ function auxin_widget_facebook_callback( $atts, $shortcode_content = null ){
185
+
186
+ $default_atts = array(
187
+ 'id' => '',
188
+ 'pagetype' => 'page',
189
+ 'num' => '',
190
+ 'showpostsby' => 'me',
191
+ 'textlength' => '',
192
+ 'showauthor' => '1',
193
+ 'showheader' => '0',
194
+ 'ajax' => '1',
195
+ 'extra_classes' => '',
196
+ 'custom_el_id' => '',
197
+ 'base_class' => 'aux-widget-facebook'
198
+ );
199
+
200
+ $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
201
+ extract( $result['parsed_atts'] );
202
+
203
+ $facebook_shortcode = "";
204
+
205
+ ob_start();
206
+
207
+ $pagetype = 'pagetype="' . $pagetype . '"';
208
+ $showpostsby = 'showpostsby="' . $showpostsby . '"';
209
+ if( ! empty( $id ) ) {
210
+ $id = 'id="' . $id . '"';
211
+ }
212
+ if( ! empty( $num ) ) {
213
+ $num = 'num="' . $num . '"';
214
+ }
215
+ if( ! empty( $textlength ) ) {
216
+ $textlength = 'textlength="' . $textlength . '"';
217
+ }
218
+ if( ! empty( $extra_classes ) ) {
219
+ $extra_classes = 'class="' . $extra_classes . '"';
220
+ }
221
+
222
+ if( empty( $showauthor ) ){
223
+ $showauthor = "false";
224
+ } else {
225
+ $showauthor = "ture";
226
+ }
227
+ $showauthor = 'showauthor="' . $showauthor .'"';
228
+
229
+ if( empty( $showheader ) ){
230
+ $showheader = "false";
231
+ } else {
232
+ $showheader = "ture";
233
+ }
234
+ $showheader = 'showheader="' . $showheader .'"';
235
+
236
+ if( empty( $ajax ) ){
237
+ $ajax = "false";
238
+ } else {
239
+ $ajax = "ture";
240
+ }
241
+ $ajax = 'ajax="' . $ajax .'"';
242
+
243
+ $facebook_shortcode = '[custom-facebook-feed ' . $id . ' ' . $num . ' ' . $textlength . ' ' . $pagetype . ' ' . $showpostsby . ' ' . $showauthor . ' ' . $ajax . ' ' . $extra_classes . ' ' . $showheader .']';
244
+
245
+ echo do_shortcode( $facebook_shortcode );
246
+
247
+ return ob_get_clean();
248
+
249
+ }
250
+
includes/elements/flickr.php ADDED
@@ -0,0 +1,360 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Divider element
4
+ *
5
+ *
6
+ * @package auxin-elements
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 ) {
14
+
15
+ $master_array['aux_flickr'] = array(
16
+ 'name' => __('[Phlox] Flickr Justified Gallery', 'auxin-elements' ),
17
+ 'auxin_output_callback' => 'auxin_widget_flickr_callback',
18
+ 'base' => 'aux_flickr',
19
+ 'description' => __('It uses Flickr Justified Gallery plugin.', 'auxin-elements'),
20
+ 'class' => 'aux-widget-flickr',
21
+ 'show_settings_on_create' => true,
22
+ 'weight' => 1,
23
+ 'is_widget' => true,
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-flickr',
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' => __('User ID', 'auxin-elements'),
44
+ 'description' => sprintf(__('Displays the photostream of the specified user, no matter what is the default user ID in the settings. Remember that you can use %sidgettr%s to retrieve the user_id.', 'auxin-elements'), '<a href="http://idgettr.com/">','</a>'),
45
+ 'param_name' => 'user_id',
46
+ 'type' => 'textfield',
47
+ 'value' => '',
48
+ 'def_value' => '',
49
+ 'holder' => 'textfield',
50
+ 'class' => 'user_id',
51
+ 'admin_label' => false,
52
+ 'dependency' => '',
53
+ 'weight' => '',
54
+ 'group' => '' ,
55
+ 'edit_field_class' => ''
56
+ ),
57
+ array(
58
+ 'heading' => __('Flickr image type', 'auxin-elements'),
59
+ 'description' => '',
60
+ 'param_name' => 'flickr_type',
61
+ 'type' => 'dropdown',
62
+ 'value' => array(
63
+ 'photostream' => __('Photostream' , 'auxin-elements'),
64
+ 'galleries' => __('Galleries', 'auxin-elements'),
65
+ 'album' => __('Album', 'auxin-elements'), // flickr set
66
+ 'group' => __('Group pools', 'auxin-elements'),
67
+ 'tags' => __('Tags', 'auxin-elements'),
68
+ ),
69
+ 'def_value' => 'none',
70
+ 'holder' => 'dropdown',
71
+ 'class' => 'flickr_type',
72
+ 'admin_label' => true,
73
+ 'dependency' => '',
74
+ 'weight' => '',
75
+ 'group' => '' ,
76
+ 'edit_field_class' => ''
77
+ ),
78
+ array(
79
+ 'heading' => __('Gallery ID', 'auxin-elements'),
80
+ 'description' => __('To show the photos of a particular gallery, you need to know its id. For example, the id of the gallery located in the URL: http://www.flickr.com/photos/miro-mannino/galleries/72157636382842016/ is: 72157636382842016', 'auxin-elements'),
81
+ 'param_name' => 'gallery_id',
82
+ 'type' => 'textfield',
83
+ 'value' => '',
84
+ 'def_value' => '',
85
+ 'holder' => 'textfield',
86
+ 'class' => 'gallery_id',
87
+ 'admin_label' => false,
88
+ 'dependency' => array(
89
+ 'element' => 'flickr_type',
90
+ 'value' => 'galleries'
91
+ ),
92
+ 'weight' => '',
93
+ 'group' => '' ,
94
+ 'edit_field_class' => ''
95
+ ),
96
+ array(
97
+ 'heading' => __('Album ID', 'auxin-elements'),
98
+ 'description' => __('To show the photos of a particular photo set (also called "album"), you need to know its photoset_id. For example, the photoset_id of the photo set located in the URL: http://www.flickr.com/photos/miro-mannino/sets/72157629228993613/ is: 72157629228993613', 'auxin-elements'),
99
+ 'param_name' => 'photoset_id',
100
+ 'type' => 'textfield',
101
+ 'value' => '',
102
+ 'def_value' => '',
103
+ 'holder' => 'textfield',
104
+ 'class' => 'photoset_id',
105
+ 'admin_label' => false,
106
+ 'dependency' => array(
107
+ 'element' => 'flickr_type',
108
+ 'value' => 'album'
109
+ ),
110
+ 'weight' => '',
111
+ 'group' => '' ,
112
+ 'edit_field_class' => ''
113
+ ),
114
+ array(
115
+ 'heading' => __('Group pools', 'auxin-elements'),
116
+ 'description' => sprintf(__('Display photos of a particular group pool, you need to know the group id, that you can retrieve using %sidgettr%s.', 'auxin-elements'), '<a target="_blank" href="http://idgettr.com/">','</a>'),
117
+ 'param_name' => 'group_id',
118
+ 'type' => 'textfield',
119
+ 'value' => '',
120
+ 'def_value' => '',
121
+ 'holder' => 'textfield',
122
+ 'class' => 'group_id',
123
+ 'admin_label' => false,
124
+ 'dependency' => array(
125
+ 'element' => 'flickr_type',
126
+ 'value' => 'group'
127
+ ),
128
+ 'weight' => '',
129
+ 'group' => '' ,
130
+ 'edit_field_class' => ''
131
+ ),
132
+ array(
133
+ 'heading' => __('Tags', 'auxin-elements'),
134
+ 'description' => __('Display photos that have some particular tags, Seprate words with , for example: cat, square, nikon', 'auxin-elements'),
135
+ 'param_name' => 'tags',
136
+ 'type' => 'textfield',
137
+ 'value' => '',
138
+ 'def_value' => '',
139
+ 'holder' => 'textfield',
140
+ 'class' => 'tags',
141
+ 'admin_label' => false,
142
+ 'dependency' => array(
143
+ 'element' => 'flickr_type',
144
+ 'value' => 'tags'
145
+ ),
146
+ 'weight' => '',
147
+ 'group' => '' ,
148
+ 'edit_field_class' => ''
149
+ ),
150
+ array(
151
+ 'heading' => __('Lightbox','auxin-elements'),
152
+ 'description' => __('In case of using Colorbox or Swipebox, you need to enable it on Flickr Justified Gallery plugin settings.','auxin-elements'),
153
+ 'param_name' => 'lightbox',
154
+ 'type' => 'dropdown',
155
+ 'value' => array(
156
+ 'none' => __('None' , 'auxin-elements'),
157
+ 'colorbox' => __('Colorbox', 'auxin-elements'),
158
+ 'swipebox' => __('Swipebox', 'auxin-elements'),
159
+ ),
160
+ 'def_value' => 'none',
161
+ 'holder' => 'dropdown',
162
+ 'class' => 'lightbox',
163
+ 'admin_label' => true,
164
+ 'dependency' => '',
165
+ 'weight' => '',
166
+ 'group' => '' ,
167
+ 'edit_field_class' => ''
168
+ ),
169
+ array(
170
+ 'heading' => __('Images height', 'auxin-elements'),
171
+ 'description' => __('You can use the this option to set images height in px.', 'auxin-elements'),
172
+ 'param_name' => 'images_height',
173
+ 'type' => 'textfield',
174
+ 'value' => '',
175
+ 'def_value' => '',
176
+ 'holder' => 'textfield',
177
+ 'class' => 'images_height',
178
+ 'admin_label' => false,
179
+ 'dependency' => '',
180
+ 'weight' => '',
181
+ 'group' => '' ,
182
+ 'edit_field_class' => ''
183
+ ),
184
+ array(
185
+ 'heading' => __('Max number of photos','auxin-elements'),
186
+ 'description' => __('Maximum number of photos. Please note if pagination option is activaited then this options is used as maximum number of photos per page.', 'auxin-elements'),
187
+ 'param_name' => 'max_num_photos',
188
+ 'type' => 'textfield',
189
+ 'value' => '',
190
+ 'def_value' => '',
191
+ 'holder' => 'textfield',
192
+ 'class' => 'max_num_photos',
193
+ 'admin_label' => false,
194
+ 'dependency' => '',
195
+ 'weight' => '',
196
+ 'group' => '' ,
197
+ 'edit_field_class' => ''
198
+ ),
199
+ array(
200
+ 'heading' => __('Pagination','auxin-elements'),
201
+ 'description' => '',
202
+ 'param_name' => 'pagination',
203
+ 'type' => 'dropdown',
204
+ 'value' => array(
205
+ 'none' => __('None' , 'auxin-elements'),
206
+ 'prevnext' => __('Previous and Next', 'auxin-elements'),
207
+ 'numbers' => __('Page Numbers', 'auxin-elements'),
208
+ ),
209
+ 'def_value' => 'none',
210
+ 'holder' => 'dropdown',
211
+ 'class' => 'pagination',
212
+ 'admin_label' => true,
213
+ 'dependency' => '',
214
+ 'weight' => '',
215
+ 'group' => '' ,
216
+ 'edit_field_class' => ''
217
+ ),
218
+ array(
219
+ 'heading' => __('Fixed height', 'auxin-elements'),
220
+ 'description' => __('Each row has the same height, but the images will be cut more.', 'auxin-elements'),
221
+ 'param_name' => 'fixed_height',
222
+ 'type' => 'aux_switch',
223
+ 'value' => '0',
224
+ 'class' => 'fixed_height',
225
+ 'admin_label' => false,
226
+ 'dependency' => '',
227
+ 'weight' => '',
228
+ 'group' => '' ,
229
+ 'edit_field_class' => ''
230
+ ),
231
+ array(
232
+ 'heading' => __('Randomize images order', 'auxin-elements'),
233
+ 'description' => '',
234
+ 'param_name' => 'randomize',
235
+ 'type' => 'aux_switch',
236
+ 'value' => '0',
237
+ 'class' => 'randomize',
238
+ 'admin_label' => 0,
239
+ 'dependency' => '',
240
+ 'weight' => '',
241
+ 'group' => '' ,
242
+ 'edit_field_class' => ''
243
+ ),
244
+ array(
245
+ 'heading' => __('Margin between the images','auxin-elements'),
246
+ 'description' => __('Specifies the space between images.', 'auxin-elements'),
247
+ 'param_name' => 'margins',
248
+ 'type' => 'textfield',
249
+ 'value' => '',
250
+ 'def_value' => '',
251
+ 'holder' => 'textfield',
252
+ 'class' => 'margins',
253
+ 'admin_label' => false,
254
+ 'dependency' => '',
255
+ 'weight' => '',
256
+ 'group' => '' ,
257
+ 'edit_field_class' => ''
258
+ )
259
+ )
260
+ );
261
+
262
+ return $master_array;
263
+ }
264
+
265
+ add_filter( 'auxin_master_array_shortcodes', 'auxin_get_flickr_master_array', 10, 1 );
266
+
267
+ function auxin_widget_flickr_callback( $atts, $shortcode_content = null ){
268
+
269
+ $default_atts = array(
270
+ 'user_id' => '',
271
+ 'flickr_type' => 'photostream',
272
+ 'gallery_id' => '',
273
+ 'photoset_id' => '',
274
+ 'group_id' => '',
275
+ 'tags' => '',
276
+ 'max_num_photos' => '',
277
+ 'images_height' => '',
278
+ 'lightbox' => 'none',
279
+ 'pagination' => 'none',
280
+ 'margins' => '',
281
+ 'fixed_height' => false,
282
+ 'randomize' => false,
283
+ 'custom_el_id' => '',
284
+ 'base_class' => 'aux-widget-flickr'
285
+ );
286
+
287
+ $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
288
+ extract( $result['parsed_atts'] );
289
+
290
+ $shortcode_name = "";
291
+ $justify_shortcode = "";
292
+
293
+ ob_start();
294
+
295
+
296
+ switch ($flickr_type) {
297
+ case 'photostream':
298
+ $shortcode_name = "flickr_photostream";
299
+ break;
300
+ case 'galleries':
301
+ $shortcode_name = 'flickr_gallery id="' . $gallery_id . '"';
302
+ break;
303
+ case 'album':
304
+ $shortcode_name = 'flickr_set id="' . $photoset_id . '"';
305
+ break;
306
+ case 'group':
307
+ $shortcode_name = 'flickr_group id="' . $group_id . '"';
308
+ break;
309
+ case 'tags':
310
+ $shortcode_name = 'flickr_tags tags="' . $tags . '"';
311
+ break;
312
+ }
313
+
314
+ if( ! empty( $user_id ) ) {
315
+ $user_id = 'user_id="' . $user_id . '"';
316
+ }
317
+
318
+ if( ! empty( $pagination ) ) {
319
+ $pagination = 'pagination="' . $pagination . '"';
320
+ }
321
+
322
+ if( ! empty( $max_num_photos ) ) {
323
+ $max_num_photos = 'max_num_photos="' . $max_num_photos . '"';
324
+ }
325
+
326
+ if( ! empty( $images_height ) ) {
327
+ $images_height = 'images_height="' . $images_height . '"';
328
+ }
329
+
330
+
331
+ if( ! empty( $lightbox ) ) {
332
+ $lightbox = 'lightbox="' . $lightbox . '"';
333
+ }
334
+
335
+ if( ! empty( $margins ) ) {
336
+ $margins = 'margins="' . $margins . '"';
337
+ }
338
+
339
+ if( empty( $fixed_height ) ){
340
+ $fixed_height = 0;
341
+ } else {
342
+ $fixed_height = 1;
343
+ }
344
+ $fixed_height = 'fixed_height="' . $fixed_height .'"';
345
+
346
+ if( empty( $randomize ) ){
347
+ $randomize = 0;
348
+ } else {
349
+ $randomize = 1;
350
+ }
351
+ $randomize = 'randomize="' . $randomize .'"';
352
+
353
+ $justify_shortcode = '[' . $shortcode_name . ' ' . $user_id . ' ' . $images_height . ' ' . $margins . ' ' . $fixed_height . ' ' . $max_num_photos . ' ' . $randomize . ' ' . $lightbox . ' ' . $pagination . ']';
354
+
355
+ echo do_shortcode( $justify_shortcode );
356
+
357
+ return ob_get_clean();
358
+
359
+ }
360
+
includes/elements/gallery.php CHANGED
@@ -254,7 +254,7 @@ function auxin_get_gallery_master_array( $master_array ) {
254
  'edit_field_class' => ''
255
  ),
256
  array(
257
- 'heading' => __('Extra CSS class','auxin-elements'),
258
  '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'),
259
  'param_name' => 'extra_classes',
260
  'type' => 'textfield',
254
  'edit_field_class' => ''
255
  ),
256
  array(
257
+ 'heading' => __('Extra class name','auxin-elements'),
258
  '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'),
259
  'param_name' => 'extra_classes',
260
  'type' => 'textfield',
includes/elements/gmap.php CHANGED
@@ -94,7 +94,7 @@ function auxin_get_gmap_master_array( $master_array ) {
94
  'edit_field_class' => ''
95
  ),
96
  array(
97
- 'heading' => __('Map Type','auxin-elements' ),
98
  'description' => '',
99
  'param_name' => 'type',
100
  'type' => 'dropdown',
@@ -109,7 +109,7 @@ function auxin_get_gmap_master_array( $master_array ) {
109
  'edit_field_class' => ''
110
  ),
111
  array(
112
- 'heading' => __('Map Style','auxin-elements' ),
113
  'description' => __('This feild allow you to customize the presentation of the standard Google base maps. You can find many preset styles in ', 'auxin-elements' ) .
114
  '<a href="https://snazzymaps.com/" target="_blank">' . __('this website.', 'auxin-elements' ) . '</a>' ,
115
  'param_name' => 'style',
@@ -125,7 +125,7 @@ function auxin_get_gmap_master_array( $master_array ) {
125
  )
126
  ),
127
  array(
128
- 'heading' => __('Marker Info','auxin-elements' ),
129
  'description' => __('Marker popup text, leave it empty if you don\'t need it.', 'auxin-elements' ),
130
  'param_name' => 'marker_info',
131
  'type' => 'textfield',
94
  'edit_field_class' => ''
95
  ),
96
  array(
97
+ 'heading' => __('Map type','auxin-elements' ),
98
  'description' => '',
99
  'param_name' => 'type',
100
  'type' => 'dropdown',
109
  'edit_field_class' => ''
110
  ),
111
  array(
112
+ 'heading' => __('Map style','auxin-elements' ),
113
  'description' => __('This feild allow you to customize the presentation of the standard Google base maps. You can find many preset styles in ', 'auxin-elements' ) .
114
  '<a href="https://snazzymaps.com/" target="_blank">' . __('this website.', 'auxin-elements' ) . '</a>' ,
115
  'param_name' => 'style',
125
  )
126
  ),
127
  array(
128
+ 'heading' => __('Marker info','auxin-elements' ),
129
  'description' => __('Marker popup text, leave it empty if you don\'t need it.', 'auxin-elements' ),
130
  'param_name' => 'marker_info',
131
  'type' => 'textfield',
includes/elements/highlight.php CHANGED
@@ -39,13 +39,13 @@ function auxin_get_highlight_master_array( $master_array ) {
39
  'as_child' => '',
40
  'params' => array(
41
  array(
 
 
42
  'param_name' => 'style',
43
  'type' => 'aux_visual_select',
44
  'std' => "aux-highlight-red",
45
  'holder' => 'dropdown',
46
  'class' => 'style',
47
- 'heading' => __('Divider Style','auxin-elements' ),
48
- 'description' => __('The style of divider','auxin-elements' ),
49
  'admin_label' => true,
50
  'dependency' => '',
51
  'weight' => '',
@@ -75,14 +75,14 @@ function auxin_get_highlight_master_array( $master_array ) {
75
  )
76
  ),
77
  array(
 
 
78
  'param_name' => 'content',
79
  'type' => 'textarea_html',
80
  'value' => '',
81
  'def_value' => '',
82
  'holder' => 'div',
83
  'class' => 'content',
84
- 'heading' => __('Content','auxin-elements' ),
85
- 'description' => __('Enter the text to be highlighted.', 'auxin-elements' ),
86
  'admin_label' => true,
87
  'dependency' => '',
88
  'weight' => '',
@@ -91,14 +91,14 @@ function auxin_get_highlight_master_array( $master_array ) {
91
  ),
92
 
93
  array(
 
 
94
  'param_name' => 'extra_classes',
95
  'type' => 'textfield',
96
  'value' => '',
97
  'def_value' => '',
98
  'holder' => 'textfield',
99
  'class' => 'extra_classes',
100
- 'heading' => __('Extra class name','auxin-elements' ),
101
- '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' ),
102
  'admin_label' => true,
103
  'dependency' => '',
104
  'weight' => '',
39
  'as_child' => '',
40
  'params' => array(
41
  array(
42
+ 'heading' => __('Divider style','auxin-elements' ),
43
+ 'description' => __('The style of divider.','auxin-elements' ),
44
  'param_name' => 'style',
45
  'type' => 'aux_visual_select',
46
  'std' => "aux-highlight-red",
47
  'holder' => 'dropdown',
48
  'class' => 'style',
 
 
49
  'admin_label' => true,
50
  'dependency' => '',
51
  'weight' => '',
75
  )
76
  ),
77
  array(
78
+ 'heading' => __('Content','auxin-elements' ),
79
+ 'description' => __('Enter the text to be highlighted.', 'auxin-elements' ),
80
  'param_name' => 'content',
81
  'type' => 'textarea_html',
82
  'value' => '',
83
  'def_value' => '',
84
  'holder' => 'div',
85
  'class' => 'content',
 
 
86
  'admin_label' => true,
87
  'dependency' => '',
88
  'weight' => '',
91
  ),
92
 
93
  array(
94
+ 'heading' => __('Extra class name','auxin-elements' ),
95
+ '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' ),
96
  'param_name' => 'extra_classes',
97
  'type' => 'textfield',
98
  'value' => '',
99
  'def_value' => '',
100
  'holder' => 'textfield',
101
  'class' => 'extra_classes',
 
 
102
  'admin_label' => true,
103
  'dependency' => '',
104
  'weight' => '',
includes/elements/image.php CHANGED
@@ -69,7 +69,7 @@ function auxin_get_image_master_array( $master_array ) {
69
  'edit_field_class' => ''
70
  ),
71
  array(
72
- 'heading' => __('Image Hover','auxin-elements' ),
73
  'description' => '',
74
  'param_name' => 'attach_id_hover',
75
  'type' => 'attach_image',
@@ -133,7 +133,7 @@ function auxin_get_image_master_array( $master_array ) {
133
  'edit_field_class' => ''
134
  ),
135
  array(
136
- 'heading' => __('Iconic Button','auxin-elements' ),
137
  'description' => '',
138
  'param_name' => 'icon',
139
  'type' => 'dropdown',
69
  'edit_field_class' => ''
70
  ),
71
  array(
72
+ 'heading' => __('Image hover','auxin-elements' ),
73
  'description' => '',
74
  'param_name' => 'attach_id_hover',
75
  'type' => 'attach_image',
133
  'edit_field_class' => ''
134
  ),
135
  array(
136
+ 'heading' => __('Iconic button','auxin-elements' ),
137
  'description' => '',
138
  'param_name' => 'icon',
139
  'type' => 'dropdown',
includes/elements/instagram-feed.php CHANGED
@@ -39,13 +39,13 @@ function auxin_get_instagram_master_array( $master_array ) {
39
  'as_child' => '',
40
  'params' => array(
41
  array(
 
 
42
  'param_name' => 'title',
43
  'type' => 'textfield',
44
  'value' => '',
45
  'holder' => 'textfield',
46
  'class' => 'title',
47
- 'heading' => __('Title','auxin-elements' ),
48
- 'description' => __('A title for instagram element', 'auxin-elements' ),
49
  'admin_label' => true,
50
  'dependency' => '',
51
  'weight' => '',
@@ -53,18 +53,18 @@ function auxin_get_instagram_master_array( $master_array ) {
53
  'edit_field_class' => ''
54
  ),
55
  array(
 
 
 
 
 
 
56
  'param_name' => 'id',
57
  'type' => 'textfield',
58
  'value' => '',
59
  'def_value' => '',
60
  'holder' => 'textfield',
61
  'class' => 'user_id',
62
- 'heading' => __('Instagram User ID','auxin-elements' ),
63
- 'description' => sprintf(
64
- __('Instagram User ID. Separate multiple IDs by commas. You can find the User ID with %sthis tool%s.', 'auxin-elements' ),
65
- '<a href="https://smashballoon.com/instagram-feed/find-instagram-user-id/" target="_blank">',
66
- '</a>'
67
- ),
68
  'admin_label' => true,
69
  'dependency' => '',
70
  'weight' => '',
@@ -72,14 +72,14 @@ function auxin_get_instagram_master_array( $master_array ) {
72
  'edit_field_class' => ''
73
  ),
74
  array(
 
 
75
  'param_name' => 'num',
76
  'type' => 'textfield',
77
  'value' => '',
78
  'def_value' => '',
79
  'holder' => 'textfield',
80
  'class' => 'num',
81
- 'heading' => __('Number of photo','auxin-elements' ),
82
- 'description' => __('Number of photos to display initially. Maximum is 33.','auxin-elements' ),
83
  'admin_label' => true,
84
  'dependency' => '',
85
  'weight' => '',
@@ -87,6 +87,8 @@ function auxin_get_instagram_master_array( $master_array ) {
87
  'edit_field_class' => ''
88
  ),
89
  array(
 
 
90
  'param_name' => 'imageres',
91
  'type' => 'dropdown',
92
  'def_value' => 'medium',
@@ -98,8 +100,6 @@ function auxin_get_instagram_master_array( $master_array ) {
98
  ),
99
  'holder' => 'dropdown',
100
  'class' => 'border',
101
- 'heading' => __('Resolution/size of the photos. ','auxin-elements' ),
102
- 'description' => '',
103
  'admin_label' => true,
104
  'dependency' => '',
105
  'weight' => '',
@@ -107,14 +107,14 @@ function auxin_get_instagram_master_array( $master_array ) {
107
  'edit_field_class' => ''
108
  ),
109
  array(
 
 
110
  'param_name' => 'cols',
111
  'type' => 'textfield',
112
  'value' => '',
113
  'def_value' => '',
114
  'holder' => 'textfield',
115
  'class' => 'columns',
116
- 'heading' => __('Columns','auxin-elements' ),
117
- 'description' => __('Number of columns in the feed. 1 - 10.','auxin-elements' ),
118
  'admin_label' => true,
119
  'dependency' => '',
120
  'weight' => '',
@@ -122,14 +122,14 @@ function auxin_get_instagram_master_array( $master_array ) {
122
  'edit_field_class' => ''
123
  ),
124
  array(
 
 
125
  'param_name' => 'imagepadding',
126
  'type' => 'textfield',
127
  'value' => '0',
128
  'def_value' => '0',
129
  'holder' => 'textfield',
130
  'class' => 'height',
131
- 'heading' => __('Spacing around the photos','auxin-elements' ),
132
- 'description' => '',
133
  'admin_label' => true,
134
  'dependency' => '',
135
  'weight' => '',
@@ -137,6 +137,8 @@ function auxin_get_instagram_master_array( $master_array ) {
137
  'edit_field_class' => ''
138
  ),
139
  array(
 
 
140
  'param_name' => 'imagepaddingunit',
141
  'type' => 'dropdown',
142
  'def_value' => 'px',
@@ -146,8 +148,6 @@ function auxin_get_instagram_master_array( $master_array ) {
146
  ),
147
  'holder' => 'dropdown',
148
  'class' => 'border',
149
- 'heading' => __('Unit of the spacing.','auxin-elements' ),
150
- 'description' => '',
151
  'admin_label' => true,
152
  'dependency' => '',
153
  'weight' => '',
@@ -188,14 +188,14 @@ function auxin_get_instagram_master_array( $master_array ) {
188
  // 'edit_field_class' => ''
189
  // ),
190
  array(
 
 
191
  'param_name' => 'height',
192
  'type' => 'textfield',
193
  'value' => '',
194
  'def_value' => '',
195
  'holder' => 'textfield',
196
  'class' => 'height',
197
- 'heading' => __('Height','auxin-elements' ),
198
- 'description' => __('The height of the feed','auxin-elements' ),
199
  'admin_label' => true,
200
  'dependency' => '',
201
  'weight' => '',
@@ -203,6 +203,8 @@ function auxin_get_instagram_master_array( $master_array ) {
203
  'edit_field_class' => ''
204
  ),
205
  array(
 
 
206
  'param_name' => 'heightunit',
207
  'type' => 'dropdown',
208
  'def_value' => 'px',
@@ -212,8 +214,6 @@ function auxin_get_instagram_master_array( $master_array ) {
212
  ),
213
  'holder' => 'dropdown',
214
  'class' => 'border',
215
- 'heading' => __('Unit of the height.','auxin-elements' ),
216
- 'description' => '',
217
  'admin_label' => true,
218
  'dependency' => '',
219
  'weight' => '',
@@ -221,14 +221,14 @@ function auxin_get_instagram_master_array( $master_array ) {
221
  'edit_field_class' => ''
222
  ),
223
  array(
 
 
224
  'param_name' => 'background',
225
  'type' => 'color',
226
  'value' => '',
227
  'def_value' => '',
228
  'holder' => 'textfield',
229
  'class' => 'background-color',
230
- 'heading' => __('Background color','auxin-elements' ),
231
- 'description' => '',
232
  'admin_label' => true,
233
  'dependency' => '',
234
  'weight' => '',
@@ -236,14 +236,14 @@ function auxin_get_instagram_master_array( $master_array ) {
236
  'edit_field_class' => ''
237
  ),
238
  array(
 
 
239
  'param_name' => 'showheader',
240
  'type' => 'aux_switch',
241
  'def_value' => '',
242
  'value' => '0',
243
  'holder' => 'dropdown',
244
  'class' => 'showheader',
245
- 'heading' => __('Show Header','auxin-elements' ),
246
- 'description' => __('Whether to show the feed header.', 'auxin-elements' ),
247
  'admin_label' => true,
248
  'dependency' => '',
249
  'weight' => '',
@@ -251,14 +251,14 @@ function auxin_get_instagram_master_array( $master_array ) {
251
  'edit_field_class' => ''
252
  ),
253
  array(
 
 
254
  'param_name' => 'showfollow',
255
  'type' => 'aux_switch',
256
  'def_value' => '',
257
  'value' => '0',
258
  'holder' => 'dropdown',
259
  'class' => 'showfollow',
260
- 'heading' => __('Show follow button','auxin-elements' ),
261
- 'description' => __('Whether to show the Follow on Instagram button.', 'auxin-elements' ),
262
  'admin_label' => true,
263
  'dependency' => '',
264
  'weight' => '',
@@ -266,14 +266,14 @@ function auxin_get_instagram_master_array( $master_array ) {
266
  'edit_field_class' => ''
267
  ),
268
  array(
 
 
269
  'param_name' => 'showbutton',
270
  'type' => 'aux_switch',
271
  'def_value' => '',
272
  'value' => '0',
273
  'holder' => 'dropdown',
274
  'class' => 'showbutton',
275
- 'heading' => __('Show Load More button','auxin-elements' ),
276
- 'description' => __(' Whether to show the Load More button.', 'auxin-elements' ),
277
  'admin_label' => true,
278
  'dependency' => '',
279
  'weight' => '',
@@ -281,14 +281,14 @@ function auxin_get_instagram_master_array( $master_array ) {
281
  'edit_field_class' => ''
282
  ),
283
  array(
 
 
284
  'param_name' => 'extra_classes',
285
  'type' => 'textfield',
286
  'value' => '',
287
  'def_value' => '',
288
  'holder' => 'textfield',
289
  'class' => 'extra_classes',
290
- 'heading' => __('Extra class name','auxin-elements' ),
291
- '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' ),
292
  'admin_label' => true,
293
  'dependency' => '',
294
  'weight' => '',
39
  'as_child' => '',
40
  'params' => array(
41
  array(
42
+ 'heading' => __('Title','auxin-elements' ),
43
+ 'description' => __('A title for instagram element', 'auxin-elements' ),
44
  'param_name' => 'title',
45
  'type' => 'textfield',
46
  'value' => '',
47
  'holder' => 'textfield',
48
  'class' => 'title',
 
 
49
  'admin_label' => true,
50
  'dependency' => '',
51
  'weight' => '',
53
  'edit_field_class' => ''
54
  ),
55
  array(
56
+ 'heading' => __('Instagram user ID','auxin-elements' ),
57
+ 'description' => sprintf(
58
+ __('Instagram User ID. Separate multiple IDs by commas. You can find the User ID with %sthis tool%s.', 'auxin-elements' ),
59
+ '<a href="https://smashballoon.com/instagram-feed/find-instagram-user-id/" target="_blank">',
60
+ '</a>'
61
+ ),
62
  'param_name' => 'id',
63
  'type' => 'textfield',
64
  'value' => '',
65
  'def_value' => '',
66
  'holder' => 'textfield',
67
  'class' => 'user_id',
 
 
 
 
 
 
68
  'admin_label' => true,
69
  'dependency' => '',
70
  'weight' => '',
72
  'edit_field_class' => ''
73
  ),
74
  array(
75
+ 'heading' => __('Number of photo','auxin-elements' ),
76
+ 'description' => __('Number of photos to display initially. Maximum is 33.','auxin-elements' ),
77
  'param_name' => 'num',
78
  'type' => 'textfield',
79
  'value' => '',
80
  'def_value' => '',
81
  'holder' => 'textfield',
82
  'class' => 'num',
 
 
83
  'admin_label' => true,
84
  'dependency' => '',
85
  'weight' => '',
87
  'edit_field_class' => ''
88
  ),
89
  array(
90
+ 'heading' => __('Resolution/size of the photos. ','auxin-elements' ),
91
+ 'description' => '',
92
  'param_name' => 'imageres',
93
  'type' => 'dropdown',
94
  'def_value' => 'medium',
100
  ),
101
  'holder' => 'dropdown',
102
  'class' => 'border',
 
 
103
  'admin_label' => true,
104
  'dependency' => '',
105
  'weight' => '',
107
  'edit_field_class' => ''
108
  ),
109
  array(
110
+ 'heading' => __('Columns','auxin-elements' ),
111
+ 'description' => __('Number of columns in the feed. 1 - 10.','auxin-elements' ),
112
  'param_name' => 'cols',
113
  'type' => 'textfield',
114
  'value' => '',
115
  'def_value' => '',
116
  'holder' => 'textfield',
117
  'class' => 'columns',
 
 
118
  'admin_label' => true,
119
  'dependency' => '',
120
  'weight' => '',
122
  'edit_field_class' => ''
123
  ),
124
  array(
125
+ 'heading' => __('Spacing around the photos','auxin-elements' ),
126
+ 'description' => '',
127
  'param_name' => 'imagepadding',
128
  'type' => 'textfield',
129
  'value' => '0',
130
  'def_value' => '0',
131
  'holder' => 'textfield',
132
  'class' => 'height',
 
 
133
  'admin_label' => true,
134
  'dependency' => '',
135
  'weight' => '',
137
  'edit_field_class' => ''
138
  ),
139
  array(
140
+ 'heading' => __('Unit of the spacing.','auxin-elements' ),
141
+ 'description' => '',
142
  'param_name' => 'imagepaddingunit',
143
  'type' => 'dropdown',
144
  'def_value' => 'px',
148
  ),
149
  'holder' => 'dropdown',
150
  'class' => 'border',
 
 
151
  'admin_label' => true,
152
  'dependency' => '',
153
  'weight' => '',
188
  // 'edit_field_class' => ''
189
  // ),
190
  array(
191
+ 'heading' => __('Height','auxin-elements' ),
192
+ 'description' => __('The height of the feed','auxin-elements' ),
193
  'param_name' => 'height',
194
  'type' => 'textfield',
195
  'value' => '',
196
  'def_value' => '',
197
  'holder' => 'textfield',
198
  'class' => 'height',
 
 
199
  'admin_label' => true,
200
  'dependency' => '',
201
  'weight' => '',
203
  'edit_field_class' => ''
204
  ),
205
  array(
206
+ 'heading' => __('Unit of the height.','auxin-elements' ),
207
+ 'description' => '',
208
  'param_name' => 'heightunit',
209
  'type' => 'dropdown',
210
  'def_value' => 'px',
214
  ),
215
  'holder' => 'dropdown',
216
  'class' => 'border',
 
 
217
  'admin_label' => true,
218
  'dependency' => '',
219
  'weight' => '',
221
  'edit_field_class' => ''
222
  ),
223
  array(
224
+ 'heading' => __('Background color','auxin-elements' ),
225
+ 'description' => '',
226
  'param_name' => 'background',
227
  'type' => 'color',
228
  'value' => '',
229
  'def_value' => '',
230
  'holder' => 'textfield',
231
  'class' => 'background-color',
 
 
232
  'admin_label' => true,
233
  'dependency' => '',
234
  'weight' => '',
236
  'edit_field_class' => ''
237
  ),
238
  array(
239
+ 'heading' => __('Show header','auxin-elements' ),
240
+ 'description' => __('Whether to show the feed header.', 'auxin-elements' ),
241
  'param_name' => 'showheader',
242
  'type' => 'aux_switch',
243
  'def_value' => '',
244
  'value' => '0',
245
  'holder' => 'dropdown',
246
  'class' => 'showheader',
 
 
247
  'admin_label' => true,
248
  'dependency' => '',
249
  'weight' => '',
251
  'edit_field_class' => ''
252
  ),
253
  array(
254
+ 'heading' => __('Show follow button','auxin-elements' ),
255
+ 'description' => __('Whether to show the Follow on Instagram button.', 'auxin-elements' ),
256
  'param_name' => 'showfollow',
257
  'type' => 'aux_switch',
258
  'def_value' => '',
259
  'value' => '0',
260
  'holder' => 'dropdown',
261
  'class' => 'showfollow',
 
 
262
  'admin_label' => true,
263
  'dependency' => '',
264
  'weight' => '',
266
  'edit_field_class' => ''
267
  ),
268
  array(
269
+ 'heading' => __('Show load more button','auxin-elements' ),
270
+ 'description' => __(' Whether to show the load more button.', 'auxin-elements' ),
271
  'param_name' => 'showbutton',
272
  'type' => 'aux_switch',
273
  'def_value' => '',
274
  'value' => '0',
275
  'holder' => 'dropdown',
276
  'class' => 'showbutton',
 
 
277
  'admin_label' => true,
278
  'dependency' => '',
279
  'weight' => '',
281
  'edit_field_class' => ''
282
  ),
283
  array(
284
+ 'heading' => __('Extra class name','auxin-elements' ),
285
+ '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' ),
286
  'param_name' => 'extra_classes',
287
  'type' => 'textfield',
288
  'value' => '',
289
  'def_value' => '',
290
  'holder' => 'textfield',
291
  'class' => 'extra_classes',
 
 
292
  'admin_label' => true,
293
  'dependency' => '',
294
  'weight' => '',
includes/elements/popular-posts-widget.php CHANGED
@@ -47,14 +47,14 @@ function auxin_get_popular_post_widget_master_array( $master_array ) {
47
  'as_child' => '',
48
  'params' => array(
49
  array(
 
 
50
  'param_name' => 'title',
51
  'type' => 'textfield',
52
  'std' => '',
53
  'value' => '',
54
  'holder' => 'textfield',
55
  'class' => 'title',
56
- 'heading' => __('Title','auxin-elements' ),
57
- 'description' => '',
58
  'admin_label' => true,
59
  'dependency' => '',
60
  'weight' => '',
@@ -62,13 +62,13 @@ function auxin_get_popular_post_widget_master_array( $master_array ) {
62
  'edit_field_class' => ''
63
  ),
64
  array(
 
 
65
  'param_name' => 'num',
66
  'type' => 'dropdown',
67
  'def_value' => '4',
68
  'holder' => 'dropdown',
69
  'class' => 'num',
70
- 'heading' => __('Number of posts to show', 'auxin-elements'),
71
- 'description' => '',
72
  'value' => array(
73
  '1' => '1' , '2' => '2' , '3' => '3' ,
74
  '4' => '4' , '5' => '5' , '6' => '6',
@@ -83,14 +83,14 @@ function auxin_get_popular_post_widget_master_array( $master_array ) {
83
  ),
84
 
85
  array(
 
 
86
  'param_name' => 'show_popular',
87
  'type' => 'aux_switch',
88
  'def_value' => '',
89
  'value' => '1',
90
  'holder' => 'dropdown',
91
  'class' => 'show_popular',
92
- 'heading' => __( 'Display Popular Tab', 'auxin-elements' ),
93
- 'description' => __( 'Enable it to display the most popular posts.', 'auxin-elements' ),
94
  'admin_label' => true,
95
  'dependency' => '',
96
  'weight' => '',
@@ -98,14 +98,14 @@ function auxin_get_popular_post_widget_master_array( $master_array ) {
98
  'edit_field_class' => ''
99
  ),
100
  array(
 
 
101
  'param_name' => 'show_recent',
102
  'type' => 'aux_switch',
103
  'def_value' => '',
104
  'value' => '1',
105
  'holder' => 'dropdown',
106
  'class' => 'show_recent',
107
- 'heading' => __( 'Display Recent Tab', 'auxin-elements' ),
108
- 'description' => __( 'Enable it to display the most recent posts.', 'auxin-elements' ),
109
  'admin_label' => true,
110
  'dependency' => '',
111
  'weight' => '',
@@ -113,14 +113,14 @@ function auxin_get_popular_post_widget_master_array( $master_array ) {
113
  'edit_field_class' => ''
114
  ),
115
  array(
 
 
116
  'param_name' => 'show_comment',
117
  'type' => 'aux_switch',
118
  'def_value' => '',
119
  'value' => '1',
120
  'holder' => 'dropdown',
121
  'class' => 'show_comment',
122
- 'heading' => __( 'Display Comment Tab', 'auxin-elements' ),
123
- 'description' => __( 'Enable it to display the most commented posts.', 'auxin-elements' ),
124
  'admin_label' => true,
125
  'dependency' => '',
126
  'weight' => '',
@@ -128,14 +128,14 @@ function auxin_get_popular_post_widget_master_array( $master_array ) {
128
  'edit_field_class' => ''
129
  ),
130
  array(
 
 
131
  'param_name' => 'show_media',
132
  'type' => 'aux_switch',
133
  'def_value' => '',
134
  'value' => '1',
135
  'holder' => 'dropdown',
136
  'class' => 'show_media',
137
- 'heading' => __('Display Image', 'auxin-elements' ),
138
- 'description' => __('Enable it to display images as well.','auxin-elements' ),
139
  'admin_label' => true,
140
  'dependency' => '',
141
  'weight' => '',
@@ -143,14 +143,14 @@ function auxin_get_popular_post_widget_master_array( $master_array ) {
143
  'edit_field_class' => ''
144
  ),
145
  array(
 
 
146
  'param_name' => 'show_excerpt',
147
  'type' => 'aux_switch',
148
  'def_value' => '',
149
  'value' => '1',
150
  'holder' => 'dropdown',
151
  'class' => 'show_excerpt',
152
- 'heading' => __('Display Excerpt','auxin-elements' ),
153
- 'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
154
  'admin_label' => 1,
155
  'dependency' => '',
156
  'weight' => '',
@@ -158,13 +158,13 @@ function auxin_get_popular_post_widget_master_array( $master_array ) {
158
  'edit_field_class' => ''
159
  ),
160
  array(
 
161
  'param_name' => 'show_date',
162
  'type' => 'aux_switch',
163
  'def_value' => '',
164
  'value' => '1',
165
  'holder' => 'dropdown',
166
  'class' => 'show_date',
167
- 'heading' => __('Display post date','auxin-elements' ),
168
  'admin_label' => 1,
169
  'dependency' => '',
170
  'weight' => '',
@@ -172,13 +172,13 @@ function auxin_get_popular_post_widget_master_array( $master_array ) {
172
  'edit_field_class' => ''
173
  ),
174
  array(
 
 
175
  'param_name' => 'excerpt_len',
176
  'type' => 'textfield',
177
  'value' => '60',
178
  'holder' => 'textfield',
179
  'class' => 'excerpt_len',
180
- 'heading' => __('Excerpt Length','auxin-elements' ),
181
- 'description' => __('Specify summary content in character','auxin-elements' ),
182
  'admin_label' => 1,
183
  'dependency' => '',
184
  'weight' => '',
@@ -186,13 +186,13 @@ function auxin_get_popular_post_widget_master_array( $master_array ) {
186
  'edit_field_class' => ''
187
  ),
188
  array(
 
 
189
  'param_name' => 'order_by',
190
  'type' => 'dropdown',
191
  'def_value' => 'date',
192
  'holder' => 'dropdown',
193
  'class' => 'order_by',
194
- 'heading' => __('Order By', 'auxin-elements'),
195
- 'description' => '',
196
  'value' => array (
197
  'date' => __('Date', 'auxin-elements'),
198
  'menu_order date' => __('Menu Order', 'auxin-elements'),
@@ -210,13 +210,13 @@ function auxin_get_popular_post_widget_master_array( $master_array ) {
210
  'edit_field_class' => ''
211
  ),
212
  array(
 
 
213
  'param_name' => 'order',
214
  'type' => 'dropdown',
215
  'def_value' => 'DESC',
216
  'holder' => 'dropdown',
217
  'class' => 'order',
218
- 'heading' => __('Order', 'auxin-elements'),
219
- 'description' => '',
220
  'value' =>array (
221
  'DESC' => __('Descending', 'auxin-elements'),
222
  'ASC' => __('Ascending', 'auxin-elements'),
@@ -258,14 +258,14 @@ function auxin_get_popular_post_widget_master_array( $master_array ) {
258
  // 'edit_field_class' => ''
259
  // ),
260
  array(
 
 
261
  'param_name' => 'extra_classes',
262
  'type' => 'textfield',
263
  'value' => '',
264
  'def_value' => '',
265
  'holder' => 'textfield',
266
  'class' => 'extra_classes',
267
- 'heading' => __('Extra class name','auxin-elements' ),
268
- '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' ),
269
  'admin_label' => true,
270
  'dependency' => '',
271
  'weight' => '',
47
  'as_child' => '',
48
  'params' => array(
49
  array(
50
+ 'heading' => __('Title','auxin-elements' ),
51
+ 'description' => '',
52
  'param_name' => 'title',
53
  'type' => 'textfield',
54
  'std' => '',
55
  'value' => '',
56
  'holder' => 'textfield',
57
  'class' => 'title',
 
 
58
  'admin_label' => true,
59
  'dependency' => '',
60
  'weight' => '',
62
  'edit_field_class' => ''
63
  ),
64
  array(
65
+ 'heading' => __('Number of posts to show', 'auxin-elements'),
66
+ 'description' => '',
67
  'param_name' => 'num',
68
  'type' => 'dropdown',
69
  'def_value' => '4',
70
  'holder' => 'dropdown',
71
  'class' => 'num',
 
 
72
  'value' => array(
73
  '1' => '1' , '2' => '2' , '3' => '3' ,
74
  '4' => '4' , '5' => '5' , '6' => '6',
83
  ),
84
 
85
  array(
86
+ 'heading' => __( 'Display popular tab', 'auxin-elements' ),
87
+ 'description' => __( 'Enable it to display the most popular posts.', 'auxin-elements' ),
88
  'param_name' => 'show_popular',
89
  'type' => 'aux_switch',
90
  'def_value' => '',
91
  'value' => '1',
92
  'holder' => 'dropdown',
93
  'class' => 'show_popular',
 
 
94
  'admin_label' => true,
95
  'dependency' => '',
96
  'weight' => '',
98
  'edit_field_class' => ''
99
  ),
100
  array(
101
+ 'heading' => __( 'Display recent tab', 'auxin-elements' ),
102
+ 'description' => __( 'Enable it to display the most recent posts.', 'auxin-elements' ),
103
  'param_name' => 'show_recent',
104
  'type' => 'aux_switch',
105
  'def_value' => '',
106
  'value' => '1',
107
  'holder' => 'dropdown',
108
  'class' => 'show_recent',
 
 
109
  'admin_label' => true,
110
  'dependency' => '',
111
  'weight' => '',
113
  'edit_field_class' => ''
114
  ),
115
  array(
116
+ 'heading' => __( 'Display comment tab', 'auxin-elements' ),
117
+ 'description' => __( 'Enable it to display the most commented posts.', 'auxin-elements' ),
118
  'param_name' => 'show_comment',
119
  'type' => 'aux_switch',
120
  'def_value' => '',
121
  'value' => '1',
122
  'holder' => 'dropdown',
123
  'class' => 'show_comment',
 
 
124
  'admin_label' => true,
125
  'dependency' => '',
126
  'weight' => '',
128
  'edit_field_class' => ''
129
  ),
130
  array(
131
+ 'heading' => __('Display image', 'auxin-elements' ),
132
+ 'description' => __('Enable it to display images as well.','auxin-elements' ),
133
  'param_name' => 'show_media',
134
  'type' => 'aux_switch',
135
  'def_value' => '',
136
  'value' => '1',
137
  'holder' => 'dropdown',
138
  'class' => 'show_media',
 
 
139
  'admin_label' => true,
140
  'dependency' => '',
141
  'weight' => '',
143
  'edit_field_class' => ''
144
  ),
145
  array(
146
+ 'heading' => __('Display excerpt','auxin-elements' ),
147
+ 'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
148
  'param_name' => 'show_excerpt',
149
  'type' => 'aux_switch',
150
  'def_value' => '',
151
  'value' => '1',
152
  'holder' => 'dropdown',
153
  'class' => 'show_excerpt',
 
 
154
  'admin_label' => 1,
155
  'dependency' => '',
156
  'weight' => '',
158
  'edit_field_class' => ''
159
  ),
160
  array(
161
+ 'heading' => __('Display post date','auxin-elements' ),
162
  'param_name' => 'show_date',
163
  'type' => 'aux_switch',
164
  'def_value' => '',
165
  'value' => '1',
166
  'holder' => 'dropdown',
167
  'class' => 'show_date',
 
168
  'admin_label' => 1,
169
  'dependency' => '',
170
  'weight' => '',
172
  'edit_field_class' => ''
173
  ),
174
  array(
175
+ 'heading' => __('Excerpt length','auxin-elements' ),
176
+ 'description' => __('Specify summary content in character','auxin-elements' ),
177
  'param_name' => 'excerpt_len',
178
  'type' => 'textfield',
179
  'value' => '60',
180
  'holder' => 'textfield',
181
  'class' => 'excerpt_len',
 
 
182
  'admin_label' => 1,
183
  'dependency' => '',
184
  'weight' => '',
186
  'edit_field_class' => ''
187
  ),
188
  array(
189
+ 'heading' => __('Order by', 'auxin-elements'),
190
+ 'description' => '',
191
  'param_name' => 'order_by',
192
  'type' => 'dropdown',
193
  'def_value' => 'date',
194
  'holder' => 'dropdown',
195
  'class' => 'order_by',
 
 
196
  'value' => array (
197
  'date' => __('Date', 'auxin-elements'),
198
  'menu_order date' => __('Menu Order', 'auxin-elements'),
210
  'edit_field_class' => ''
211
  ),
212
  array(
213
+ 'heading' => __('Order', 'auxin-elements'),
214
+ 'description' => '',
215
  'param_name' => 'order',
216
  'type' => 'dropdown',
217
  'def_value' => 'DESC',
218
  'holder' => 'dropdown',
219
  'class' => 'order',
 
 
220
  'value' =>array (
221
  'DESC' => __('Descending', 'auxin-elements'),
222
  'ASC' => __('Ascending', 'auxin-elements'),
258
  // 'edit_field_class' => ''
259
  // ),
260
  array(
261
+ 'heading' => __('Extra class name','auxin-elements' ),
262
+ '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' ),
263
  'param_name' => 'extra_classes',
264
  'type' => 'textfield',
265
  'value' => '',
266
  'def_value' => '',
267
  'holder' => 'textfield',
268
  'class' => 'extra_classes',
 
 
269
  'admin_label' => true,
270
  'dependency' => '',
271
  'weight' => '',
includes/elements/quote.php CHANGED
@@ -67,7 +67,7 @@ function auxin_get_quote_master_array( $master_array ) {
67
  'edit_field_class' => ''
68
  ),
69
  array(
70
- 'heading' => __('Blockqoute Style','auxin-elements' ),
71
  'description' => '',
72
  'param_name' => 'type',
73
  'type' => 'aux_visual_select',
67
  'edit_field_class' => ''
68
  ),
69
  array(
70
+ 'heading' => __('Blockqoute style','auxin-elements' ),
71
  'description' => '',
72
  'param_name' => 'type',
73
  'type' => 'aux_visual_select',
includes/elements/recent-posts-grid-carousel.php ADDED
@@ -0,0 +1,892 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Code highlighter element
4
+ *
5
+ *
6
+ * @package auxin-elements
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 ) {
14
+
15
+ $categories = get_terms( 'category', 'orderby=count&hide_empty=0' );
16
+ $categories_list = array( '' => __('All Categories', 'auxin-elements' ) ) ;
17
+ foreach ( $categories as $key => $value ) {
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'] = array(
29
+ 'name' => __('[Phlox] Grid & Carousel Recent Posts', 'auxin-elements' ),
30
+ 'auxin_output_callback' => 'auxin_widget_recent_posts_callback',
31
+ 'base' => 'aux_recent_posts',
32
+ 'description' => __('It adds recent posts in grid or carousel mode.', 'auxin-elements' ),
33
+ 'class' => 'aux-widget-recent-posts',
34
+ 'show_settings_on_create' => true,
35
+ 'weight' => 1,
36
+ 'is_widget' => false,
37
+ 'is_shortcode' => true,
38
+ 'is_so' => true,
39
+ 'is_vc' => true,
40
+ 'category' => THEME_NAME,
41
+ 'group' => '',
42
+ 'admin_enqueue_js' => '',
43
+ 'admin_enqueue_css' => '',
44
+ 'front_enqueue_js' => '',
45
+ 'front_enqueue_css' => '',
46
+ 'icon' => 'auxin-element auxin-grid',
47
+ 'custom_markup' => '',
48
+ 'js_view' => '',
49
+ 'html_template' => '',
50
+ 'deprecated' => '',
51
+ 'content_element' => '',
52
+ 'as_parent' => '',
53
+ 'as_child' => '',
54
+ 'params' => array(
55
+ array(
56
+ 'heading' => __('Title','auxin-elements' ),
57
+ 'description' => __('Recent post title, leave it empty if you don`t need title.', 'auxin-elements'),
58
+ 'param_name' => 'title',
59
+ 'type' => 'textfield',
60
+ 'std' => '',
61
+ 'value' => '',
62
+ 'holder' => 'textfield',
63
+ 'class' => 'title',
64
+ 'admin_label' => true,
65
+ 'dependency' => '',
66
+ 'weight' => '',
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' ),
92
+ 'param_name' => 'cat',
93
+ 'type' => 'dropdown',
94
+ 'def_value' => '',
95
+ 'holder' => 'dropdown',
96
+ 'class' => 'cat',
97
+ 'value' => $categories_list,
98
+ 'admin_label' => true,
99
+ 'dependency' => '',
100
+ 'weight' => '',
101
+ 'group' => '' ,
102
+ 'edit_field_class' => ''
103
+ ),
104
+
105
+ array(
106
+ 'heading' => __('Number of posts to show', 'auxin-elements'),
107
+ 'description' => '',
108
+ 'param_name' => 'num',
109
+ 'type' => 'textfield',
110
+ 'def_value' => '8',
111
+ 'holder' => 'textfield',
112
+ 'class' => 'num',
113
+ 'admin_label' => true,
114
+ 'dependency' => '',
115
+ 'weight' => '',
116
+ 'group' => '' ,
117
+ 'edit_field_class' => ''
118
+ ),
119
+
120
+ array(
121
+ 'heading' => __('Exclude posts without media','auxin-elements' ),
122
+ 'description' => '',
123
+ 'param_name' => 'exclude_without_media',
124
+ 'type' => 'aux_switch',
125
+ 'value' => '0',
126
+ 'class' => '',
127
+ 'admin_label' => true,
128
+ 'dependency' => '',
129
+ 'weight' => '',
130
+ 'group' => '' ,
131
+ 'edit_field_class' => ''
132
+ ),
133
+
134
+ array(
135
+ 'heading' => __('Exclude custom post formats','auxin-elements' ),
136
+ 'description' => '',
137
+ 'param_name' => 'exclude_custom_post_formats',
138
+ 'type' => 'aux_switch',
139
+ 'value' => '0',
140
+ 'class' => '',
141
+ 'admin_label' => true,
142
+ 'dependency' => '',
143
+ 'weight' => '',
144
+ 'group' => '' ,
145
+ 'edit_field_class' => ''
146
+ ),
147
+
148
+ array(
149
+ 'heading' => __('Exclude qoute and link post formats','auxin-elements' ),
150
+ 'description' => '',
151
+ 'param_name' => 'exclude_qoute_link',
152
+ 'type' => 'aux_switch',
153
+ 'value' => '0',
154
+ 'class' => '',
155
+ 'admin_label' => true,
156
+ 'dependency' => array(
157
+ 'element' => 'exclude_custom_post_formats',
158
+ 'value' => '0'
159
+ ),
160
+ 'weight' => '',
161
+ 'group' => '' ,
162
+ 'edit_field_class' => ''
163
+ ),
164
+
165
+ array(
166
+ 'heading' => __('Exclude posts','auxin-elements' ),
167
+ 'description' => __('Post IDs separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
168
+ 'param_name' => 'exclude',
169
+ 'type' => 'textfield',
170
+ 'value' => '',
171
+ 'holder' => 'textfield',
172
+ 'class' => '',
173
+ 'admin_label' => true,
174
+ 'dependency' => '',
175
+ 'weight' => '',
176
+ 'group' => '' ,
177
+ 'edit_field_class' => ''
178
+ ),
179
+ array(
180
+ 'heading' => __('Include posts','auxin-elements' ),
181
+ 'description' => __('Post IDs separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
182
+ 'param_name' => 'include',
183
+ 'type' => 'textfield',
184
+ 'value' => '',
185
+ 'holder' => 'textfield',
186
+ 'class' => '',
187
+ 'admin_label' => true,
188
+ 'dependency' => '',
189
+ 'weight' => '',
190
+ 'group' => '' ,
191
+ 'edit_field_class' => ''
192
+ ),
193
+ array(
194
+ 'heading' => __('Order by', 'auxin-elements'),
195
+ 'description' => '',
196
+ 'param_name' => 'order_by',
197
+ 'type' => 'dropdown',
198
+ 'def_value' => 'date',
199
+ 'holder' => 'dropdown',
200
+ 'class' => 'order_by',
201
+ 'value' => array (
202
+ 'date' => __('Date', 'auxin-elements'),
203
+ 'menu_order date' => __('Menu Order', 'auxin-elements'),
204
+ 'title' => __('Title', 'auxin-elements'),
205
+ 'ID' => __('ID', 'auxin-elements'),
206
+ 'rand' => __('Random', 'auxin-elements'),
207
+ 'comment_count' => __('Comments', 'auxin-elements'),
208
+ 'modified' => __('Date Modified', 'auxin-elements'),
209
+ 'author' => __('Author', 'auxin-elements'),
210
+ ),
211
+ 'admin_label' => true,
212
+ 'dependency' => '',
213
+ 'weight' => '',
214
+ 'group' => '' ,
215
+ 'edit_field_class' => ''
216
+ ),
217
+ array(
218
+ 'heading' => __('Order', 'auxin-elements'),
219
+ 'description' => '',
220
+ 'param_name' => 'order',
221
+ 'type' => 'dropdown',
222
+ 'def_value' => 'DESC',
223
+ 'holder' => 'dropdown',
224
+ 'class' => 'order',
225
+ 'value' =>array (
226
+ 'DESC' => __('Descending', 'auxin-elements'),
227
+ 'ASC' => __('Ascending', 'auxin-elements'),
228
+ ),
229
+ 'admin_label' => true,
230
+ 'dependency' => '',
231
+ 'weight' => '',
232
+ 'group' => '' ,
233
+ 'edit_field_class' => ''
234
+ ),
235
+
236
+ array(
237
+ 'heading' => __('Start offset','auxin-elements' ),
238
+ 'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
239
+ 'param_name' => 'offset',
240
+ 'type' => 'textfield',
241
+ 'value' => '',
242
+ 'holder' => 'textfield',
243
+ 'class' => '',
244
+ 'admin_label' => true,
245
+ 'dependency' => '',
246
+ 'weight' => '',
247
+ 'group' => '' ,
248
+ 'edit_field_class' => ''
249
+ ),
250
+
251
+ array(
252
+ 'heading' => __('Display post media (image, video, etc)', 'auxin-elements' ),
253
+ 'param_name' => 'show_media',
254
+ 'type' => 'aux_switch',
255
+ 'def_value' => '',
256
+ 'value' => '1',
257
+ 'holder' => 'dropdown',
258
+ 'class' => 'show_media',
259
+ 'admin_label' => true,
260
+ 'dependency' => '',
261
+ 'weight' => '',
262
+ 'group' => '' ,
263
+ 'edit_field_class' => ''
264
+ ),
265
+
266
+ array(
267
+ 'heading' => __('Image aspect ratio', 'auxin-elements'),
268
+ 'description' => '',
269
+ 'param_name' => 'image_aspect_ratio',
270
+ 'type' => 'dropdown',
271
+ 'def_value' => '0.75',
272
+ 'holder' => 'dropdown',
273
+ 'class' => 'order',
274
+ 'value' =>array (
275
+ '0.75' => __('Horizontal 4:3' , 'auxin-elements'),
276
+ '0.56' => __('Horizontal 16:9', 'auxin-elements'),
277
+ '1.00' => __('Square 1:1' , 'auxin-elements'),
278
+ '1.33' => __('Vertical 3:4' , 'auxin-elements')
279
+ ),
280
+ 'admin_label' => true,
281
+ 'dependency' => '',
282
+ 'weight' => '',
283
+ 'group' => '' ,
284
+ 'edit_field_class' => ''
285
+ ),
286
+
287
+ array(
288
+ 'heading' => __('Insert post title','auxin-elements' ),
289
+ 'description' => '',
290
+ 'param_name' => 'show_title',
291
+ 'type' => 'aux_switch',
292
+ 'value' => '1',
293
+ 'class' => '',
294
+ 'admin_label' => true,
295
+ 'dependency' => '',
296
+ 'weight' => '',
297
+ 'group' => '' ,
298
+ 'edit_field_class' => ''
299
+ ),
300
+
301
+ array(
302
+ 'heading' => __('Insert post meta','auxin-elements' ),
303
+ 'description' => '',
304
+ 'param_name' => 'show_info',
305
+ 'type' => 'aux_switch',
306
+ 'value' => '1',
307
+ 'class' => '',
308
+ 'admin_label' => true,
309
+ 'weight' => '',
310
+ 'group' => '' ,
311
+ 'edit_field_class' => ''
312
+ ),
313
+
314
+ array(
315
+ 'heading' => __('Display like button','auxin-elements' ),
316
+ 'description' => sprintf(__('Enable it to display %s like button%s on gride template blog. Please note WP Ulike plugin needs to be activaited to use this option.', 'auxin-elements'), '<strong>', '</strong>'),
317
+ 'param_name' => 'display_like',
318
+ 'type' => 'aux_switch',
319
+ 'value' => '1',
320
+ 'holder' => 'dropdown',
321
+ 'class' => 'display_like',
322
+ 'admin_label' => 1,
323
+ 'dependency' => '',
324
+ 'weight' => '',
325
+ 'group' => '' ,
326
+ 'edit_field_class' => ''
327
+ ),
328
+
329
+ array(
330
+ 'heading' => __('Content layout', 'auxin-elements'),
331
+ 'description' => __('Specifies the style of content for each post column.', 'auxin-elements' ),
332
+ 'param_name' => 'content_layout',
333
+ 'type' => 'dropdown',
334
+ 'def_value' => 'default',
335
+ 'holder' => 'dropdown',
336
+ 'class' => 'content_layout',
337
+ 'value' =>array (
338
+ 'default' => __('Full Content', 'auxin-elements'),
339
+ 'entry-boxed' => __('Boxed Content', 'auxin-elements')
340
+ ),
341
+ 'admin_label' => true,
342
+ 'dependency' => '',
343
+ 'weight' => '',
344
+ 'group' => '' ,
345
+ 'edit_field_class' => ''
346
+ ),
347
+
348
+ array(
349
+ 'heading' => __('Excerpt length','auxin-elements' ),
350
+ 'description' => __('Specify summary content in character.','auxin-elements' ),
351
+ 'param_name' => 'excerpt_len',
352
+ 'type' => 'textfield',
353
+ 'value' => '160',
354
+ 'holder' => 'textfield',
355
+ 'class' => 'excerpt_len',
356
+ 'admin_label' => 1,
357
+ 'dependency' => '',
358
+ 'weight' => '',
359
+ 'group' => '' ,
360
+ 'edit_field_class' => ''
361
+ ),
362
+
363
+ array(
364
+ 'heading' => __('Insert read more button','auxin-elements' ),
365
+ 'description' => '',
366
+ 'param_name' => 'show_readmore',
367
+ 'type' => 'aux_switch',
368
+ 'value' => '1',
369
+ 'class' => '',
370
+ 'admin_label' => true,
371
+ 'weight' => '',
372
+ 'group' => '' ,
373
+ 'edit_field_class' => ''
374
+ ),
375
+
376
+ array(
377
+ 'heading' => __('Insert author name in bottom side','auxin-elements' ),
378
+ 'description' => '',
379
+ 'param_name' => 'show_author_footer',
380
+ 'type' => 'aux_switch',
381
+ 'value' => '1',
382
+ 'class' => '',
383
+ 'dependency' => array(
384
+ 'element' => 'show_readmore',
385
+ 'value' => '0'
386
+ ),
387
+ 'admin_label' => false,
388
+ 'weight' => '',
389
+ 'group' => '' ,
390
+ 'edit_field_class' => ''
391
+ ),
392
+
393
+ array(
394
+ 'heading' => __('Number of columns', 'auxin-elements'),
395
+ 'description' => '',
396
+ 'param_name' => 'desktop_cnum',
397
+ 'type' => 'dropdown',
398
+ 'def_value' => '4',
399
+ 'holder' => 'dropdown',
400
+ 'class' => 'num',
401
+ 'value' => array(
402
+ '1' => '1' , '2' => '2' , '3' => '3' ,
403
+ '4' => '4' , '5' => '5' , '6' => '6'
404
+ ),
405
+ 'admin_label' => true,
406
+ 'dependency' => '',
407
+ 'weight' => '',
408
+ 'group' => 'Layout' ,
409
+ 'edit_field_class' => ''
410
+ ),
411
+
412
+ array(
413
+ 'heading' => __('Number of columns in tablet size', 'auxin-elements'),
414
+ 'description' => '',
415
+ 'param_name' => 'tablet_cnum',
416
+ 'type' => 'dropdown',
417
+ 'def_value' => 'inherit',
418
+ 'holder' => 'dropdown',
419
+ 'class' => 'num',
420
+ 'value' => array(
421
+ 'inherit' => 'Inherited from larger',
422
+ '1' => '1' , '2' => '2' , '3' => '3' ,
423
+ '4' => '4'
424
+ ),
425
+ 'admin_label' => true,
426
+ 'dependency' => '',
427
+ 'weight' => '',
428
+ 'group' => 'Layout' ,
429
+ 'edit_field_class' => ''
430
+ ),
431
+
432
+ array(
433
+ 'heading' => __('Number of columns in phone size', 'auxin-elements'),
434
+ 'description' => '',
435
+ 'param_name' => 'phone_cnum',
436
+ 'type' => 'dropdown',
437
+ 'def_value' => 'inherit',
438
+ 'holder' => 'dropdown',
439
+ 'class' => 'num',
440
+ 'value' => array(
441
+ 'inherit' => 'Inherited from larger',
442
+ '1' => '1' , '2' => '2'
443
+ ),
444
+ 'admin_label' => true,
445
+ 'dependency' => '',
446
+ 'weight' => '',
447
+ 'group' => 'Layout' ,
448
+ 'edit_field_class' => ''
449
+ ),
450
+
451
+ array(
452
+ 'heading' => __('Display items in', 'auxin-elements'),
453
+ 'description' => '',
454
+ 'param_name' => 'preview_mode',
455
+ 'type' => 'dropdown',
456
+ 'def_value' => 'grid',
457
+ 'holder' => 'dropdown',
458
+ 'class' => 'num',
459
+ 'value' => array(
460
+ 'grid' => 'Grid',
461
+ 'carousel' => 'Carousel'
462
+ ),
463
+ 'admin_label' => true,
464
+ 'dependency' => '',
465
+ 'weight' => '',
466
+ 'group' => '' ,
467
+ 'edit_field_class' => ''
468
+ ),
469
+
470
+ // Carousel Options
471
+ array(
472
+ 'heading' => __('Column space','auxin-elements' ),
473
+ 'description' => __('Specifies space between carousel columns in pixels.', 'auxin-elements' ),
474
+ 'param_name' => 'carousel_space',
475
+ 'type' => 'textfield',
476
+ 'value' => '30',
477
+ 'holder' => 'textfield',
478
+ 'class' => 'excerpt_len',
479
+ 'admin_label' => 1,
480
+ 'dependency' => array(
481
+ 'element' => 'preview_mode',
482
+ 'value' => 'carousel'
483
+ ),
484
+ 'weight' => '',
485
+ 'group' => '' ,
486
+ 'edit_field_class' => ''
487
+ ),
488
+
489
+ array(
490
+ 'heading' => __('Navigation type', 'auxin-elements'),
491
+ 'description' => '',
492
+ 'param_name' => 'carousel_navigation',
493
+ 'type' => 'dropdown',
494
+ 'def_value' => 'peritem',
495
+ 'holder' => 'dropdown',
496
+ 'class' => 'num',
497
+ 'value' => array(
498
+ 'peritem' => __('Move per column', 'auxin-elements'),
499
+ 'perpage' => __('Move per page', 'auxin-elements'),
500
+ 'scroll' => __('Smooth scroll', 'auxin-elements'),
501
+ ),
502
+ 'admin_label' => true,
503
+ 'dependency' => array(
504
+ 'element' => 'preview_mode',
505
+ 'value' => 'carousel'
506
+ ),
507
+ 'weight' => '',
508
+ 'group' => '' ,
509
+ 'edit_field_class' => ''
510
+ ),
511
+
512
+ array(
513
+ 'heading' => __('Navigation control', 'auxin-elements'),
514
+ 'description' => '',
515
+ 'param_name' => 'carousel_navigation_control',
516
+ 'type' => 'dropdown',
517
+ 'def_value' => 'arrows',
518
+ 'holder' => 'dropdown',
519
+ 'class' => 'num',
520
+ 'value' => array(
521
+ 'arrows' => __('Arrows', 'auxin-elements'),
522
+ 'bullets' => __('Bullets', 'auxin-elements'),
523
+ '' => __('None', 'auxin-elements'),
524
+ ),
525
+ 'dependency' => array(
526
+ 'element' => 'preview_mode',
527
+ 'value' => 'carousel'
528
+ ),
529
+ 'weight' => '',
530
+ 'group' => '' ,
531
+ 'edit_field_class' => ''
532
+ ),
533
+
534
+ array(
535
+ 'heading' => __('Loop navigation','auxin-elements' ),
536
+ 'description' => '',
537
+ 'param_name' => 'carousel_loop',
538
+ 'type' => 'aux_switch',
539
+ 'value' => '1',
540
+ 'class' => '',
541
+ 'dependency' => array(
542
+ 'element' => 'preview_mode',
543
+ 'value' => 'carousel'
544
+ ),
545
+ 'weight' => '',
546
+ 'group' => '' ,
547
+ 'edit_field_class' => ''
548
+ ),
549
+
550
+ array(
551
+ 'heading' => __('Autoplay carousel','auxin-elements' ),
552
+ 'description' => '',
553
+ 'param_name' => 'carousel_autoplay',
554
+ 'type' => 'aux_switch',
555
+ 'value' => '0',
556
+ 'class' => '',
557
+ 'admin_label' => true,
558
+ 'dependency' => array(
559
+ 'element' => 'preview_mode',
560
+ 'value' => 'carousel'
561
+ ),
562
+ 'weight' => '',
563
+ 'group' => '' ,
564
+ 'edit_field_class' => ''
565
+ ),
566
+
567
+ array(
568
+ 'heading' => __('Autoplay delay','auxin-elements' ),
569
+ 'description' => __('Specifies the delay between auto-forwarding in seconds.', 'auxin-elements' ),
570
+ 'param_name' => 'carousel_autoplay_delay',
571
+ 'type' => 'textfield',
572
+ 'value' => '2',
573
+ 'holder' => 'textfield',
574
+ 'class' => 'excerpt_len',
575
+ 'admin_label' => 1,
576
+ 'dependency' => array(
577
+ array(
578
+ 'element' => 'preview_mode',
579
+ 'value' => 'carousel'
580
+ ),
581
+ array(
582
+ 'element' => 'carousel_autoplay',
583
+ 'value' => 1
584
+ )
585
+ ),
586
+ 'weight' => '',
587
+ 'group' => '' ,
588
+ 'edit_field_class' => ''
589
+ ),
590
+
591
+
592
+ array(
593
+ 'heading' => __('Extra class name','auxin-elements' ),
594
+ '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' ),
595
+ 'param_name' => 'extra_classes',
596
+ 'type' => 'textfield',
597
+ 'value' => '',
598
+ 'def_value' => '',
599
+ 'holder' => 'textfield',
600
+ 'class' => 'extra_classes',
601
+ 'admin_label' => true,
602
+ 'dependency' => '',
603
+ 'weight' => '',
604
+ 'group' => '',
605
+ 'edit_field_class' => ''
606
+ )
607
+ )
608
+ );
609
+
610
+ return $master_array;
611
+ }
612
+
613
+ add_filter( 'auxin_master_array_shortcodes', 'auxin_get_recent_posts_master_array', 10, 1 );
614
+
615
+
616
+
617
+
618
+ /**
619
+ * Element without loop and column
620
+ * The front-end output of this element is returned by the following function
621
+ *
622
+ * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above.
623
+ * @param string $shortcode_content The shorcode content
624
+ * @return string The output of element markup
625
+ */
626
+ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
627
+
628
+ global $aux_content_width;
629
+
630
+ // Defining default attributes
631
+ $default_atts = array(
632
+ 'title' => '', // header title
633
+ 'cat' => '',
634
+ 'num' => '8', // max generated entry
635
+ 'exclude' => '',
636
+ 'include' => '',
637
+ 'posts_per_page' => -1,
638
+ 'offset' => '',
639
+ 'paged' => '',
640
+ 'order_by' => 'menu_order date',
641
+ 'order' => 'desc',
642
+ 'exclude_without_media' => 0,
643
+ 'exclude_custom_post_formats' => 0,
644
+ 'exclude_qoute_link' => 0,
645
+ 'show_media' => true,
646
+ 'display_like' => true,
647
+ 'content_layout' => '', // entry-boxed
648
+ 'excerpt_len' => '160',
649
+ 'show_title' => true,
650
+ 'show_excerpt' => true,
651
+ 'show_info' => true,
652
+ 'show_readmore' => true,
653
+ 'show_author_footer' => false,
654
+ 'image_aspect_ratio' => 0.75,
655
+ 'desktop_cnum' => 4,
656
+ 'tablet_cnum' => 'inherit',
657
+ 'phone_cnum' => 'inherit',
658
+ 'preview_mode' => 'grid',
659
+ 'tag' => '',
660
+ 'extra_classes' => '',
661
+ 'custom_el_id' => '',
662
+ 'carousel_space' => '30',
663
+ 'carousel_autoplay' => false,
664
+ 'carousel_autoplay_delay' => '2',
665
+ 'carousel_navigation' => 'peritem',
666
+ 'carousel_navigation_control' => 'arrows',
667
+ 'carousel_loop' => 1,
668
+ 'reset_query' => true,
669
+ 'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
670
+ 'base_class' => 'aux-widget-recent-posts'
671
+ );
672
+
673
+ $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
674
+ extract( $result['parsed_atts'] );
675
+
676
+ ob_start();
677
+
678
+ global $wp_query;
679
+
680
+ if( ! $use_wp_query ){
681
+
682
+ // create wp_query to get latest items -----------
683
+ $args = array(
684
+ 'post_type' => 'post',
685
+ 'orderby' => $order_by,
686
+ 'order' => $order,
687
+ 'offset' => $offset,
688
+ 'paged' => $paged,
689
+ 'cat' => $cat,
690
+ 'post__not_in' => array_filter( explode( ',', $exclude ) ),
691
+ 'post__in' => array_filter( explode( ',', $include ) ),
692
+ 'post_status' => 'publish',
693
+ 'posts_per_page' => $posts_per_page,
694
+ 'ignore_sticky_posts' => 1
695
+ );
696
+
697
+ $wp_query = new WP_Query( $args );
698
+ }
699
+
700
+ // widget header ------------------------------
701
+ echo $result['widget_header'];
702
+ echo $result['widget_title'];
703
+
704
+
705
+ $phone_break_point = 767;
706
+ $tablet_break_point = 992;
707
+
708
+ $show_comments = true; // shows comments icon
709
+ $post_counter = 0;
710
+ $column_class = '';
711
+ $item_class = 'aux-col';
712
+ $carousel_attrs = '';
713
+
714
+ if ( 'grid' == $preview_mode ) {
715
+ // generate columns class
716
+ $column_class = 'aux-match-height aux-row aux-de-col' . $desktop_cnum;
717
+ $column_class .= 'inherit' != $tablet_cnum ? ' aux-tb-col'.$tablet_cnum : '';
718
+ $column_class .= 'inherit' != $phone_cnum ? ' aux-mb-col'.$phone_cnum : '';
719
+ $column_class .= 'entry-boxed' == $content_layout ? ' aux-entry-boxed' : '';
720
+
721
+ } elseif ( 'carousel' == $preview_mode ) {
722
+ $column_class = 'master-carousel aux-no-js aux-mc-before-init';
723
+ $item_class = 'aux-mc-item';
724
+
725
+ // genereate the master carousel attributes
726
+ $carousel_attrs = 'data-columns="' . $desktop_cnum . '"';
727
+ $carousel_attrs .= ' data-autoplay="' . $carousel_autoplay . '"';
728
+ $carousel_attrs .= ' data-delay="' . $carousel_autoplay_delay . '"';
729
+ $carousel_attrs .= ' data-navigation="' . $carousel_navigation . '"';
730
+ $carousel_attrs .= ' data-space="' . $carousel_space. '"';
731
+ $carousel_attrs .= ' data-loop="' . $carousel_loop . '"';
732
+ $carousel_attrs .= ' data-wrap-controls="true"';
733
+ $carousel_attrs .= ' data-bullets="' . ('bullets' == $carousel_navigation_control ? 'true' : 'false') . '"';
734
+ $carousel_attrs .= ' data-bullet-class="aux-bullets aux-small aux-mask"';
735
+ $carousel_attrs .= ' data-arrows="' . ('arrows' == $carousel_navigation_control ? 'true' : 'false') . '"';
736
+ $carousel_attrs .= ' data-match-height="true"';
737
+
738
+ if ( 'inherit' != $tablet_cnum || 'inherit' != $phone_cnum ) {
739
+ $carousel_attrs .= ' data-responsive="'. ( 'inherit' != $tablet_cnum ? $tablet_break_point . ':' . $tablet_cnum . ',' : '' ).
740
+ ( 'inherit' != $phone_cnum ? $phone_break_point . ':' . $phone_cnum : '' ) . '"';
741
+ }
742
+
743
+ }
744
+
745
+ $column_media_width = auxin_get_content_column_width( $desktop_cnum, 15 );
746
+
747
+ $have_posts = $wp_query->have_posts();
748
+
749
+ if( $have_posts ){
750
+ ?><div class="<?php echo $column_class ?>" <?php echo $carousel_attrs ?>> <?php
751
+ while ( $wp_query->have_posts() ) {
752
+
753
+ // break the loop if it is reached to the limit
754
+ if ( $post_counter < $num ) {
755
+ $post_counter ++;
756
+ } else {
757
+ break;
758
+ }
759
+
760
+ $wp_query->the_post();
761
+ $post = $wp_query->post;
762
+
763
+ $post_vars = auxin_get_post_format_media(
764
+ $post,
765
+ array(
766
+ 'request_from' => 'archive',
767
+ 'media_width' => $phone_break_point,
768
+ 'media_size' => 'large',//array( 'width' => $column_media_width, 'height' => $column_media_width * $image_aspect_ratio ),
769
+ 'upscale_image' => true,
770
+ 'image_from_content' => ! $exclude_without_media, // whether to try to get image from content or not
771
+ 'no_gallery' => 'carousel' == $preview_mode,
772
+ 'add_image_hw' => false, // whether add width and height attr or not
773
+ 'image_sizes' => array(
774
+ array( 'min' => '', 'max' => '767px', 'width' => '80vw' ),
775
+ array( 'min' => '768px', 'max' => '992px', 'width' => '40vw' ),
776
+ array( 'min' => '' , 'max' => '', 'width' => $column_media_width.'px' )
777
+ ),
778
+ 'srcset_sizes' => array(
779
+ array( 'width' => $column_media_width, 'height' => $column_media_width * $image_aspect_ratio ),
780
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width * $image_aspect_ratio ),
781
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width * $image_aspect_ratio )
782
+ )
783
+ )
784
+ );
785
+
786
+ extract( $post_vars );
787
+
788
+ $the_format = get_post_format( $post );
789
+
790
+ if(
791
+ ( $exclude_custom_post_formats && !empty( $the_format ) ) ||
792
+ ( $exclude_qoute_link && ( 'link' == $the_format || 'quote' == $the_format ) ) ||
793
+ ( $exclude_without_media && ! $has_attach )
794
+ ){
795
+ $post_counter --;
796
+ continue;
797
+ }
798
+
799
+ ?>
800
+ <div class="<?php echo $item_class ?>">
801
+ <?php include( locate_template( 'templates/theme-parts/entry/post-column.php' ) ); ?>
802
+ </div>
803
+ <?php
804
+ }
805
+
806
+ if ( 'carousel' == $preview_mode && 'arrows' == $carousel_navigation_control ) {
807
+ ?>
808
+ <div class="aux-carousel-controls">
809
+ <div class="aux-next-arrow aux-arrow-nav aux-outline aux-hover-fill">
810
+ <span class="aux-svg-arrow aux-small-right"></span>
811
+ <span class="aux-hover-arrow aux-white aux-svg-arrow aux-small-right"></span>
812
+ </div>
813
+ <div class="aux-prev-arrow aux-arrow-nav aux-outline aux-hover-fill">
814
+ <span class="aux-svg-arrow aux-small-left"></span>
815
+ <span class="aux-hover-arrow aux-white aux-svg-arrow aux-small-left"></span>
816
+ </div>
817
+ </div>
818
+ <?php
819
+ }
820
+
821
+ // use it as data attribute on load more button
822
+ $ajax_nonce = wp_create_nonce( 'post-recent-grid-nonce' );
823
+
824
+ ?>
825
+ </div>
826
+ <?php
827
+ }
828
+
829
+ if( $reset_query ){
830
+ wp_reset_query();
831
+ }
832
+
833
+ // return false if no result found
834
+ if( ! $have_posts ){
835
+ ob_get_clean();
836
+ return false;
837
+ }
838
+
839
+ // widget footer ------------------------------
840
+ echo $result['widget_footer'];
841
+
842
+ return ob_get_clean();
843
+ }
844
+
845
+
846
+
847
+
848
+ /**
849
+ * Retrieves the markup of a recent post grid
850
+ *
851
+ * AJAX Handler: recent-post-grid
852
+ *
853
+ * Sample Ajax call:
854
+ (function($){
855
+ $.ajax({
856
+ type : "post",
857
+ url : auxin.ajaxurl,
858
+ data : {
859
+ action : "recent-post-grid",
860
+ from : 0,
861
+ to : 10,
862
+ nonce : ''
863
+ },
864
+ success: function(response){
865
+ if(response.type == "success") {
866
+
867
+ } else {
868
+ alert("Your vote could not be added")
869
+ }
870
+ }
871
+ });
872
+ })(jQuery);
873
+ */
874
+ function auxin_widget_recent_posts_grid_ajax_callback(){
875
+
876
+ if( empty( $_POST['action'] ) ){
877
+ wp_send_json_error( __( 'Action handler not found.', 'auxin-elements' ) );
878
+ } else if( ! wp_verify_nonce( $_POST['nonce'], 'post-recent-grid-nonce' ) ){
879
+ wp_send_json_error( __( 'Authorization failed.', 'auxin-elements' ) );
880
+ }
881
+
882
+ $from = $_POST['from'];
883
+ $to = $_POST['to'];
884
+
885
+ //wp_send_json_success( array() );
886
+
887
+ //wp_send_json_error( __( 'An error occurred.', 'auxin-elements' ) );
888
+ }
889
+
890
+ add_action( 'wp_ajax_recent-post-grid', 'auxin_widget_recent_posts_grid_ajax_callback' );
891
+
892
+
includes/elements/recent-posts-land-style.php ADDED
@@ -0,0 +1,562 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Code highlighter element
4
+ *
5
+ *
6
+ * @package auxin-elements
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 ) {
14
+
15
+ $categories = get_terms( 'category', 'orderby=count&hide_empty=0' );
16
+ $categories_list = array( ' ' => __('All Categories', 'auxin-elements' ) ) ;
17
+ foreach ( $categories as $key => $value ) {
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_land_style'] = array(
29
+ 'name' => __('[Phlox] Land Style Recent Posts', 'auxin-elements' ),
30
+ 'auxin_output_callback' => 'auxin_widget_recent_posts_land_style_callback',
31
+ 'base' => 'aux_recent_posts_land_style',
32
+ 'description' => __('It adds recent posts in land style.', 'auxin-elements' ),
33
+ 'class' => 'aux-widget-recent-posts-land',
34
+ 'show_settings_on_create' => true,
35
+ 'weight' => 1,
36
+ 'is_widget' => false,
37
+ 'is_shortcode' => true,
38
+ 'is_so' => true,
39
+ 'is_vc' => true,
40
+ 'category' => THEME_NAME,
41
+ 'group' => '',
42
+ 'admin_enqueue_js' => '',
43
+ 'admin_enqueue_css' => '',
44
+ 'front_enqueue_js' => '',
45
+ 'front_enqueue_css' => '',
46
+ 'icon' => 'auxin-element auxin-land',
47
+ 'custom_markup' => '',
48
+ 'js_view' => '',
49
+ 'html_template' => '',
50
+ 'deprecated' => '',
51
+ 'content_element' => '',
52
+ 'as_parent' => '',
53
+ 'as_child' => '',
54
+ 'params' => array(
55
+ array(
56
+ 'heading' => __('Title','auxin-elements' ),
57
+ 'description' => __('Recent post title, leave it empty if you don`t need title.', 'auxin-elements'),
58
+ 'param_name' => 'title',
59
+ 'type' => 'textfield',
60
+ 'std' => '',
61
+ 'value' => '',
62
+ 'holder' => 'textfield',
63
+ 'class' => 'title',
64
+ 'admin_label' => true,
65
+ 'dependency' => '',
66
+ 'weight' => '',
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' ),
92
+ 'param_name' => 'cat',
93
+ 'type' => 'dropdown',
94
+ 'def_value' => '',
95
+ 'holder' => 'dropdown',
96
+ 'class' => 'cat',
97
+ 'value' => $categories_list,
98
+ 'admin_label' => true,
99
+ 'dependency' => '',
100
+ 'weight' => '',
101
+ 'group' => '' ,
102
+ 'edit_field_class' => ''
103
+ ),
104
+
105
+ array(
106
+ 'heading' => __('Number of posts to show', 'auxin-elements'),
107
+ 'description' => '',
108
+ 'param_name' => 'num',
109
+ 'type' => 'textfield',
110
+ 'def_value' => '8',
111
+ 'holder' => 'textfield',
112
+ 'class' => 'num',
113
+ 'admin_label' => true,
114
+ 'dependency' => '',
115
+ 'weight' => '',
116
+ 'group' => '' ,
117
+ 'edit_field_class' => ''
118
+ ),
119
+
120
+ array(
121
+ 'heading' => __('Exclude posts without media','auxin-elements' ),
122
+ 'description' => '',
123
+ 'param_name' => 'exclude_without_media',
124
+ 'type' => 'aux_switch',
125
+ 'value' => '0',
126
+ 'class' => '',
127
+ 'admin_label' => true,
128
+ 'dependency' => '',
129
+ 'weight' => '',
130
+ 'group' => '' ,
131
+ 'edit_field_class' => ''
132
+ ),
133
+
134
+ array(
135
+ 'heading' => __('Exclude custom post formats','auxin-elements' ),
136
+ 'description' => '',
137
+ 'param_name' => 'exclude_custom_post_formats',
138
+ 'type' => 'aux_switch',
139
+ 'value' => '0',
140
+ 'class' => '',
141
+ 'admin_label' => true,
142
+ 'dependency' => '',
143
+ 'weight' => '',
144
+ 'group' => '' ,
145
+ 'edit_field_class' => ''
146
+ ),
147
+
148
+ array(
149
+ 'heading' => __('Exclude qoute and link post formats','auxin-elements' ),
150
+ 'description' => '',
151
+ 'param_name' => 'exclude_qoute_link',
152
+ 'type' => 'aux_switch',
153
+ 'value' => '0',
154
+ 'class' => '',
155
+ 'admin_label' => true,
156
+ 'dependency' => array(
157
+ 'element' => 'exclude_custom_post_formats',
158
+ 'value' => '0'
159
+ ),
160
+ 'weight' => '',
161
+ 'group' => '' ,
162
+ 'edit_field_class' => ''
163
+ ),
164
+
165
+ array(
166
+ 'heading' => __('Exclude posts','auxin-elements' ),
167
+ 'description' => __('Post IDs separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
168
+ 'param_name' => 'exclude',
169
+ 'type' => 'textfield',
170
+ 'value' => '',
171
+ 'holder' => 'textfield',
172
+ 'class' => '',
173
+ 'admin_label' => true,
174
+ 'dependency' => '',
175
+ 'weight' => '',
176
+ 'group' => '' ,
177
+ 'edit_field_class' => ''
178
+ ),
179
+ array(
180
+ 'heading' => __('Include posts','auxin-elements' ),
181
+ 'description' => __('Post IDs separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
182
+ 'param_name' => 'include',
183
+ 'type' => 'textfield',
184
+ 'value' => '',
185
+ 'holder' => 'textfield',
186
+ 'class' => '',
187
+ 'admin_label' => true,
188
+ 'dependency' => '',
189
+ 'weight' => '',
190
+ 'group' => '' ,
191
+ 'edit_field_class' => ''
192
+ ),
193
+ array(
194
+ 'heading' => __('Order by', 'auxin-elements'),
195
+ 'description' => '',
196
+ 'param_name' => 'order_by',
197
+ 'type' => 'dropdown',
198
+ 'def_value' => 'date',
199
+ 'holder' => 'dropdown',
200
+ 'class' => 'order_by',
201
+ 'value' => array (
202
+ 'date' => __('Date', 'auxin-elements'),
203
+ 'menu_order date' => __('Menu Order', 'auxin-elements'),
204
+ 'title' => __('Title', 'auxin-elements'),
205
+ 'ID' => __('ID', 'auxin-elements'),
206
+ 'rand' => __('Random', 'auxin-elements'),
207
+ 'comment_count' => __('Comments', 'auxin-elements'),
208
+ 'modified' => __('Date Modified', 'auxin-elements'),
209
+ 'author' => __('Author', 'auxin-elements'),
210
+ ),
211
+ 'admin_label' => true,
212
+ 'dependency' => '',
213
+ 'weight' => '',
214
+ 'group' => '' ,
215
+ 'edit_field_class' => ''
216
+ ),
217
+ array(
218
+ 'heading' => __('Order', 'auxin-elements'),
219
+ 'description' => '',
220
+ 'param_name' => 'order',
221
+ 'type' => 'dropdown',
222
+ 'def_value' => 'DESC',
223
+ 'holder' => 'dropdown',
224
+ 'class' => 'order',
225
+ 'value' =>array (
226
+ 'DESC' => __('Descending', 'auxin-elements'),
227
+ 'ASC' => __('Ascending', 'auxin-elements'),
228
+ ),
229
+ 'admin_label' => true,
230
+ 'dependency' => '',
231
+ 'weight' => '',
232
+ 'group' => '' ,
233
+ 'edit_field_class' => ''
234
+ ),
235
+
236
+ array(
237
+ 'heading' => __('Start offset','auxin-elements' ),
238
+ 'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
239
+ 'param_name' => 'offset',
240
+ 'type' => 'textfield',
241
+ 'value' => '',
242
+ 'holder' => 'textfield',
243
+ 'class' => '',
244
+ 'admin_label' => true,
245
+ 'dependency' => '',
246
+ 'weight' => '',
247
+ 'group' => '' ,
248
+ 'edit_field_class' => ''
249
+ ),
250
+
251
+ array(
252
+ 'heading' => __('Display post media (image, video, etc)', 'auxin-elements' ),
253
+ 'param_name' => 'show_media',
254
+ 'type' => 'aux_switch',
255
+ 'def_value' => '',
256
+ 'value' => '1',
257
+ 'holder' => 'dropdown',
258
+ 'class' => 'show_media',
259
+ 'admin_label' => true,
260
+ 'dependency' => '',
261
+ 'weight' => '',
262
+ 'group' => '' ,
263
+ 'edit_field_class' => ''
264
+ ),
265
+
266
+ array(
267
+ 'heading' => __('Image aspect ratio', 'auxin-elements'),
268
+ 'description' => '',
269
+ 'param_name' => 'image_aspect_ratio',
270
+ 'type' => 'dropdown',
271
+ 'def_value' => '0.75',
272
+ 'holder' => 'dropdown',
273
+ 'class' => 'order',
274
+ 'value' =>array (
275
+ '0.75' => __('Horizontal 4:3' , 'auxin-elements'),
276
+ '0.56' => __('Horizontal 16:9', 'auxin-elements'),
277
+ '1.00' => __('Square 1:1' , 'auxin-elements'),
278
+ '1.33' => __('Vertical 3:4' , 'auxin-elements')
279
+ ),
280
+ 'admin_label' => true,
281
+ 'dependency' => '',
282
+ 'weight' => '',
283
+ 'group' => '' ,
284
+ 'edit_field_class' => ''
285
+ ),
286
+
287
+ array(
288
+ 'heading' => __('Insert post title','auxin-elements' ),
289
+ 'description' => '',
290
+ 'param_name' => 'show_title',
291
+ 'type' => 'aux_switch',
292
+ 'value' => '1',
293
+ 'class' => '',
294
+ 'admin_label' => true,
295
+ 'dependency' => '',
296
+ 'weight' => '',
297
+ 'group' => '' ,
298
+ 'edit_field_class' => ''
299
+ ),
300
+
301
+ array(
302
+ 'heading' => __('Insert post meta','auxin-elements' ),
303
+ 'description' => '',
304
+ 'param_name' => 'show_info',
305
+ 'type' => 'aux_switch',
306
+ 'value' => '1',
307
+ 'class' => '',
308
+ 'admin_label' => true,
309
+ 'weight' => '',
310
+ 'group' => '' ,
311
+ 'edit_field_class' => ''
312
+ ),
313
+
314
+ array(
315
+ 'heading' => __('Display like button','auxin-elements' ),
316
+ 'description' => sprintf(__('Enable it to display %s like button%s on gride template blog. Please note WP Ulike plugin needs to be activaited to use this option.', 'auxin-elements'), '<strong>', '</strong>'),
317
+ 'param_name' => 'display_like',
318
+ 'type' => 'aux_switch',
319
+ 'value' => '1',
320
+ 'holder' => 'dropdown',
321
+ 'class' => 'display_like',
322
+ 'admin_label' => 1,
323
+ 'dependency' => '',
324
+ 'weight' => '',
325
+ 'group' => '' ,
326
+ 'edit_field_class' => ''
327
+ ),
328
+
329
+ array(
330
+ 'heading' => __('Display excerpt','auxin-elements' ),
331
+ 'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
332
+ 'param_name' => 'show_excerpt',
333
+ 'type' => 'aux_switch',
334
+ 'def_value' => '',
335
+ 'value' => '1',
336
+ 'holder' => 'dropdown',
337
+ 'class' => 'show_excerpt',
338
+ 'admin_label' => 1,
339
+ 'dependency' => '',
340
+ 'weight' => '',
341
+ 'group' => '' ,
342
+ 'edit_field_class' => ''
343
+ ),
344
+
345
+ array(
346
+ 'heading' => __('Excerpt length','auxin-elements' ),
347
+ 'description' => __('Specify summary content in character.','auxin-elements' ),
348
+ 'param_name' => 'excerpt_len',
349
+ 'type' => 'textfield',
350
+ 'value' => '160',
351
+ 'holder' => 'textfield',
352
+ 'class' => 'excerpt_len',
353
+ 'admin_label' => 1,
354
+ 'dependency' => array(
355
+ 'element' => 'show_excerpt',
356
+ 'value' => '1'
357
+ ),
358
+ 'weight' => '',
359
+ 'group' => '' ,
360
+ 'edit_field_class' => ''
361
+ ),
362
+
363
+ array(
364
+ 'heading' => __('Insert read more button','auxin-elements' ),
365
+ 'description' => '',
366
+ 'param_name' => 'show_readmore',
367
+ 'type' => 'aux_switch',
368
+ 'value' => '1',
369
+ 'class' => '',
370
+ 'admin_label' => true,
371
+ 'weight' => '',
372
+ 'group' => '' ,
373
+ 'edit_field_class' => ''
374
+ ),
375
+
376
+ array(
377
+ 'heading' => __('Insert author name in bottom side','auxin-elements' ),
378
+ 'description' => '',
379
+ 'param_name' => 'show_author_footer',
380
+ 'type' => 'aux_switch',
381
+ 'value' => '1',
382
+ 'class' => '',
383
+ 'dependency' => array(
384
+ 'element' => 'show_readmore',
385
+ 'value' => '0'
386
+ ),
387
+ 'admin_label' => false,
388
+ 'weight' => '',
389
+ 'group' => '' ,
390
+ 'edit_field_class' => ''
391
+ ),
392
+
393
+ array(
394
+ 'heading' => __('Extra class name','auxin-elements' ),
395
+ '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' ),
396
+ 'param_name' => 'extra_classes',
397
+ 'type' => 'textfield',
398
+ 'value' => '',
399
+ 'def_value' => '',
400
+ 'holder' => 'textfield',
401
+ 'class' => 'extra_classes',
402
+ 'admin_label' => true,
403
+ 'dependency' => '',
404
+ 'weight' => '',
405
+ 'group' => '',
406
+ 'edit_field_class' => ''
407
+ )
408
+ )
409
+ );
410
+
411
+ return $master_array;
412
+ }
413
+
414
+ add_filter( 'auxin_master_array_shortcodes', 'auxin_get_recent_posts_land_master_array', 10, 1 );
415
+
416
+
417
+
418
+
419
+ /**
420
+ * Element without loop and column
421
+ * The front-end output of this element is returned by the following function
422
+ *
423
+ * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above.
424
+ * @param string $shortcode_content The shorcode content
425
+ * @return string The output of element markup
426
+ */
427
+ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_content = null ){
428
+
429
+ global $aux_content_width;
430
+
431
+ // Defining default attributes
432
+ $default_atts = array(
433
+ 'title' => '', // header title
434
+ 'cat' => '',
435
+ 'num' => '8', // max generated entry
436
+ 'exclude' => '',
437
+ 'include' => '',
438
+ 'posts_per_page' => -1,
439
+ 'offset' => '',
440
+ 'paged' => '',
441
+ 'order_by' => 'menu_order date',
442
+ 'order' => 'desc',
443
+ 'content_layout' => 'entry-boxed', // entry-boxed
444
+ 'exclude_without_media' => 0,
445
+ 'exclude_custom_post_formats' => 0,
446
+ 'exclude_qoute_link' => 0,
447
+ 'show_media' => true,
448
+ 'display_like' => true,
449
+ 'show_excerpt' => true,
450
+ 'excerpt_len' => '160',
451
+ 'show_title' => true,
452
+ 'show_info' => true,
453
+ 'show_readmore' => true,
454
+ 'show_author_footer' => false,
455
+ 'image_aspect_ratio' => 0.75,
456
+ 'tag' => '',
457
+ 'extra_classes' => '',
458
+ 'custom_el_id' => '',
459
+ 'reset_query' => true,
460
+ 'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
461
+ 'base_class' => 'aux-widget-recent-posts-land'
462
+ );
463
+
464
+ $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
465
+ extract( $result['parsed_atts'] );
466
+
467
+ ob_start();
468
+ global $wp_query;
469
+
470
+ if( ! $use_wp_query ){
471
+
472
+ // create wp_query to get latest items -----------
473
+ $args = array(
474
+ 'post_type' => 'post',
475
+ 'orderby' => $order_by,
476
+ 'order' => $order,
477
+ 'offset' => $offset,
478
+ 'paged' => $paged,
479
+ 'cat' => $cat,
480
+ 'post__not_in' => array_filter( explode( ',', $exclude ) ),
481
+ 'post__in' => array_filter( explode( ',', $include ) ),
482
+ 'post_status' => 'publish',
483
+ 'posts_per_page' => $posts_per_page,
484
+ 'ignore_sticky_posts' => 1
485
+ );
486
+
487
+ $wp_query = new WP_Query( $args );
488
+ }
489
+
490
+ // widget header ------------------------------
491
+ echo $result['widget_header'];
492
+ echo $result['widget_title'];
493
+
494
+
495
+ $phone_break_point = 767;
496
+ $tablet_break_point = 992;
497
+
498
+ $show_comments = true; // shows comments icon
499
+ $post_counter = 0;
500
+ $wrapper_class = 'aux-blog-land-style';
501
+ $post_classes = 'land-style';
502
+
503
+ // whether any result was found or not
504
+ $have_posts = $wp_query->have_posts();
505
+
506
+ if( $wp_query->have_posts() ){
507
+ ?><div class="<?php echo $wrapper_class ?>" > <?php
508
+ while ( $wp_query->have_posts() ) {
509
+
510
+ // break the loop if it is reached to the limit
511
+ if ( $post_counter < $num ) {
512
+ $post_counter ++;
513
+ } else {
514
+ break;
515
+ }
516
+
517
+ $wp_query->the_post();
518
+ $post = $wp_query->post;
519
+ $post_vars = auxin_get_post_format_media(
520
+ $post,
521
+ array(
522
+ 'request_from' => 'archive',
523
+ 'media_width' => $phone_break_point,
524
+ 'upscale_image' => true
525
+ )
526
+ );
527
+
528
+ extract( $post_vars );
529
+
530
+ $the_format = get_post_format($post);
531
+
532
+ if (
533
+ ( $exclude_custom_post_formats && !empty( $the_format ) ) ||
534
+ ( $exclude_qoute_link && ( 'link' == $the_format || 'quote' == $the_format ) ) ||
535
+ ( $exclude_without_media && !$has_attach )
536
+ ) {
537
+ $post_counter --;
538
+ continue;
539
+ }
540
+
541
+ ?>
542
+ <?php include( locate_template( 'templates/theme-parts/entry/post-land.php' ) ); ?>
543
+ <?php
544
+ }
545
+ ?> </div> <?php
546
+ }
547
+
548
+ if( $reset_query ){
549
+ wp_reset_query();
550
+ }
551
+
552
+ // return false if no result found
553
+ if( ! $have_posts ){
554
+ ob_get_clean();
555
+ return false;
556
+ }
557
+
558
+ // widget footer ------------------------------
559
+ echo $result['widget_footer'];
560
+
561
+ return ob_get_clean();
562
+ }
includes/elements/recent-posts-tiles.php ADDED
@@ -0,0 +1,544 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Code highlighter element
4
+ *
5
+ *
6
+ * @package auxin-elements
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 ) {
14
+
15
+ $categories = get_terms( 'category', 'orderby=count&hide_empty=0' );
16
+ $categories_list = array( '' => __('All Categories', 'auxin-elements' ) ) ;
17
+ foreach ( $categories as $key => $value ) {
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_tiles'] = array(
29
+ 'name' => __('[Phlox] Tiles Recent Posts', 'auxin-elements' ),
30
+ 'auxin_output_callback' => 'auxin_widget_recent_posts_tiles_callback',
31
+ 'base' => 'aux_recent_posts_tiles',
32
+ 'description' => __('It adds recent posts in tiles style.', 'auxin-elements' ),
33
+ 'class' => 'aux-widget-recent-posts-tiles',
34
+ 'show_settings_on_create' => true,
35
+ 'weight' => 1,
36
+ 'is_widget' => false,
37
+ 'is_shortcode' => true,
38
+ 'is_so' => true,
39
+ 'is_vc' => true,
40
+ 'category' => THEME_NAME,
41
+ 'group' => '',
42
+ 'admin_enqueue_js' => '',
43
+ 'admin_enqueue_css' => '',
44
+ 'front_enqueue_js' => '',
45
+ 'front_enqueue_css' => '',
46
+ 'icon' => 'auxin-element auxin-tile',
47
+ 'custom_markup' => '',
48
+ 'js_view' => '',
49
+ 'html_template' => '',
50
+ 'deprecated' => '',
51
+ 'content_element' => '',
52
+ 'as_parent' => '',
53
+ 'as_child' => '',
54
+ 'params' => array(
55
+ array(
56
+ 'heading' => __('Title','auxin-elements' ),
57
+ 'description' => __('Recent post title, leave it empty if you don`t need title.', 'auxin-elements'),
58
+ 'param_name' => 'title',
59
+ 'type' => 'textfield',
60
+ 'std' => '',
61
+ 'value' => '',
62
+ 'holder' => 'textfield',
63
+ 'class' => 'title',
64
+ 'admin_label' => true,
65
+ 'dependency' => '',
66
+ 'weight' => '',
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' ),
92
+ 'param_name' => 'cat',
93
+ 'type' => 'dropdown',
94
+ 'def_value' => '',
95
+ 'holder' => 'dropdown',
96
+ 'class' => 'cat',
97
+ 'value' => $categories_list,
98
+ 'admin_label' => true,
99
+ 'dependency' => '',
100
+ 'weight' => '',
101
+ 'group' => '' ,
102
+ 'edit_field_class' => ''
103
+ ),
104
+
105
+ array(
106
+ 'heading' => __('Number of posts to show', 'auxin-elements'),
107
+ 'description' => '',
108
+ 'param_name' => 'num',
109
+ 'type' => 'textfield',
110
+ 'def_value' => '8',
111
+ 'holder' => 'textfield',
112
+ 'class' => 'num',
113
+ 'admin_label' => true,
114
+ 'dependency' => '',
115
+ 'weight' => '',
116
+ 'group' => '' ,
117
+ 'edit_field_class' => ''
118
+ ),
119
+
120
+ array(
121
+ 'heading' => __('Exclude posts without media','auxin-elements' ),
122
+ 'description' => '',
123
+ 'param_name' => 'exclude_without_media',
124
+ 'type' => 'aux_switch',
125
+ 'value' => '1',
126
+ 'class' => '',
127
+ 'admin_label' => true,
128
+ 'dependency' => '',
129
+ 'weight' => '',
130
+ 'group' => '' ,
131
+ 'edit_field_class' => ''
132
+ ),
133
+
134
+ array(
135
+ 'heading' => __('Exclude custom post formats','auxin-elements' ),
136
+ 'description' => '',
137
+ 'param_name' => 'exclude_custom_post_formats',
138
+ 'type' => 'aux_switch',
139
+ 'value' => '1',
140
+ 'class' => '',
141
+ 'admin_label' => true,
142
+ 'dependency' => '',
143
+ 'weight' => '',
144
+ 'group' => '' ,
145
+ 'edit_field_class' => ''
146
+ ),
147
+
148
+ array(
149
+ 'heading' => __('Exclude qoute and link post formats','auxin-elements' ),
150
+ 'description' => '',
151
+ 'param_name' => 'exclude_qoute_link',
152
+ 'type' => 'aux_switch',
153
+ 'value' => '1',
154
+ 'class' => '',
155
+ 'admin_label' => true,
156
+ 'dependency' => array(
157
+ 'element' => 'exclude_custom_post_formats',
158
+ 'value' => '0'
159
+ ),
160
+ 'weight' => '',
161
+ 'group' => '' ,
162
+ 'edit_field_class' => ''
163
+ ),
164
+
165
+ array(
166
+ 'heading' => __('Exclude posts','auxin-elements' ),
167
+ 'description' => __('Post IDs separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
168
+ 'param_name' => 'exclude',
169
+ 'type' => 'textfield',
170
+ 'value' => '',
171
+ 'holder' => 'textfield',
172
+ 'class' => '',
173
+ 'admin_label' => true,
174
+ 'dependency' => '',
175
+ 'weight' => '',
176
+ 'group' => '' ,
177
+ 'edit_field_class' => ''
178
+ ),
179
+ array(
180
+ 'heading' => __('Include posts','auxin-elements' ),
181
+ 'description' => __('Post IDs separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
182
+ 'param_name' => 'include',
183
+ 'type' => 'textfield',
184
+ 'value' => '',
185
+ 'holder' => 'textfield',
186
+ 'class' => '',
187
+ 'admin_label' => true,
188
+ 'dependency' => '',
189
+ 'weight' => '',
190
+ 'group' => '' ,
191
+ 'edit_field_class' => ''
192
+ ),
193
+ array(
194
+ 'heading' => __('Order by', 'auxin-elements'),
195
+ 'description' => '',
196
+ 'param_name' => 'order_by',
197
+ 'type' => 'dropdown',
198
+ 'def_value' => 'date',
199
+ 'holder' => 'dropdown',
200
+ 'class' => 'order_by',
201
+ 'value' => array (
202
+ 'date' => __('Date', 'auxin-elements'),
203
+ 'menu_order date' => __('Menu Order', 'auxin-elements'),
204
+ 'title' => __('Title', 'auxin-elements'),
205
+ 'ID' => __('ID', 'auxin-elements'),
206
+ 'rand' => __('Random', 'auxin-elements'),
207
+ 'comment_count' => __('Comments', 'auxin-elements'),
208
+ 'modified' => __('Date Modified', 'auxin-elements'),
209
+ 'author' => __('Author', 'auxin-elements'),
210
+ ),
211
+ 'admin_label' => true,
212
+ 'dependency' => '',
213
+ 'weight' => '',
214
+ 'group' => '' ,
215
+ 'edit_field_class' => ''
216
+ ),
217
+ array(
218
+ 'heading' => __('Order', 'auxin-elements'),
219
+ 'description' => '',
220
+ 'param_name' => 'order',
221
+ 'type' => 'dropdown',
222
+ 'def_value' => 'DESC',
223
+ 'holder' => 'dropdown',
224
+ 'class' => 'order',
225
+ 'value' =>array (
226
+ 'DESC' => __('Descending', 'auxin-elements'),
227
+ 'ASC' => __('Ascending', 'auxin-elements'),
228
+ ),
229
+ 'admin_label' => true,
230
+ 'dependency' => '',
231
+ 'weight' => '',
232
+ 'group' => '' ,
233
+ 'edit_field_class' => ''
234
+ ),
235
+
236
+ array(
237
+ 'heading' => __('Start offset','auxin-elements' ),
238
+ 'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
239
+ 'param_name' => 'offset',
240
+ 'type' => 'textfield',
241
+ 'value' => '',
242
+ 'holder' => 'textfield',
243
+ 'class' => '',
244
+ 'admin_label' => true,
245
+ 'dependency' => '',
246
+ 'weight' => '',
247
+ 'group' => '' ,
248
+ 'edit_field_class' => ''
249
+ ),
250
+
251
+ array(
252
+ 'heading' => __('Post tile style','auxin-elements' ),
253
+ 'description' => '',
254
+ 'param_name' => 'tile_style',
255
+ 'type' => 'aux_visual_select',
256
+ 'value' => '',
257
+ 'holder' => 'dropdown',
258
+ 'class' => 'tile_style',
259
+ 'admin_label' => true,
260
+ 'dependency' => '',
261
+ 'weight' => '',
262
+ 'group' => 'Style' ,
263
+ 'edit_field_class' => '',
264
+ 'choices' => array(
265
+ '' => array(
266
+ 'label' => __('Standard', 'auxin-elements' ),
267
+ 'image' => AUX_URL . 'images/visual-select/button-normal.svg'
268
+ ),
269
+ 'aux-overlay' => array(
270
+ 'label' => __('Dark', 'auxin-elements' ),
271
+ 'image' => AUX_URL . 'images/visual-select/button-curved.svg'
272
+ )
273
+ )
274
+ ),
275
+
276
+ array(
277
+ 'heading' => __('Insert post title','auxin-elements' ),
278
+ 'description' => '',
279
+ 'param_name' => 'show_title',
280
+ 'type' => 'aux_switch',
281
+ 'value' => '1',
282
+ 'class' => '',
283
+ 'admin_label' => true,
284
+ 'dependency' => '',
285
+ 'weight' => '',
286
+ 'group' => '' ,
287
+ 'edit_field_class' => ''
288
+ ),
289
+
290
+ array(
291
+ 'heading' => __('Insert post meta','auxin-elements' ),
292
+ 'description' => '',
293
+ 'param_name' => 'show_info',
294
+ 'type' => 'aux_switch',
295
+ 'value' => '1',
296
+ 'class' => '',
297
+ 'admin_label' => true,
298
+ 'weight' => '',
299
+ 'group' => '' ,
300
+ 'edit_field_class' => ''
301
+ ),
302
+
303
+ array(
304
+ 'heading' => __('Extra class name','auxin-elements' ),
305
+ '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' ),
306
+ 'param_name' => 'extra_classes',
307
+ 'type' => 'textfield',
308
+ 'value' => '',
309
+ 'def_value' => '',
310
+ 'holder' => 'textfield',
311
+ 'class' => 'extra_classes',
312
+ 'admin_label' => true,
313
+ 'dependency' => '',
314
+ 'weight' => '',
315
+ 'group' => '',
316
+ 'edit_field_class' => ''
317
+ )
318
+ )
319
+ );
320
+
321
+ return $master_array;
322
+ }
323
+
324
+ add_filter( 'auxin_master_array_shortcodes', 'auxin_get_recent_posts_tiles_master_array', 10, 1 );
325
+
326
+
327
+ /**
328
+ * Element without loop and column
329
+ * The front-end output of this element is returned by the following function
330
+ *
331
+ * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above.
332
+ * @param string $shortcode_content The shorcode content
333
+ * @return string The output of element markup
334
+ */
335
+ function auxin_widget_recent_posts_tiles_callback( $atts, $shortcode_content = null ){
336
+
337
+ global $aux_content_width;
338
+
339
+ // Defining default attributes
340
+ $default_atts = array(
341
+ 'title' => '', // header title
342
+ 'cat' => '',
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',
350
+ 'order' => 'desc',
351
+ 'exclude_without_media' => 1,
352
+ 'exclude_custom_post_formats' => 1,
353
+ 'exclude_qoute_link' => 1,
354
+ 'tile_style' => '',
355
+ 'show_title' => true,
356
+ 'show_info' => true,
357
+ 'extra_classes' => '',
358
+ 'custom_el_id' => '',
359
+ 'reset_query' => true,
360
+ 'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
361
+ 'base_class' => 'aux-widget-recent-posts-tiles'
362
+ );
363
+
364
+ $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
365
+ extract( $result['parsed_atts'] );
366
+
367
+ ob_start();
368
+
369
+ global $wp_query;
370
+
371
+ if( ! $use_wp_query ){
372
+
373
+ // create wp_query to get latest items -----------
374
+ $args = array(
375
+ 'post_type' => 'post',
376
+ 'orderby' => $order_by,
377
+ 'order' => $order,
378
+ 'offset' => $offset,
379
+ 'paged' => $paged,
380
+ 'cat' => $cat,
381
+ 'post__not_in' => array_filter( explode( ',', $exclude ) ),
382
+ 'post__in' => array_filter( explode( ',', $include ) ),
383
+ 'post_status' => 'publish',
384
+ 'posts_per_page' => $posts_per_page,
385
+ 'ignore_sticky_posts' => 1
386
+ );
387
+
388
+ $wp_query = new WP_Query( $args );
389
+ }
390
+
391
+ // widget header ------------------------------
392
+ echo $result['widget_header'];
393
+ echo $result['widget_title'];
394
+
395
+ $phone_break_point = 767;
396
+ $tablet_break_point = 992;
397
+
398
+ $show_comments = true; // shows comments icon
399
+ $post_counter = 0;
400
+ $item_class = 'aux-post-tile aux-image-box';
401
+
402
+ $container_class = 'aux-tiles-layout ' . $tile_style;
403
+
404
+ $column_media_width = auxin_get_content_column_width( 4, 0 );
405
+
406
+ $have_posts = $wp_query->have_posts();
407
+
408
+ if( $have_posts ){
409
+ ?><div class="<?php echo $container_class ?>"aux-tiles-layout> <?php
410
+
411
+ while ( $wp_query->have_posts() ) {
412
+
413
+ // break the loop if it xis reached to the limit
414
+ if ( $post_counter < $num ) {
415
+ $post_counter ++;
416
+ } else {
417
+ break;
418
+ }
419
+
420
+ $wp_query->the_post();
421
+ $post = $wp_query->post;
422
+
423
+ $the_format = get_post_format( $post );
424
+ $item_pattern_info = auxin_get_tile_pattern( 'default', $post_counter - 1, $column_media_width );
425
+
426
+ $post_vars = auxin_get_post_format_media(
427
+ $post,
428
+ array(
429
+ 'request_from' => 'archive',
430
+ 'media_width' => $phone_break_point,
431
+ 'media_size' => 'large',
432
+ 'upscale_image' => true,
433
+ 'ignore_formats' => array( '*' ),
434
+ 'add_image_hw' => false, // whether add width and height attr or not
435
+ 'image_sizes' => $item_pattern_info['image_sizes'],
436
+ 'srcset_sizes' => $item_pattern_info['srcset_sizes']
437
+ )
438
+ );
439
+
440
+ extract( $post_vars );
441
+
442
+ if (
443
+ ( $exclude_custom_post_formats && !empty( $the_format ) ) ||
444
+ ( $exclude_qoute_link && ( 'link' == $the_format || 'quote' == $the_format ) ) ||
445
+ ( $exclude_without_media && !$has_attach )
446
+ ) {
447
+ $post_counter --;
448
+ continue;
449
+ }
450
+
451
+
452
+
453
+ $post_classes = $item_class .' '. $item_pattern_info['classname'];
454
+
455
+ include( locate_template( 'templates/theme-parts/entry/post-tile.php' ) );
456
+ }
457
+
458
+ ?> </div> <?php
459
+ }
460
+
461
+ if( $reset_query ){
462
+ wp_reset_query();
463
+ }
464
+
465
+ // return false if no result found
466
+ if( ! $have_posts ){
467
+ ob_get_clean();
468
+ return false;
469
+ }
470
+
471
+ // widget footer ------------------------------
472
+ echo $result['widget_footer'];
473
+
474
+ return ob_get_clean();
475
+ }
476
+
477
+ /**
478
+ * Defines the size of post tile based on pattern and given index
479
+ * @param string $pattern
480
+ * @param int $index
481
+ * @return Array classname, image size
482
+ */
483
+ function auxin_get_tile_pattern( $pattern = 'default', $index, $column_media_width ) {
484
+
485
+ $div_index = $index % 12;
486
+ $return_value = array();
487
+
488
+ switch ( $div_index ) {
489
+
490
+ // large squares
491
+ case 0:
492
+ case 7:
493
+ $return_value = array(
494
+ 'classname' => 'aux-tile-2-2 aux-t-tile-4-2 aux-m-tile-4-2',
495
+ 'image_sizes' => array(
496
+ array( 'min' => '' , 'max' => '992px', 'width' => '100vw' ),
497
+ array( 'min' => '' , 'max' => '', 'width' => '50vw' )
498
+ ),
499
+ 'srcset_sizes' => array(
500
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width ),
501
+ array( 'width' => 992, 'height' => 992 * 0.5 ),
502
+ array( 'width' => 767, 'height' => 766 * 0.5 )
503
+ )
504
+ );
505
+ break;
506
+
507
+ // full width
508
+ case 5:
509
+ case 11:
510
+ $return_value = array(
511
+ 'classname' => 'aux-tile-4-2',
512
+ 'image_sizes' => array(
513
+
514
+ ),
515
+ 'srcset_sizes' => array(
516
+ array( 'width' => $column_media_width, 'height' => $column_media_width * 0.5),
517
+ array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width * 0.5),
518
+ array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width * 0.5 )
519
+ )
520
+ );
521
+ break;
522
+
523
+ // small squares
524
+ default:
525
+ $return_value = array(
526
+ 'classname' => 'aux-tile-1-1 aux-t-tile-2-2 aux-m-tile-4-2',
527
+ 'image_sizes' => array(
528
+ array( 'min' => '', 'max' => '767px', 'width' => '100vw' ),
529
+ array( 'min' => '' , 'max' => '992px', 'width' => '50vw' ),
530
+ array( 'min' => '' , 'max' => '', 'width' => '25vw' )
531
+ ),
532
+ 'srcset_sizes' => array(
533
+ array( 'width' => $column_media_width, 'height' => $column_media_width ),
534
+ array( 'width' => 992 * 0.5, 'height' => 992 * 0.5 ),
535
+ array( 'width' => 767, 'height' => 766 * 0.5 )
536
+
537
+ )
538
+ );
539
+
540
+ }
541
+
542
+ return $return_value;
543
+ }
544
+
includes/elements/recent-posts-timeline.php CHANGED
@@ -43,7 +43,7 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
43
  'admin_enqueue_css' => '',
44
  'front_enqueue_js' => '',
45
  'front_enqueue_css' => '',
46
- 'icon' => 'auxin-element auxin-code',
47
  'custom_markup' => '',
48
  'js_view' => '',
49
  'html_template' => '',
@@ -54,7 +54,7 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
54
  'params' => array(
55
  array(
56
  'heading' => __('Title','auxin-elements' ),
57
- 'description' => __('Recent post title, leave it empty if you don`t need title.', 'auxin-elements'),
58
  'param_name' => 'title',
59
  'type' => 'textfield',
60
  'std' => '',
@@ -67,9 +67,8 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
67
  'group' => '' ,
68
  'edit_field_class' => ''
69
  ),
70
-
71
- array(
72
- 'heading' => __('Timeline Alignment','auxin-elements' ),
73
  'description' => __('Specifies the alignment of timeline element.', 'auxin-elements'),
74
  'param_name' => 'timeline_alignment',
75
  'type' => 'aux_visual_select',
@@ -95,7 +94,6 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
95
  'group' => '' ,
96
  'edit_field_class' => ''
97
  ),
98
-
99
  // array(
100
  // 'param_name' => 'post_type',
101
  // 'type' => 'dropdown',
@@ -114,15 +112,14 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
114
  // 'group' => '' ,
115
  // 'edit_field_class' => ''
116
  // ),
117
-
118
  array(
 
 
119
  'param_name' => 'cat',
120
  'type' => 'dropdown',
121
  'def_value' => ' ',
122
  'holder' => 'dropdown',
123
  'class' => 'cat',
124
- 'heading' => __('Categories', 'auxin-elements'),
125
- 'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
126
  'value' => $categories_list,
127
  'admin_label' => true,
128
  'dependency' => '',
@@ -130,7 +127,6 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
130
  'group' => '' ,
131
  'edit_field_class' => ''
132
  ),
133
-
134
  array(
135
  'heading' => __('Number of posts to show', 'auxin-elements'),
136
  'description' => '',
@@ -145,7 +141,6 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
145
  'group' => '' ,
146
  'edit_field_class' => ''
147
  ),
148
-
149
  array(
150
  'heading' => __('Exclude posts without media','auxin-elements' ),
151
  'description' => '',
@@ -159,7 +154,6 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
159
  'group' => '' ,
160
  'edit_field_class' => ''
161
  ),
162
-
163
  array(
164
  'heading' => __('Exclude custom post formats','auxin-elements' ),
165
  'description' => '',
@@ -173,7 +167,6 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
173
  'group' => '' ,
174
  'edit_field_class' => ''
175
  ),
176
-
177
  array(
178
  'heading' => __('Exclude qoute and link post formats','auxin-elements' ),
179
  'description' => '',
@@ -190,7 +183,6 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
190
  'group' => '' ,
191
  'edit_field_class' => ''
192
  ),
193
-
194
  array(
195
  'heading' => __('Exclude posts','auxin-elements' ),
196
  'description' => __('Post IDs separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
@@ -220,7 +212,7 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
220
  'edit_field_class' => ''
221
  ),
222
  array(
223
- 'heading' => __('Order By', 'auxin-elements'),
224
  'description' => '',
225
  'param_name' => 'order_by',
226
  'type' => 'dropdown',
@@ -243,7 +235,7 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
243
  'group' => '' ,
244
  'edit_field_class' => ''
245
  ),
246
- array(
247
  'heading' => __('Order', 'auxin-elements'),
248
  'description' => '',
249
  'param_name' => 'order',
@@ -261,7 +253,6 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
261
  'group' => '' ,
262
  'edit_field_class' => ''
263
  ),
264
-
265
  array(
266
  'heading' => __('Start offset','auxin-elements' ),
267
  'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
@@ -276,7 +267,6 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
276
  'group' => '' ,
277
  'edit_field_class' => ''
278
  ),
279
-
280
  array(
281
  'heading' => __('Display post media (image, video, etc)', 'auxin-elements' ),
282
  'param_name' => 'show_media',
@@ -291,7 +281,6 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
291
  'group' => '' ,
292
  'edit_field_class' => ''
293
  ),
294
-
295
  array(
296
  'heading' => __('Insert post title','auxin-elements' ),
297
  'description' => '',
@@ -305,7 +294,6 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
305
  'group' => '' ,
306
  'edit_field_class' => ''
307
  ),
308
-
309
  array(
310
  'heading' => __('Insert post meta','auxin-elements' ),
311
  'description' => '',
@@ -318,9 +306,8 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
318
  'group' => '' ,
319
  'edit_field_class' => ''
320
  ),
321
-
322
  array(
323
- 'heading' => __('Display Excerpt','auxin-elements' ),
324
  'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
325
  'param_name' => 'show_excerpt',
326
  'type' => 'aux_switch',
@@ -334,9 +321,8 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
334
  'group' => '' ,
335
  'edit_field_class' => ''
336
  ),
337
-
338
  array(
339
- 'heading' => __('Excerpt Length','auxin-elements' ),
340
  'description' => __('Specify summary content in character.','auxin-elements' ),
341
  'param_name' => 'excerpt_len',
342
  'type' => 'textfield',
@@ -352,8 +338,6 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
352
  'group' => '' ,
353
  'edit_field_class' => ''
354
  ),
355
-
356
-
357
  array(
358
  'heading' => __('Insert read more button','auxin-elements' ),
359
  'description' => '',
@@ -366,7 +350,6 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
366
  'group' => '' ,
367
  'edit_field_class' => ''
368
  ),
369
-
370
  array(
371
  'heading' => __('Insert author name in bottom side','auxin-elements' ),
372
  'description' => '',
@@ -383,7 +366,6 @@ function auxin_get_recent_posts_timeline_master_array( $master_array ) {
383
  'group' => '' ,
384
  'edit_field_class' => ''
385
  ),
386
-
387
  array(
388
  'heading' => __('Extra class name','auxin-elements' ),
389
  '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' ),
@@ -426,10 +408,9 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
426
  $default_atts = array(
427
  'title' => '', // header title
428
  'cat' => ' ',
429
- 'num' => '4',
430
  'exclude' => '',
431
  'include' => '',
432
- 'include' => '',
433
  'posts_per_page' => -1,
434
  'paged' => '',
435
  'offset' => '',
@@ -446,6 +427,7 @@ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content
446
  'show_readmore' => true,
447
  'show_author_footer' => false,
448
  'timeline_alignment' => 'center',
 
449
  'tag' => '',
450
  'extra_classes' => '',
451
  'custom_el_id' => '',
43
  'admin_enqueue_css' => '',
44
  'front_enqueue_js' => '',
45
  'front_enqueue_css' => '',
46
+ 'icon' => 'auxin-element auxin-timeline',
47
  'custom_markup' => '',
48
  'js_view' => '',
49
  'html_template' => '',
54
  'params' => array(
55
  array(
56
  'heading' => __('Title','auxin-elements' ),
57
+ 'description' => __('Recent post title, leave it empty if you don`t need title.', 'auxin-elements'),
58
  'param_name' => 'title',
59
  'type' => 'textfield',
60
  'std' => '',
67
  'group' => '' ,
68
  'edit_field_class' => ''
69
  ),
70
+ array(
71
+ 'heading' => __('Timeline aignment','auxin-elements' ),
 
72
  'description' => __('Specifies the alignment of timeline element.', 'auxin-elements'),
73
  'param_name' => 'timeline_alignment',
74
  'type' => 'aux_visual_select',
94
  'group' => '' ,
95
  'edit_field_class' => ''
96
  ),
 
97
  // array(
98
  // 'param_name' => 'post_type',
99
  // 'type' => 'dropdown',
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' ),
118
  'param_name' => 'cat',
119
  'type' => 'dropdown',
120
  'def_value' => ' ',
121
  'holder' => 'dropdown',
122
  'class' => 'cat',
 
 
123
  'value' => $categories_list,
124
  'admin_label' => true,
125
  'dependency' => '',
127
  'group' => '' ,
128
  'edit_field_class' => ''
129
  ),
 
130
  array(
131
  'heading' => __('Number of posts to show', 'auxin-elements'),
132
  'description' => '',
141
  'group' => '' ,
142
  'edit_field_class' => ''
143
  ),
 
144
  array(
145
  'heading' => __('Exclude posts without media','auxin-elements' ),
146
  'description' => '',
154
  'group' => '' ,
155
  'edit_field_class' => ''
156
  ),
 
157
  array(
158
  'heading' => __('Exclude custom post formats','auxin-elements' ),
159
  'description' => '',
167
  'group' => '' ,
168
  'edit_field_class' => ''
169
  ),
 
170
  array(
171
  'heading' => __('Exclude qoute and link post formats','auxin-elements' ),
172
  'description' => '',
183
  'group' => '' ,
184
  'edit_field_class' => ''
185
  ),
 
186
  array(
187
  'heading' => __('Exclude posts','auxin-elements' ),
188
  'description' => __('Post IDs separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
212
  'edit_field_class' => ''
213
  ),
214
  array(
215
+ 'heading' => __('Order by', 'auxin-elements'),
216
  'description' => '',
217
  'param_name' => 'order_by',
218
  'type' => 'dropdown',
235
  'group' => '' ,
236
  'edit_field_class' => ''
237
  ),
238
+ array(
239
  'heading' => __('Order', 'auxin-elements'),
240
  'description' => '',
241
  'param_name' => 'order',
253
  'group' => '' ,
254
  'edit_field_class' => ''
255
  ),
 
256
  array(
257
  'heading' => __('Start offset','auxin-elements' ),
258
  'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
267
  'group' => '' ,
268
  'edit_field_class' => ''
269
  ),
 
270
  array(
271
  'heading' => __('Display post media (image, video, etc)', 'auxin-elements' ),
272
  'param_name' => 'show_media',
281
  'group' => '' ,
282
  'edit_field_class' => ''
283
  ),
 
284
  array(
285
  'heading' => __('Insert post title','auxin-elements' ),
286
  'description' => '',
294
  'group' => '' ,
295
  'edit_field_class' => ''
296
  ),
 
297
  array(
298
  'heading' => __('Insert post meta','auxin-elements' ),
299
  'description' => '',
306
  'group' => '' ,
307
  'edit_field_class' => ''
308
  ),
 
309
  array(
310
+ 'heading' => __('Display excerpt','auxin-elements' ),
311
  'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
312
  'param_name' => 'show_excerpt',
313
  'type' => 'aux_switch',
321
  'group' => '' ,
322
  'edit_field_class' => ''
323
  ),
 
324
  array(
325
+ 'heading' => __('Excerpt length','auxin-elements' ),
326
  'description' => __('Specify summary content in character.','auxin-elements' ),
327
  'param_name' => 'excerpt_len',
328
  'type' => 'textfield',
338
  'group' => '' ,
339
  'edit_field_class' => ''
340
  ),
 
 
341
  array(
342
  'heading' => __('Insert read more button','auxin-elements' ),
343
  'description' => '',
350
  'group' => '' ,
351
  'edit_field_class' => ''
352
  ),
 
353
  array(
354
  'heading' => __('Insert author name in bottom side','auxin-elements' ),
355
  'description' => '',
366
  'group' => '' ,
367
  'edit_field_class' => ''
368
  ),
 
369
  array(
370
  'heading' => __('Extra class name','auxin-elements' ),
371
  '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' ),
408
  $default_atts = array(
409
  'title' => '', // header title
410
  'cat' => ' ',
411
+ 'num' => '8',
412
  'exclude' => '',
413
  'include' => '',
 
414
  'posts_per_page' => -1,
415
  'paged' => '',
416
  'offset' => '',
427
  'show_readmore' => true,
428
  'show_author_footer' => false,
429
  'timeline_alignment' => 'center',
430
+ 'display_like' => true,
431
  'tag' => '',
432
  'extra_classes' => '',
433
  'custom_el_id' => '',
includes/elements/recent-posts-widget.php CHANGED
@@ -53,14 +53,14 @@ function auxin_get_recent_post_widget_master_array( $master_array ) {
53
  'as_child' => '',
54
  'params' => array(
55
  array(
 
 
56
  'param_name' => 'title',
57
  'type' => 'textfield',
58
  'std' => '',
59
  'value' => '',
60
  'holder' => 'textfield',
61
  'class' => 'title',
62
- 'heading' => __('Title','auxin-elements' ),
63
- 'description' => '',
64
  'admin_label' => true,
65
  'dependency' => '',
66
  'weight' => '',
@@ -68,13 +68,13 @@ function auxin_get_recent_post_widget_master_array( $master_array ) {
68
  'edit_field_class' => ''
69
  ),
70
  array(
 
 
71
  'param_name' => 'num',
72
  'type' => 'dropdown',
73
  'def_value' => '4',
74
  'holder' => 'dropdown',
75
  'class' => 'num',
76
- 'heading' => __('Number of posts to show', 'auxin-elements'),
77
- 'description' => '',
78
  'value' => array(
79
  '1' => '1' , '2' => '2' , '3' => '3' ,
80
  '4' => '4' , '5' => '5' , '6' => '6',
@@ -88,14 +88,14 @@ function auxin_get_recent_post_widget_master_array( $master_array ) {
88
  'edit_field_class' => ''
89
  ),
90
  array(
 
 
91
  'param_name' => 'show_media',
92
  'type' => 'aux_switch',
93
  'def_value' => '',
94
  'value' => '1',
95
  'holder' => 'dropdown',
96
  'class' => 'show_media',
97
- 'heading' => __('Display Image', 'auxin-elements' ),
98
- 'description' => __('Enable it to display images as well.','auxin-elements' ),
99
  'admin_label' => true,
100
  'dependency' => '',
101
  'weight' => '',
@@ -103,14 +103,14 @@ function auxin_get_recent_post_widget_master_array( $master_array ) {
103
  'edit_field_class' => ''
104
  ),
105
  array(
 
 
106
  'param_name' => 'show_excerpt',
107
  'type' => 'aux_switch',
108
  'def_value' => '',
109
  'value' => '1',
110
  'holder' => 'dropdown',
111
  'class' => 'show_excerpt',
112
- 'heading' => __('Display Excerpt','auxin-elements' ),
113
- 'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
114
  'admin_label' => 1,
115
  'dependency' => '',
116
  'weight' => '',
@@ -118,13 +118,13 @@ function auxin_get_recent_post_widget_master_array( $master_array ) {
118
  'edit_field_class' => ''
119
  ),
120
  array(
 
121
  'param_name' => 'show_date',
122
  'type' => 'aux_switch',
123
  'def_value' => '',
124
  'value' => '1',
125
  'holder' => 'dropdown',
126
  'class' => 'show_date',
127
- 'heading' => __('Display post date','auxin-elements' ),
128
  'admin_label' => 1,
129
  'dependency' => '',
130
  'weight' => '',
@@ -132,13 +132,13 @@ function auxin_get_recent_post_widget_master_array( $master_array ) {
132
  'edit_field_class' => ''
133
  ),
134
  array(
 
 
135
  'param_name' => 'excerpt_len',
136
  'type' => 'textfield',
137
  'value' => '60',
138
  'holder' => 'textfield',
139
  'class' => 'excerpt_len',
140
- 'heading' => __('Excerpt Length','auxin-elements' ),
141
- 'description' => __('Specify summary content in character','auxin-elements' ),
142
  'admin_label' => 1,
143
  'dependency' => '',
144
  'weight' => '',
@@ -146,13 +146,13 @@ function auxin_get_recent_post_widget_master_array( $master_array ) {
146
  'edit_field_class' => ''
147
  ),
148
  array(
 
 
149
  'param_name' => 'order_by',
150
  'type' => 'dropdown',
151
  'def_value' => 'date',
152
  'holder' => 'dropdown',
153
  'class' => 'order_by',
154
- 'heading' => __('Order By', 'auxin-elements'),
155
- 'description' => '',
156
  'value' => array (
157
  'date' => __('Date', 'auxin-elements'),
158
  'menu_order date' => __('Menu Order', 'auxin-elements'),
@@ -170,13 +170,13 @@ function auxin_get_recent_post_widget_master_array( $master_array ) {
170
  'edit_field_class' => ''
171
  ),
172
  array(
 
 
173
  'param_name' => 'order',
174
  'type' => 'dropdown',
175
  'def_value' => 'DESC',
176
  'holder' => 'dropdown',
177
  'class' => 'order',
178
- 'heading' => __('Order', 'auxin-elements'),
179
- 'description' => '',
180
  'value' =>array (
181
  'DESC' => __('Descending', 'auxin-elements'),
182
  'ASC' => __('Ascending', 'auxin-elements'),
@@ -188,13 +188,13 @@ function auxin_get_recent_post_widget_master_array( $master_array ) {
188
  'edit_field_class' => ''
189
  ),
190
  array(
 
 
191
  'param_name' => 'cat',
192
  'type' => 'dropdown',
193
  'def_value' => 'default',
194
  'holder' => 'dropdown',
195
  'class' => 'cat',
196
- 'heading' => __('Categorie', 'auxin-elements'),
197
- 'description' => __('specify a category that you want.', 'auxin-elements' ),
198
  'value' => $categories_list,
199
  'admin_label' => true,
200
  'dependency' => '',
@@ -218,14 +218,14 @@ function auxin_get_recent_post_widget_master_array( $master_array ) {
218
  // 'edit_field_class' => ''
219
  // ),
220
  array(
 
 
221
  'param_name' => 'extra_classes',
222
  'type' => 'textfield',
223
  'value' => '',
224
  'def_value' => '',
225
  'holder' => 'textfield',
226
  'class' => 'extra_classes',
227
- 'heading' => __('Extra class name','auxin-elements' ),
228
- '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' ),
229
  'admin_label' => true,
230
  'dependency' => '',
231
  'weight' => '',
53
  'as_child' => '',
54
  'params' => array(
55
  array(
56
+ 'heading' => __('Title','auxin-elements' ),
57
+ 'description' => '',
58
  'param_name' => 'title',
59
  'type' => 'textfield',
60
  'std' => '',
61
  'value' => '',
62
  'holder' => 'textfield',
63
  'class' => 'title',
 
 
64
  'admin_label' => true,
65
  'dependency' => '',
66
  'weight' => '',
68
  'edit_field_class' => ''
69
  ),
70
  array(
71
+ 'heading' => __('Number of posts to show', 'auxin-elements'),
72
+ 'description' => '',
73
  'param_name' => 'num',
74
  'type' => 'dropdown',
75
  'def_value' => '4',
76
  'holder' => 'dropdown',
77
  'class' => 'num',
 
 
78
  'value' => array(
79
  '1' => '1' , '2' => '2' , '3' => '3' ,
80
  '4' => '4' , '5' => '5' , '6' => '6',
88
  'edit_field_class' => ''
89
  ),
90
  array(
91
+ 'heading' => __('Display image', 'auxin-elements' ),
92
+ 'description' => __('Enable it to display images as well.','auxin-elements' ),
93
  'param_name' => 'show_media',
94
  'type' => 'aux_switch',
95
  'def_value' => '',
96
  'value' => '1',
97
  'holder' => 'dropdown',
98
  'class' => 'show_media',
 
 
99
  'admin_label' => true,
100
  'dependency' => '',
101
  'weight' => '',
103
  'edit_field_class' => ''
104
  ),
105
  array(
106
+ 'heading' => __('Display excerpt','auxin-elements' ),
107
+ 'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
108
  'param_name' => 'show_excerpt',
109
  'type' => 'aux_switch',
110
  'def_value' => '',
111
  'value' => '1',
112
  'holder' => 'dropdown',
113
  'class' => 'show_excerpt',
 
 
114
  'admin_label' => 1,
115
  'dependency' => '',
116
  'weight' => '',
118
  'edit_field_class' => ''
119
  ),
120
  array(
121
+ 'heading' => __('Display post date','auxin-elements' ),
122
  'param_name' => 'show_date',
123
  'type' => 'aux_switch',
124
  'def_value' => '',
125
  'value' => '1',
126
  'holder' => 'dropdown',
127
  'class' => 'show_date',
 
128
  'admin_label' => 1,
129
  'dependency' => '',
130
  'weight' => '',
132
  'edit_field_class' => ''
133
  ),
134
  array(
135
+ 'heading' => __('Excerpt length','auxin-elements' ),
136
+ 'description' => __('Specify summary content in character','auxin-elements' ),
137
  'param_name' => 'excerpt_len',
138
  'type' => 'textfield',
139
  'value' => '60',
140
  'holder' => 'textfield',
141
  'class' => 'excerpt_len',
 
 
142
  'admin_label' => 1,
143
  'dependency' => '',
144
  'weight' => '',
146
  'edit_field_class' => ''
147
  ),
148
  array(
149
+ 'heading' => __('Order by', 'auxin-elements'),
150
+ 'description' => '',
151
  'param_name' => 'order_by',
152
  'type' => 'dropdown',
153
  'def_value' => 'date',
154
  'holder' => 'dropdown',
155
  'class' => 'order_by',
 
 
156
  'value' => array (
157
  'date' => __('Date', 'auxin-elements'),
158
  'menu_order date' => __('Menu Order', 'auxin-elements'),
170
  'edit_field_class' => ''
171
  ),
172
  array(
173
+ 'heading' => __('Order', 'auxin-elements'),
174
+ 'description' => '',
175
  'param_name' => 'order',
176
  'type' => 'dropdown',
177
  'def_value' => 'DESC',
178
  'holder' => 'dropdown',
179
  'class' => 'order',
 
 
180
  'value' =>array (
181
  'DESC' => __('Descending', 'auxin-elements'),
182
  'ASC' => __('Ascending', 'auxin-elements'),
188
  'edit_field_class' => ''
189
  ),
190
  array(
191
+ 'heading' => __('Categorie', 'auxin-elements'),
192
+ 'description' => __('Specify a category that you want.', 'auxin-elements' ),
193
  'param_name' => 'cat',
194
  'type' => 'dropdown',
195
  'def_value' => 'default',
196
  'holder' => 'dropdown',
197
  'class' => 'cat',
 
 
198
  'value' => $categories_list,
199
  'admin_label' => true,
200
  'dependency' => '',
218
  // 'edit_field_class' => ''
219
  // ),
220
  array(
221
+ 'heading' => __('Extra class name','auxin-elements' ),
222
+ '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' ),
223
  'param_name' => 'extra_classes',
224
  'type' => 'textfield',
225
  'value' => '',
226
  'def_value' => '',
227
  'holder' => 'textfield',
228
  'class' => 'extra_classes',
 
 
229
  'admin_label' => true,
230
  'dependency' => '',
231
  'weight' => '',
includes/elements/tabs-api.php ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Tabs element if site origin bundle plugin is activaited
4
+ *
5
+ *
6
+ * @package auxin-elements
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
+
14
+ $master_array['aux_tabs'] = array( // shortcode info here
15
+ 'name' => __('[Phlox] Tabs', 'auxin-elements'),
16
+ 'auxin_output_callback' => 'auxin_widget_tabs_callback',
17
+ 'base' => 'aux_tabs',
18
+ 'description' => __('It adds tabs element.', 'auxin-elements'),
19
+ 'class' => 'aux-widget-tabs',
20
+ 'show_settings_on_create' => true,
21
+ 'so_api' => true,
22
+ 'weight' => 1,
23
+ 'category' => THEME_NAME,
24
+ 'group' => '',
25
+ 'admin_enqueue_js' => '',
26
+ 'admin_enqueue_css' => '',
27
+ 'front_enqueue_js' => '',
28
+ 'front_enqueue_css' => '',
29
+ 'icon' => 'auxin-element auxin-tab',
30
+ 'custom_markup' => '',
31
+ 'js_view' => '',
32
+ 'html_template' => '',
33
+ 'deprecated' => '',
34
+ 'content_element' => '',
35
+ 'as_parent' => '',
36
+ 'as_child' => '',
37
+ 'params' => array(
38
+ array(
39
+ 'heading' => __('Title','auxin-elements'),
40
+ 'description' => __('Tabs title, leave it empty if you don`t need title.', 'auxin-elements'),
41
+ 'param_name' => 'title',
42
+ 'type' => 'textfield',
43
+ 'value' => '',
44
+ 'holder' => 'textfield',
45
+ 'class' => 'title',
46
+ 'admin_label' => true,
47
+ 'dependency' => '',
48
+ 'weight' => '',
49
+ 'group' => '' ,
50
+ 'edit_field_class' => ''
51
+ ),
52
+ array(
53
+ 'heading' => __('Tab label','auxin-elements'),
54
+ 'description' => __('Enter your tab item label.', 'auxin-elements'),
55
+ 'repeater' => 'tabs',
56
+ 'repeater-label' => __('Tabs', 'auxin-elements'),
57
+ 'section-name' => __('Tabs Section', 'auxin-elements'),
58
+ 'param_name' => 'tab_label',
59
+ 'type' => 'textfield',
60
+ 'value' => '',
61
+ 'holder' => 'textfield',
62
+ 'class' => 'tab_label',
63
+ 'admin_label' => true,
64
+ 'dependency' => '',
65
+ 'weight' => '',
66
+ 'group' => '' ,
67
+ 'edit_field_class' => ''
68
+ ),
69
+ array(
70
+ 'heading' => __('Content', 'auxin-elements'),
71
+ 'description' => __('Enter your tab item content.', 'auxin-elements'),
72
+ 'repeater' => 'tabs',
73
+ 'section-name' => __('Tabs section', 'auxin-elements'),
74
+ 'repeater-label' => __('Tabs', 'auxin-elements'),
75
+ 'param_name' => 'content',
76
+ 'type' => 'textarea_html',
77
+ 'value' => '',
78
+ 'def_value' => '',
79
+ 'holder' => 'div',
80
+ 'class' => 'content',
81
+ 'admin_label' => true,
82
+ 'dependency' => '',
83
+ 'weight' => '',
84
+ 'group' => '',
85
+ 'edit_field_class' => ''
86
+ ),
87
+ array(
88
+ 'heading' => __('Extra class name','auxin-elements'),
89
+ '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'),
90
+ 'param_name' => 'extra_classes',
91
+ 'type' => 'textfield',
92
+ 'value' => '',
93
+ 'def_value' => '',
94
+ 'holder' => 'textfield',
95
+ 'class' => 'extra_classes',
96
+ 'admin_label' => true,
97
+ 'dependency' => '',
98
+ 'weight' => '',
99
+ 'group' => '' ,
100
+ 'edit_field_class' => ''
101
+ )
102
+ )
103
+ );
104
+
105
+
106
+ return $master_array;
107
+ }
108
+
109
+ add_filter( 'auxin_master_array_shortcodes', 'auxin_get_tabs_master_array', 10, 1 );
110
+
111
+ /**
112
+ * Sample element markup for front-end
113
+ * In other words, the front-end output of this element is returned by the following function
114
+ *
115
+ *
116
+ * @param array $atts The array containing the parsed values from shortcode,it should be same as defined params above.
117
+ * @param string $shortcode_content The shorcode content
118
+ * @return string The output of element markup
119
+ */
120
+ function auxin_widget_tabs_callback( $atts, $shortcode_content = null ){
121
+
122
+ // Defining default attributes
123
+ $default_atts = array(
124
+ 'title' => '', // header title
125
+ 'tabs' => '', // header title
126
+ 'extra_classes' => '', // custom css class names for this element
127
+ 'custom_el_id' => '', // custom id attribute for this element
128
+ 'base_class' => 'aux-widget-tabs' // base class name for container
129
+ );
130
+
131
+ $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
132
+ extract( $result['parsed_atts'] );
133
+
134
+ ob_start();
135
+
136
+ // widget header ------------------------------
137
+ echo $result['widget_header'];
138
+ echo $result['widget_title'];
139
+
140
+ // widget custom output -----------------------
141
+ $output = '<section class="widget-tabs widget-container bordered">';
142
+ $output .= '<div class="widget-inner ' . $extra_classes . '"> ';
143
+ $tabs_markup = '<ul class="tabs">';
144
+ $tabs_content = '<ul class="tabs-content">';
145
+ foreach ($tabs as $key => $value) {
146
+ $section_title = $value['tab_label'];
147
+ $tabs_markup .= '<li><a href="">' . $section_title . '</a></li>';
148
+ $section_content = $value['content'];
149
+ $tabs_content .= '<li><div class="entry-editor"><p>' . $section_content . '</p></div></li>';
150
+ }
151
+ $tabs_markup .= '</ul>';
152
+ $tabs_content .= '</ul>';
153
+ $output = $output . $tabs_markup . $tabs_content . '</div>' . '</section>';
154
+
155
+ echo $output;
156
+
157
+ // widget footer ------------------------------
158
+ echo $result['widget_footer'];
159
+
160
+ return ob_get_clean();
161
+ }
includes/elements/tabs.php CHANGED
@@ -35,13 +35,13 @@ function auxin_get_tabs_master_array( $master_array ) {
35
  'as_child' => '',
36
  'params' => array(
37
  array(
 
 
38
  'param_name' => 'title',
39
  'type' => 'textfield',
40
  'value' => '',
41
  'holder' => 'textfield',
42
  'class' => 'title',
43
- 'heading' => __('Title','auxin-elements'),
44
- 'description' => __('Tabs title, leave it empty if you don`t need title.', 'auxin-elements'),
45
  'admin_label' => true,
46
  'dependency' => '',
47
  'weight' => '',
@@ -49,14 +49,14 @@ function auxin_get_tabs_master_array( $master_array ) {
49
  'edit_field_class' => ''
50
  ),
51
  array(
 
 
52
  'param_name' => 'content',
53
  'type' => 'textarea_html',
54
  'value' => '',
55
  'def_value' => '',
56
  'holder' => 'div',
57
  'class' => 'content',
58
- 'heading' => __('Content','auxin-elements'),
59
- 'description' => __('Please use below sample for each tab item.<br>[tab_section label="Tab label here" ]Tab content here [/tab_section]', 'auxin-elements'),
60
  'admin_label' => true,
61
  'dependency' => '',
62
  'weight' => '',
@@ -64,14 +64,14 @@ function auxin_get_tabs_master_array( $master_array ) {
64
  'edit_field_class' => ''
65
  ),
66
  array(
 
 
67
  'param_name' => 'extra_classes',
68
  'type' => 'textfield',
69
  'value' => '',
70
  'def_value' => '',
71
  'holder' => 'textfield',
72
  'class' => 'extra_classes',
73
- 'heading' => __('Extra class name','auxin-elements'),
74
- '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'),
75
  'admin_label' => true,
76
  'dependency' => '',
77
  'weight' => '',
35
  'as_child' => '',
36
  'params' => array(
37
  array(
38
+ 'heading' => __('Title','auxin-elements'),
39
+ 'description' => __('Tabs title, leave it empty if you don`t need title.', 'auxin-elements'),
40
  'param_name' => 'title',
41
  'type' => 'textfield',
42
  'value' => '',
43
  'holder' => 'textfield',
44
  'class' => 'title',
 
 
45
  'admin_label' => true,
46
  'dependency' => '',
47
  'weight' => '',
49
  'edit_field_class' => ''
50
  ),
51
  array(
52
+ 'heading' => __('Content','auxin-elements'),
53
+ 'description' => __('Please use below sample for each tab item.<br>[tab_section label="Tab label here" ]Tab content here [/tab_section]', 'auxin-elements'),
54
  'param_name' => 'content',
55
  'type' => 'textarea_html',
56
  'value' => '',
57
  'def_value' => '',
58
  'holder' => 'div',
59
  'class' => 'content',
 
 
60
  'admin_label' => true,
61
  'dependency' => '',
62
  'weight' => '',
64
  'edit_field_class' => ''
65
  ),
66
  array(
67
+ 'heading' => __('Extra class name','auxin-elements'),
68
+ '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'),
69
  'param_name' => 'extra_classes',
70
  'type' => 'textfield',
71
  'value' => '',
72
  'def_value' => '',
73
  'holder' => 'textfield',
74
  'class' => 'extra_classes',
 
 
75
  'admin_label' => true,
76
  'dependency' => '',
77
  'weight' => '',
includes/elements/text.php CHANGED
@@ -56,7 +56,7 @@ function auxin_get_text_master_array( $master_array ) {
56
  'edit_field_class' => ''
57
  ),
58
  array(
59
- 'heading' => __('Title Link','auxin-elements'),
60
  'description' => '',
61
  'param_name' => 'title_link',
62
  'type' => 'textfield',
@@ -71,7 +71,7 @@ function auxin_get_text_master_array( $master_array ) {
71
  'edit_field_class' => ''
72
  ),
73
  array(
74
- 'heading' => __('Text Align','auxin-elements'),
75
  'description' => '',
76
  'param_name' => 'text_align',
77
  'type' => 'aux_visual_select',
@@ -103,7 +103,60 @@ function auxin_get_text_master_array( $master_array ) {
103
  'edit_field_class' => ''
104
  ),
105
  array(
106
- 'heading' => __('Icon','auxin-elements'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  'description' => __('Please choose an icon from avaialable icons.', 'auxin-elements'),
108
  'param_name' => 'icon',
109
  'type' => 'iconpicker',
@@ -118,7 +171,7 @@ function auxin_get_text_master_array( $master_array ) {
118
  'edit_field_class' => ''
119
  ),
120
  array(
121
- 'heading' => __('Icon Color','auxin-elements'),
122
  'description' => __('Choose a color for icon.','auxin-elements'),
123
  'param_name' => 'icon_color',
124
  'type' => 'colorpicker',
@@ -132,6 +185,76 @@ function auxin_get_text_master_array( $master_array ) {
132
  'group' => '' ,
133
  'edit_field_class' => ''
134
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  array(
136
  'heading' => __('Image','auxin-elements'),
137
  'description' => '',
@@ -218,30 +341,60 @@ function auxin_widget_column_callback( $atts, $shortcode_content = null ){
218
 
219
  // Defining default attributes
220
  $default_atts = array(
221
- 'title' => '', // section title
222
- 'title_link' => '', // the link on title
223
- 'content' => '', // the link on title
224
- 'text_align' => '',
225
- 'icon' => '', // icon on column side
226
- 'icon_color' => '#888',
227
- 'image' => '', // image on column side
228
- 'image_position' => 'top', // top,left,right
 
 
 
 
 
 
 
229
 
230
- 'extra_classes' => '', // custom css class names for this element
231
- 'custom_el_id' => '', // custom id attribute for this element
232
- 'base_class' => 'aux-widget-text' // base class name for container
 
 
 
233
  );
234
 
235
- $result = auxin_get_widget_scafold( $atts, $default_atts );
 
 
 
 
 
 
236
  extract( $result['parsed_atts'] );
237
 
238
- $icon = $icon == 'none' ? '' : $icon;
239
- $icon_color = empty( $icon_color ) ? '' : 'style="color:'.$icon_color.' !important;"';
240
- $text_align = empty( $text_align ) ? '' : ' aux-text-align-' . $text_align;
241
- $content = empty( $content ) ? $shortcode_content : $content;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
 
243
  if( ! empty( $image ) && is_numeric( $image ) ) {
244
- $image = auxin_get_the_resized_attachment( $image );
245
  }
246
 
247
  ob_start();
@@ -249,12 +402,16 @@ function auxin_widget_column_callback( $atts, $shortcode_content = null ){
249
  // widget header ------------------------------
250
  echo $result['widget_header'];
251
  ?>
252
- <div class="aux-shape-<?php echo esc_attr( $image_position ) . $text_align . ' ' . $extra_classes; ?>">
253
- <?php if( ! empty( $icon ) && empty( $image ) ) { ?>
254
- <span class="aux-col-icon <?php echo $icon; ?>" <?php echo $icon_color; ?> > </span>
255
- <?php } elseif( !empty( $image ) ) {
 
 
 
256
  echo $image;
257
- } if( ! empty( $title ) && empty( $title_link ) ) { ?>
 
258
  <h4 class="col-title"><?php echo $title; ?></h4>
259
  <?php } elseif( ! empty( $title ) && ! empty( $title_link ) ) { ?>
260
  <h4 class="col-title"><a href="<?php echo $title_link; ?>"><?php echo $title; ?></a></h4>
56
  'edit_field_class' => ''
57
  ),
58
  array(
59
+ 'heading' => __('Title link','auxin-elements'),
60
  'description' => '',
61
  'param_name' => 'title_link',
62
  'type' => 'textfield',
71
  'edit_field_class' => ''
72
  ),
73
  array(
74
+ 'heading' => __('Text align','auxin-elements'),
75
  'description' => '',
76
  'param_name' => 'text_align',
77
  'type' => 'aux_visual_select',
103
  'edit_field_class' => ''
104
  ),
105
  array(
106
+ 'heading' => __('Text color scheme','auxin-elements'),
107
+ 'description' => '',
108
+ 'param_name' => 'text_color_mode',
109
+ 'type' => 'dropdown',
110
+ 'def_value' => 'inherit',
111
+ 'value' => array (
112
+ 'inherit' => __( 'Inherit' , 'auxin-elements' ),
113
+ 'light' => __( 'Light' , 'auxin-elements' ),
114
+ 'dark' => __( 'Dark' , 'auxin-elements' )
115
+ ),
116
+ 'holder' => 'dropdown',
117
+ 'class' => 'text_color_mode',
118
+ 'admin_label' => true,
119
+ 'dependency' => '',
120
+ 'weight' => '',
121
+ 'group' => '' ,
122
+ 'edit_field_class' => ''
123
+ ),
124
+ array(
125
+ 'heading' => __('Wrapper style','auxin-elements'),
126
+ 'description' => '',
127
+ 'param_name' => 'wrapper_style',
128
+ 'type' => 'dropdown',
129
+ 'def_value' => 'simple',
130
+ 'value' => array (
131
+ 'simple' => __( 'Simple' , 'auxin-elements' ),
132
+ 'outline' => __( 'Outlined', 'auxin-elements' ),
133
+ 'box' => __( 'Boxed' , 'auxin-elements' )
134
+ ),
135
+ 'holder' => 'dropdown',
136
+ 'class' => 'wrapper_style',
137
+ 'admin_label' => true,
138
+ 'dependency' => '',
139
+ 'weight' => '',
140
+ 'group' => '' ,
141
+ 'edit_field_class' => ''
142
+ ),
143
+ array(
144
+ 'heading' => __('Block background color','auxin-elements'),
145
+ 'description' => __('Choose a background color for this block.','auxin-elements'),
146
+ 'param_name' => 'wrapper_bg_color',
147
+ 'type' => 'colorpicker',
148
+ 'def_value' => '',
149
+ 'value' => '',
150
+ 'holder' => '',
151
+ 'class' => 'wrapper_bg_color',
152
+ 'admin_label' => true,
153
+ 'dependency' => '',
154
+ 'weight' => '',
155
+ 'group' => '' ,
156
+ 'edit_field_class' => ''
157
+ ),
158
+ array(
159
+ 'heading' => __('Icon', 'auxin-elements' ),
160
  'description' => __('Please choose an icon from avaialable icons.', 'auxin-elements'),
161
  'param_name' => 'icon',
162
  'type' => 'iconpicker',
171
  'edit_field_class' => ''
172
  ),
173
  array(
174
+ 'heading' => __('Icon color','auxin-elements'),
175
  'description' => __('Choose a color for icon.','auxin-elements'),
176
  'param_name' => 'icon_color',
177
  'type' => 'colorpicker',
185
  'group' => '' ,
186
  'edit_field_class' => ''
187
  ),
188
+ array(
189
+ 'heading' => __('Icon size','auxin-elements'),
190
+ 'description' => '',
191
+ 'param_name' => 'icon_size',
192
+ 'type' => 'dropdown',
193
+ 'def_value' => 'large',
194
+ 'value' => array (
195
+ 'small' => __( 'Small' , 'auxin-elements' ),
196
+ 'medium' => __( 'Medium' , 'auxin-elements' ),
197
+ 'large' => __( 'Large' , 'auxin-elements' ),
198
+ 'x-large' => __( 'X-Large' , 'auxin-elements' )
199
+ ),
200
+ 'holder' => 'dropdown',
201
+ 'class' => 'icon_size',
202
+ 'admin_label' => true,
203
+ 'dependency' => '',
204
+ 'weight' => '',
205
+ 'group' => '' ,
206
+ 'edit_field_class' => ''
207
+ ),
208
+ array(
209
+ 'heading' => __('Icon background shape','auxin-elements'),
210
+ 'description' => '',
211
+ 'param_name' => 'icon_shape',
212
+ 'type' => 'dropdown',
213
+ 'def_value' => 'circle',
214
+ 'value' => array (
215
+ 'circle' => __( 'Circle' , 'auxin-elements' ),
216
+ 'semi-circle' => __( 'Semi-Circle' , 'auxin-elements' ),
217
+ 'round-rect' => __( 'Round Rectangle' , 'auxin-elements' ),
218
+ 'rect' => __( 'Rectangle' , 'auxin-elements' )
219
+ ),
220
+ 'holder' => 'dropdown',
221
+ 'class' => 'icon_shape',
222
+ 'admin_label' => true,
223
+ 'dependency' => '',
224
+ 'weight' => '',
225
+ 'group' => '' ,
226
+ 'edit_field_class' => ''
227
+ ),
228
+ array(
229
+ 'heading' => __('Icon background color','auxin-elements'),
230
+ 'description' => __('Choose a color for background of icon.','auxin-elements'),
231
+ 'param_name' => 'icon_bg_color',
232
+ 'type' => 'colorpicker',
233
+ 'def_value' => '',
234
+ 'value' => '',
235
+ 'holder' => '',
236
+ 'class' => 'icon_bg_color',
237
+ 'admin_label' => true,
238
+ 'dependency' => '',
239
+ 'weight' => '',
240
+ 'group' => '' ,
241
+ 'edit_field_class' => ''
242
+ ),
243
+ array(
244
+ 'heading' => __( 'Icon outline color', 'auxin-elements' ),
245
+ 'description' => __( 'Choose a color for the border around the icon.', 'auxin-elements' ),
246
+ 'param_name' => 'icon_border_color',
247
+ 'type' => 'colorpicker',
248
+ 'def_value' => '',
249
+ 'value' => '',
250
+ 'holder' => '',
251
+ 'class' => 'icon_border_color',
252
+ 'admin_label' => true,
253
+ 'dependency' => '',
254
+ 'weight' => '',
255
+ 'group' => '' ,
256
+ 'edit_field_class' => ''
257
+ ),
258
  array(
259
  'heading' => __('Image','auxin-elements'),
260
  'description' => '',
341
 
342
  // Defining default attributes
343
  $default_atts = array(
344
+ 'title' => '', // section title
345
+ 'title_link' => '', // the link on title
346
+ 'content' => '', // the link on title
347
+ 'text_align' => '', // left, right, center
348
+ 'text_color_mode' => 'inherit', // inherit, dark, light
349
+
350
+ 'wrapper_style' => '', // box, outline,
351
+ 'wrapper_bg_color' => '', // box, outline,
352
+
353
+ 'icon' => '', // icon on column side
354
+ 'icon_color' => '#888',
355
+ 'icon_size' => 'large', // small, medium, large, x-large
356
+ 'icon_shape' => 'circle', // circle, semi-circle, round-rect, rect, hexa,
357
+ 'icon_bg_color' => '', // empty mean inherit,
358
+ 'icon_border_color' => '', // color or 'icon' (same color as icon)
359
 
360
+ 'image' => '', // image on column side
361
+ 'image_position' => 'top', // top,left,right
362
+
363
+ 'extra_classes' => '', // custom css class names for this element
364
+ 'custom_el_id' => '', // custom id attribute for this element
365
+ 'base_class' => 'aux-widget-text' // base class name for container
366
  );
367
 
368
+ if( ! empty( $atts['wrapper_style'] ) ){
369
+ $atts['extra_classes'] .= ' aux-wrap-style-' . esc_attr( $atts['wrapper_style'] );
370
+ } else if( ! empty( $default_atts['wrapper_style'] ) ){
371
+ $atts['extra_classes'] .= ' aux-wrap-style-' . esc_attr( $default_atts['wrapper_style'] );
372
+ }
373
+ //axpp( $default_atts['extra_classes'] );
374
+ $result = auxin_get_widget_scafold( $atts, $default_atts );
375
  extract( $result['parsed_atts'] );
376
 
377
+ $icon_border_color = 'icon' == $icon_border_color ? $icon_color : $icon_border_color;
378
+ $content = empty( $content ) ? $shortcode_content : $content;
379
+
380
+ $main_inline_style = empty( $wrapper_bg_color ) ? '' : 'background-color:'.$wrapper_bg_color.' !important;';
381
+ $main_inline_style .= empty( $main_inline_style ) ? '' : ' style="'.$main_inline_style.'";';
382
+ $main_classes = 'aux-text-inner aux-ico-pos-'. ( $image_position ? esc_attr( $image_position ) : 'top' );
383
+ $main_classes .= empty( $text_align ) ? '' : ' aux-text-align-' . esc_attr( $text_align );
384
+ $main_classes .= empty( $text_color_mode ) || 'inherit' == $text_color_mode ? '' : ' aux-text-color-'. esc_attr( $text_color_mode );
385
+
386
+ $icon_box_inline_style = empty( $icon_bg_color ) ? '' : 'background-color:'.$icon_bg_color.' !important;';
387
+ $icon_box_inline_style .= empty( $icon_border_color ) ? '' : 'border-color:'.$icon_border_color.';';
388
+ $icon_box_inline_style .= empty( $icon_box_inline_style ) ? '' : ' style="'.$icon_box_inline_style.'";';
389
+ $icon_box_classes = 'aux-ico-' . esc_attr( $icon_size );
390
+ $icon_box_classes .= ' aux-ico-shape-' . esc_attr( $icon_shape );
391
+
392
+ $icon_classes = empty( $icon ) || $icon == 'none' ? '' : esc_attr( $icon );
393
+ $icon_inline_style = empty( $icon_color ) ? '' : 'style="color:'.$icon_color.' !important;"';
394
+
395
 
396
  if( ! empty( $image ) && is_numeric( $image ) ) {
397
+ $image = auxin_get_the_resized_attachment( $image );
398
  }
399
 
400
  ob_start();
402
  // widget header ------------------------------
403
  echo $result['widget_header'];
404
  ?>
405
+ <div class="<?php echo $main_classes; ?>" <?php echo $main_inline_style; ?>>
406
+ <?php if( ! empty( $icon ) && empty( $image ) ) { ?>
407
+ <div class="aux-ico-box <?php echo $icon_box_classes; ?>" <?php echo $icon_box_inline_style; ?>>
408
+ <span class="aux-ico <?php echo $icon_classes; ?>" <?php echo $icon_inline_style; ?> > </span>
409
+ </div>
410
+ <?php
411
+ } elseif( !empty( $image ) ) {
412
  echo $image;
413
+ } if( ! empty( $title ) && empty( $title_link ) ) {
414
+ ?>
415
  <h4 class="col-title"><?php echo $title; ?></h4>
416
  <?php } elseif( ! empty( $title ) && ! empty( $title_link ) ) { ?>
417
  <h4 class="col-title"><a href="<?php echo $title_link; ?>"><?php echo $title; ?></a></h4>
includes/elements/video.php CHANGED
@@ -123,7 +123,7 @@ function auxin_get_video_master_array( $master_array ) {
123
  'edit_field_class' => ''
124
  ),
125
  array(
126
- 'heading' => __('Video Link','auxin-elements'),
127
  'description' => __('Youtube, Vimeo or any video embed link.','auxin-elements'),
128
  'param_name' => 'url',
129
  'type' => 'textfield',
123
  'edit_field_class' => ''
124
  ),
125
  array(
126
+ 'heading' => __('Video link','auxin-elements'),
127
  'description' => __('Youtube, Vimeo or any video embed link.','auxin-elements'),
128
  'param_name' => 'url',
129
  'type' => 'textfield',
includes/index.php CHANGED
@@ -16,9 +16,19 @@ include_once( 'general-shortcodes.php' );
16
  include_once( 'elements/about-widget.php' );
17
  include_once( 'elements/recent-posts-widget.php' );
18
  include_once( 'elements/popular-posts-widget.php' );
19
- include_once( 'elements/recent-posts.php' );
20
  include_once( 'elements/recent-posts-timeline.php' );
21
- include_once( 'elements/accordion.php' );
 
 
 
 
 
 
 
 
 
 
22
  include_once( 'elements/attachment-url.php' );
23
  include_once( 'elements/audio.php' );
24
  include_once( 'elements/button.php' );
@@ -34,11 +44,18 @@ include_once( 'elements/image.php' );
34
  if( auxin_is_plugin_active( 'instagram-feed/instagram-feed.php' ) ) {
35
  include_once( 'elements/instagram-feed.php' );
36
  }
 
 
 
 
 
 
 
 
37
  include_once( 'elements/latest-posts-slider.php' );
38
  include_once( 'elements/quote.php' );
39
  include_once( 'elements/search.php' );
40
  include_once( 'elements/socials-list.php' );
41
- include_once( 'elements/tabs.php' );
42
  include_once( 'elements/text.php' );
43
  include_once( 'elements/video.php' );
44
  include_once( 'elements/contact-box.php' );
16
  include_once( 'elements/about-widget.php' );
17
  include_once( 'elements/recent-posts-widget.php' );
18
  include_once( 'elements/popular-posts-widget.php' );
19
+ include_once( 'elements/recent-posts-grid-carousel.php' );
20
  include_once( 'elements/recent-posts-timeline.php' );
21
+
22
+ include_once( 'elements/recent-posts-land-style.php' );
23
+ if( auxin_is_plugin_active( 'so-widgets-bundle/so-widgets-bundle.php' ) ) {
24
+ include_once( 'elements/accordion-api.php' );
25
+ include_once( 'elements/tabs-api.php' );
26
+ } else {
27
+ include_once( 'elements/accordion.php' );
28
+ include_once( 'elements/tabs.php' );
29
+ }
30
+
31
+ include_once( 'elements/recent-posts-tiles.php' );
32
  include_once( 'elements/attachment-url.php' );
33
  include_once( 'elements/audio.php' );
34
  include_once( 'elements/button.php' );
44
  if( auxin_is_plugin_active( 'instagram-feed/instagram-feed.php' ) ) {
45
  include_once( 'elements/instagram-feed.php' );
46
  }
47
+ // check if flickr-justified-gallery is activated then it adds its element to page builder and widget
48
+ if( auxin_is_plugin_active( 'flickr-justified-gallery/flickr-justified-gallery.php' ) ) {
49
+ include_once( 'elements/flickr.php' );
50
+ }
51
+ // check if flickr-justified-gallery is activated then it adds its element to page builder and widget
52
+ if( auxin_is_plugin_active( 'custom-facebook-feed/custom-facebook-feed.php' ) ) {
53
+ include_once( 'elements/facebook.php' );
54
+ }
55
  include_once( 'elements/latest-posts-slider.php' );
56
  include_once( 'elements/quote.php' );
57
  include_once( 'elements/search.php' );
58
  include_once( 'elements/socials-list.php' );
 
59
  include_once( 'elements/text.php' );
60
  include_once( 'elements/video.php' );
61
  include_once( 'elements/contact-box.php' );