Shortcodes and extra features for Phlox theme - Version 1.0.6

Version Description

Download this release

Release Info

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

Code changes from version 1.0.3 to 1.0.6

README.txt CHANGED
@@ -5,8 +5,8 @@ License: GPLv3
5
  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.0
9
- Stable tag: 1.0.3
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.3 / (31.8.2016) =
144
  - [Update]: Description in profile page updated
145
 
@@ -150,5 +153,5 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
150
 
151
  == Upgrade Notice ==
152
 
153
- = 1.0.3 =
154
- - [Update]: Description in profile page updated
5
  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.6
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl.html
12
 
140
 
141
  == Changelog ==
142
 
143
+ = Version 1.0.6 / (19.9.2016) =
144
+ - [New]: New features added
145
+
146
  = Version 1.0.3 / (31.8.2016) =
147
  - [Update]: Description in profile page updated
148
 
153
 
154
  == Upgrade Notice ==
155
 
156
+ = 1.0.6 =
157
+ - [Update]: New features added
admin/assets/images/saving.gif ADDED
Binary file
admin/includes/admin-ajax.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function auxin_ajax_send_feedback(){
4
+
5
+ // skip if the form data is not receiced
6
+ if( empty( $_POST['form'] ) ){
7
+ wp_send_json_error( __( 'Data cannot be delivered, please try again.', 'auxin-elements' ) );
8
+ }
9
+
10
+ $form_data = $_POST['form'];
11
+
12
+ // extract the form data
13
+ $rate = ! empty( $form_data['theme_rate'] ) ? $form_data['theme_rate'] : '';
14
+ $feedback = ! empty( $form_data['feedback'] ) ? $form_data['feedback'] : '';
15
+ $email = ! empty( $form_data['email'] ) ? $form_data['email'] : '';
16
+ $nonce = ! empty( $form_data['_wpnonce'] ) ? $form_data['_wpnonce'] : '';
17
+
18
+ if( ! wp_verify_nonce( $nonce, 'phlox_feedback' ) ){
19
+ wp_send_json_error( __( 'Authorization failed!', 'auxin-elements' ) );
20
+ }
21
+
22
+ if( $rate ){
23
+
24
+ global $wp_version;
25
+
26
+ $args = array(
27
+ 'user-agent' => 'WordPress/'.$wp_version.'; '. get_home_url(),
28
+ 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 5),
29
+ 'body' => array(
30
+ 'cat' => 'rating',
31
+ 'action' => 'submit',
32
+ 'item-slug' => 'phlox',
33
+ 'rate' => $rate
34
+ )
35
+ );
36
+ // send the rating through the api
37
+ $request = wp_remote_post( 'http://api.averta.net/envato/items/', $args );
38
+
39
+ // if ( ! is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {}
40
+
41
+ // store the user rating on the website
42
+ auxin_update_option( 'user_rating', $rate );
43
+
44
+ // send the feedback via email
45
+ $message = 'Rate: '. $rate . "\r\n" . 'Email: <' . $email . ">\r\n\r\n" . $feedback;
46
+ wp_mail( 'feedbacks'.'@'.'averta.net', 'Feedback from phlox dashboard:', $message );
47
+
48
+ wp_send_json_success( __( 'Sent Successfully. Thanks for your feedback!', 'auxin-elements' ) );
49
+
50
+ } else{
51
+ wp_send_json_error( __( 'An error occurred. Feedback could not be delivered, please try again.', 'auxin-elements' ) );
52
+ }
53
+
54
+ }
55
+
56
+ add_action( 'wp_ajax_send_feedback', 'auxin_ajax_send_feedback' );
admin/includes/admin-hooks.php CHANGED
@@ -47,7 +47,6 @@ function auxin_register_mce_buttons_style(){
47
  add_action('admin_enqueue_scripts', 'auxin_register_mce_buttons_style');
48
 
49
 
50
-
51
  /*-----------------------------------------------------------------------------------*/
52
  /* Adds system status tab in theme about (welcome) page
53
  /*-----------------------------------------------------------------------------------*/
@@ -66,6 +65,95 @@ function auxin_about_system_status( $sections ){
66
  add_filter( 'auxin_admin_welcome_sections', 'auxin_about_system_status', 100 );
67
 
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
  /*-----------------------------------------------------------------------------------*/
71
  /* Adds subtitle meta field to 'Title setting' tab
@@ -77,8 +165,8 @@ function auxin_add_metabox_field_to_title_setting_tab( $fields, $id, $type ){
77
  array_unshift(
78
  $fields,
79
  array(
80
- 'title' => __('Subtitle', THEME_DOMAIN),
81
- 'description' => __('Second Title (optional). Note: You have to enable "Display Title Bar Section" option in order to display the subtitle.', THEME_DOMAIN),
82
  'id' => 'page_subtitle',
83
  'type' => 'editor',
84
  'default' => ''
@@ -99,9 +187,9 @@ function auxin_add_metabox_field_to_advanced_setting_tab( $fields, $id, $type ){
99
 
100
  if( 'general-advanced' == $id ){
101
  $fields[] = array(
102
- 'title' => __('Custom JavaScript Code', THEME_DOMAIN),
103
- 'description' => __('Attention: The following custom JavaScript code will be applied ONLY to this page.', THEME_DOMAIN).'<br />'.
104
- __('For defining global JavaScript roles, please use custom javaScript field on option panel.', THEME_DOMAIN ),
105
  'id' => 'aux_page_custom_js',
106
  'type' => 'code',
107
  'mode' => 'javascript',
@@ -175,3 +263,43 @@ function auxin_add_widget_tabs($tabs) {
175
  add_filter( 'siteorigin_panels_widget_dialog_tabs', 'auxin_add_widget_tabs', 20 );
176
 
177
  // =============================================================================
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  add_action('admin_enqueue_scripts', 'auxin_register_mce_buttons_style');
48
 
49
 
 
50
  /*-----------------------------------------------------------------------------------*/
51
  /* Adds system status tab in theme about (welcome) page
52
  /*-----------------------------------------------------------------------------------*/
65
  add_filter( 'auxin_admin_welcome_sections', 'auxin_about_system_status', 100 );
66
 
67
 
68
+ /*-----------------------------------------------------------------------------------*/
69
+ /* Adds feedback tab in theme about (welcome) page
70
+ /*-----------------------------------------------------------------------------------*/
71
+
72
+ function auxin_welcome_page_display_section_feedback(){
73
+ // the previous rate of the client
74
+ $previous_rate = auxin_get_option( 'user_rating' );
75
+ $support_tab_url = admin_url( 'themes.php?page=auxin-welcome&tab=support' );
76
+ ?>
77
+
78
+ <div class="changelog feature-section two-col feedback">
79
+
80
+ <form class="aux-feedback-form" action="<?php echo admin_url( 'admin.php?page=auxin-welcome&tab=feedback'); ?>" method="post" >
81
+
82
+ <div class="aux-rating-section">
83
+ <h2 class="aux-featur"><?php _e('How likely are you to recommend Phlox to a friend?', 'auxin-elements' ); ?></h2>
84
+ <div class="aux-theme-ratings">
85
+ <?php
86
+ for( $i = 1; $i <= 5; $i++ ){
87
+ printf(
88
+ '<div class="aux-rate-cell"><input type="radio" name="theme_rate" id="theme-rating%1$s" value="%1$s" %2$s/><label class="rating" for="theme-rating%1$s">%1$s</label></div>',
89
+ $i, checked( $previous_rate, $i, false )
90
+ );
91
+ }
92
+ ?>
93
+
94
+ </div>
95
+ <div class="aux-ratings-measure">
96
+ <p>Don't like it</p>
97
+ <p>Like it so much</p>
98
+ </div>
99
+ </div>
100
+
101
+ <div class="aux-feedback-section aux-hide">
102
+ <h2 class="aux-featur"><?php _e('Please explain why you gave this score (optional)', 'auxin-elements'); ?></h2>
103
+ <h4 class="aux-featur feedback-subtitle">
104
+ <?php
105
+ printf( __( 'Please do not use this form to get support, in this case please check the %s help section %s', 'auxin-elements' ),
106
+ '<a href="' . $support_tab_url . '">', '</a>' ); ?>
107
+ </h4>
108
+ <textarea placeholder="Enter your feedback here" rows="10" name="feedback" class="large-text"></textarea>
109
+ <input type="text" placeholder="Email address (Optional)" name="email" class="text-input" />
110
+ <?php wp_nonce_field( 'phlox_feedback' ); ?>
111
+
112
+ <input type="submit" class="button button-primary aux-button" value="Submit feedback" />
113
+
114
+ <div class="aux-sending-status">
115
+ <img class="ajax-progress aux-hide" src="<?php echo AUX_URL; ?>/css/images/elements/saving.gif" />
116
+ <span class="ajax-response aux-hide" ><?php _e( 'Submitting your feedback ..', 'auxin-elements' ); ?></span>
117
+ </div>
118
+
119
+ </div>
120
+
121
+ <?php auxin_send_feedback_mail(); ?>
122
+ </form>
123
+ </div>
124
+
125
+ <?php
126
+ }
127
+
128
+ function auxin_welcome_add_section_feedback( $sections ){
129
+
130
+ $sections['feedback'] = array(
131
+ 'label' => __( 'Feedback', 'auxin-elements' ),
132
+ 'description' => sprintf(__( 'Please leave a feedback and help us to improve %s theme.', 'auxin-elements'), THEME_NAME_I18N ),
133
+ 'callback' => 'auxin_welcome_page_display_section_feedback'
134
+ );
135
+
136
+ return $sections;
137
+ }
138
+
139
+ add_filter( 'auxin_admin_welcome_sections', 'auxin_welcome_add_section_feedback', 90 );
140
+
141
+ function auxin_send_feedback_mail(){
142
+ if ( ! ( ! isset( $_POST['phlox_feedback'] ) || ! wp_verify_nonce( $_POST['phlox_feedback'], 'feedback_send') ) ) {
143
+
144
+ $email = ! empty( $_POST["email"] ) ? sanitize_email( $_POST["email"] ) : 'Empty';
145
+ $feedback = ! empty( $_POST["feedback"] ) ? esc_textarea( $_POST["feedback"] ) : '';
146
+
147
+ if( $feedback ){
148
+ wp_mail( 'info@averta.net', 'feedback from phlox dashboard', $feedback . chr(0x0D).chr(0x0A) . 'Email: ' . $email );
149
+ $text = __( 'Thanks for your feedback', 'auxin-elements' );
150
+ } else{
151
+ $text = __('Please try again and fill up at least the feedback field.', 'auxin-elements');
152
+ }
153
+
154
+ printf('<p class="notification">%s</p>', $text);
155
+ }
156
+ }
157
 
158
  /*-----------------------------------------------------------------------------------*/
159
  /* Adds subtitle meta field to 'Title setting' tab
165
  array_unshift(
166
  $fields,
167
  array(
168
+ 'title' => __('Subtitle', 'auxin-elements'),
169
+ 'description' => __('Second Title (optional). Note: You have to enable "Display Title Bar Section" option in order to display the subtitle.', 'auxin-elements'),
170
  'id' => 'page_subtitle',
171
  'type' => 'editor',
172
  'default' => ''
187
 
188
  if( 'general-advanced' == $id ){
189
  $fields[] = array(
190
+ 'title' => __('Custom JavaScript Code', 'auxin-elements'),
191
+ 'description' => __('Attention: The following custom JavaScript code will be applied ONLY to this page.', 'auxin-elements').'<br />'.
192
+ __('For defining global JavaScript roles, please use custom javaScript field on option panel.', 'auxin-elements' ),
193
  'id' => 'aux_page_custom_js',
194
  'type' => 'code',
195
  'mode' => 'javascript',
263
  add_filter( 'siteorigin_panels_widget_dialog_tabs', 'auxin_add_widget_tabs', 20 );
264
 
265
  // =============================================================================
266
+
267
+
268
+ function auxin_admin_footer_text( $footer_text ) {
269
+
270
+ // the admin pages that we intent to display theme footer text on
271
+ $admin_pages = array(
272
+ 'toplevel_page_auxin',
273
+ 'appearance_page_auxin',
274
+ 'toplevel_page_auxin-welcome',
275
+ 'appearance_page_auxin-welcome',
276
+ 'page',
277
+ 'post',
278
+ 'widgets',
279
+ 'dashboard',
280
+ 'edit-post',
281
+ 'edit-page',
282
+ 'edit-portfolio'
283
+ );
284
+
285
+ if( ! ( function_exists('auxin_is_theme_admin_page') && auxin_is_theme_admin_page( $admin_pages ) ) ){
286
+ return $footer_text;
287
+ }
288
+
289
+ $welcome_tab_url = admin_url( 'themes.php?page=auxin-welcome&tab=' );
290
+
291
+ $auxin_text = sprintf(
292
+ __( 'Quick access to %sdashboard%s, %soptions%s, %ssupport%s and %sfeedback%s page.', 'auxin-elements' ),
293
+ '<a href="'. $welcome_tab_url .'features" title="Version ' . THEME_NAME_I18N . '" >' . THEME_NAME_I18N . ' ',
294
+ '</a>',
295
+ '<a href="'. admin_url( 'customize.php' ). '?url=' . $welcome_tab_url .'features" title="'. __('Theme Customizer', 'auxin-elements' ) .'" >',
296
+ '</a>',
297
+ '<a href="'. $welcome_tab_url .'support">',
298
+ '</a>',
299
+ '<a href="'. $welcome_tab_url .'feedback">',
300
+ '</a>'
301
+ );
302
+
303
+ return '<span id="footer-thankyou">' . $auxin_text . '</span>';
304
+ }
305
+ add_filter( 'admin_footer_text', 'auxin_admin_footer_text' );
admin/includes/classes/class-auxels-import-parser.php ADDED
@@ -0,0 +1,312 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WordPress eXtended RSS file parser implementations
4
+ *
5
+ * @package WordPress
6
+ * @subpackage Importer
7
+ */
8
+
9
+ /**
10
+ * WordPress Importer class for managing parsing of WXR files.
11
+ */
12
+ class AUXELS_Import_Parser {
13
+ function parse( $file ) {
14
+ // Attempt to use proper XML parsers first
15
+ if ( extension_loaded( 'simplexml' ) ) {
16
+ $parser = new AUXELS_WXR_Parser_SimpleXML;
17
+ $result = $parser->parse( $file );
18
+
19
+ // If SimpleXML succeeds or this is an invalid WXR file then return the results
20
+ if ( ! is_wp_error( $result ) || 'SimpleXML_parse_error' != $result->get_error_code() )
21
+ return $result;
22
+ } else if ( extension_loaded( 'xml' ) ) {
23
+ $parser = new AUXELS_WXR_Parser_XML;
24
+ $result = $parser->parse( $file );
25
+
26
+ // If XMLParser succeeds or this is an invalid WXR file then return the results
27
+ if ( ! is_wp_error( $result ) || 'XML_parse_error' != $result->get_error_code() )
28
+ return $result;
29
+ }
30
+
31
+ // We have a malformed XML file, so display the error and fallthrough to regex
32
+ if ( isset($result) && defined('IMPORT_DEBUG') && IMPORT_DEBUG ) {
33
+ echo '<pre>';
34
+ if ( 'SimpleXML_parse_error' == $result->get_error_code() ) {
35
+ foreach ( $result->get_error_data() as $error )
36
+ echo $error->line . ':' . $error->column . ' ' . esc_html( $error->message ) . "\n";
37
+ } else if ( 'XML_parse_error' == $result->get_error_code() ) {
38
+ $error = $result->get_error_data();
39
+ echo $error[0] . ':' . $error[1] . ' ' . esc_html( $error[2] );
40
+ }
41
+ echo '</pre>';
42
+ echo '<p><strong>' . __( 'There was an error when reading this WXR file', 'wordpress-importer' ) . '</strong><br />';
43
+ echo __( 'Details are shown above. The importer will now try again with a different parser...', 'wordpress-importer' ) . '</p>';
44
+ }
45
+
46
+ // use regular expressions if nothing else available or this is bad XML
47
+ $parser = new AUXELS_WXR_Parser_Regex;
48
+ return $parser->parse( $file );
49
+ }
50
+ }
51
+
52
+ /**
53
+ * WXR Parser that makes use of the SimpleXML PHP extension.
54
+ */
55
+ class AUXELS_WXR_Parser_SimpleXML {
56
+
57
+ function parse( $file ) {
58
+
59
+ $options = $option = array();
60
+
61
+ $internal_errors = libxml_use_internal_errors(true);
62
+
63
+ $dom = new DOMDocument;
64
+ $old_value = null;
65
+ if ( function_exists( 'libxml_disable_entity_loader' ) ) {
66
+ $old_value = libxml_disable_entity_loader( true );
67
+ }
68
+ $success = $dom->loadXML( file_get_contents( $file ) );
69
+ if ( ! is_null( $old_value ) ) {
70
+ libxml_disable_entity_loader( $old_value );
71
+ }
72
+
73
+ if ( ! $success || isset( $dom->doctype ) ) {
74
+ return new WP_Error( 'SimpleXML_parse_error', __( 'There was an error when reading this WXR file', 'wordpress-importer' ), libxml_get_errors() );
75
+ }
76
+
77
+ $xml = simplexml_import_dom( $dom );
78
+ unset( $dom );
79
+
80
+ // halt if loading produces an error
81
+ if ( ! $xml )
82
+ return new WP_Error( 'SimpleXML_parse_error', __( 'There was an error when reading this WXR file', 'wordpress-importer' ), libxml_get_errors() );
83
+
84
+ $wxr_version = $xml->xpath('/rss/channel/wp:wxr_version');
85
+ if ( ! $wxr_version )
86
+ return new WP_Error( 'AUXELS_WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
87
+
88
+ $wxr_version = (string) trim( $wxr_version[0] );
89
+ // confirm that we are dealing with the correct file format
90
+ if ( ! preg_match( '/^\d+\.\d+$/', $wxr_version ) )
91
+ return new WP_Error( 'AUXELS_WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
92
+
93
+ $base_url = $xml->xpath('/rss/channel/wp:base_site_url');
94
+ $base_url = (string) trim( $base_url[0] );
95
+
96
+ $namespaces = $xml->getDocNamespaces();
97
+ if ( ! isset( $namespaces['wp'] ) )
98
+ $namespaces['wp'] = 'http://wordpress.org/export/1.1/';
99
+ if ( ! isset( $namespaces['excerpt'] ) )
100
+ $namespaces['excerpt'] = 'http://wordpress.org/export/1.1/excerpt/';
101
+
102
+ $wp = $xml->channel->children( $namespaces['wp'] );
103
+ // grab cats, tags and terms
104
+
105
+ foreach ( $wp->option as $option ) {
106
+ $options[ $option->option_key[0]->__toString() ] = $option->option_value[0]->__toString();
107
+ }
108
+
109
+ return $options;
110
+ }
111
+
112
+ }
113
+
114
+ /**
115
+ * WXR Parser that makes use of the XML Parser PHP extension.
116
+ */
117
+ class AUXELS_WXR_Parser_XML {
118
+
119
+ var $wp_tags = array(
120
+ 'wp:option'
121
+ );
122
+ var $wp_sub_tags = array(
123
+ 'wp:option_name', 'wp:option_value'
124
+ );
125
+
126
+ function parse( $file ) {
127
+
128
+ $this->wxr_version = $this->in_post = $this->cdata = $this->data = $this->sub_data = $this->in_tag = $this->in_sub_tag = false;
129
+ $this->authors = $this->posts = $this->term = $this->category = $this->tag = array();
130
+
131
+ $xml = xml_parser_create( 'UTF-8' );
132
+ xml_parser_set_option( $xml, XML_OPTION_SKIP_WHITE, 1 );
133
+ xml_parser_set_option( $xml, XML_OPTION_CASE_FOLDING, 0 );
134
+ xml_set_object( $xml, $this );
135
+ xml_set_character_data_handler( $xml, 'cdata' );
136
+ xml_set_element_handler( $xml, 'tag_open', 'tag_close' );
137
+
138
+ if ( ! xml_parse( $xml, file_get_contents( $file ), true ) ) {
139
+ $current_line = xml_get_current_line_number( $xml );
140
+ $current_column = xml_get_current_column_number( $xml );
141
+ $error_code = xml_get_error_code( $xml );
142
+ $error_string = xml_error_string( $error_code );
143
+ return new WP_Error( 'XML_parse_error', 'There was an error when reading this WXR file', array( $current_line, $current_column, $error_string ) );
144
+ }
145
+ xml_parser_free( $xml );
146
+
147
+ if ( ! preg_match( '/^\d+\.\d+$/', $this->wxr_version ) )
148
+ return new WP_Error( 'AUXELS_WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
149
+
150
+ return array(
151
+ 'authors' => $this->authors,
152
+ 'posts' => $this->posts,
153
+ 'categories' => $this->category,
154
+ 'tags' => $this->tag,
155
+ 'terms' => $this->term,
156
+ 'base_url' => $this->base_url,
157
+ 'version' => $this->wxr_version
158
+ );
159
+ }
160
+
161
+ function tag_open( $parse, $tag, $attr ) {
162
+ if ( in_array( $tag, $this->wp_tags ) ) {
163
+ $this->in_tag = substr( $tag, 3 );
164
+ return;
165
+ }
166
+
167
+ if ( in_array( $tag, $this->wp_sub_tags ) ) {
168
+ $this->in_sub_tag = substr( $tag, 3 );
169
+ return;
170
+ }
171
+
172
+ switch ( $tag ) {
173
+ case 'category':
174
+ if ( isset($attr['domain'], $attr['nicename']) ) {
175
+ $this->sub_data['domain'] = $attr['domain'];
176
+ $this->sub_data['slug'] = $attr['nicename'];
177
+ }
178
+ break;
179
+ case 'item': $this->in_post = true;
180
+ case 'title': if ( $this->in_post ) $this->in_tag = 'post_title'; break;
181
+ case 'guid': $this->in_tag = 'guid'; break;
182
+ case 'dc:creator': $this->in_tag = 'post_author'; break;
183
+ case 'content:encoded': $this->in_tag = 'post_content'; break;
184
+ case 'excerpt:encoded': $this->in_tag = 'post_excerpt'; break;
185
+
186
+ case 'wp:term_slug': $this->in_tag = 'slug'; break;
187
+ case 'wp:meta_key': $this->in_sub_tag = 'key'; break;
188
+ case 'wp:meta_value': $this->in_sub_tag = 'value'; break;
189
+ }
190
+ }
191
+
192
+ function cdata( $parser, $cdata ) {
193
+ if ( ! trim( $cdata ) )
194
+ return;
195
+
196
+ if ( false !== $this->in_tag || false !== $this->in_sub_tag ) {
197
+ $this->cdata .= $cdata;
198
+ } else {
199
+ $this->cdata .= trim( $cdata );
200
+ }
201
+ }
202
+
203
+ function tag_close( $parser, $tag ) {
204
+ switch ( $tag ) {
205
+ case 'wp:option':
206
+ $n = substr( $tag, 3 );
207
+ array_push( $this->$n, $this->data );
208
+ $this->data = false;
209
+ break;
210
+ }
211
+
212
+ $this->cdata = false;
213
+ }
214
+ }
215
+
216
+ /**
217
+ * WXR Parser that uses regular expressions. Fallback for installs without an XML parser.
218
+ */
219
+ class AUXELS_WXR_Parser_Regex {
220
+
221
+ var $options = array();
222
+
223
+ function __construct() {
224
+ $this->has_gzip = is_callable( 'gzopen' );
225
+ }
226
+
227
+ function parse( $file ) {
228
+ $wxr_version = $in_post = false;
229
+
230
+ $fp = $this->fopen( $file, 'r' );
231
+ if ( $fp ) {
232
+ while ( ! $this->feof( $fp ) ) {
233
+ $importline = rtrim( $this->fgets( $fp ) );
234
+
235
+ if ( false !== strpos( $importline, '<wp:option>' ) ) {
236
+ preg_match( '|<wp:option>(.*?)</wp:option>|is', $importline, $option );
237
+ $this->options[] = $this->process_option( $option[1] );
238
+ continue;
239
+ }
240
+ if ( $in_post ) {
241
+ $post .= $importline . "\n";
242
+ }
243
+ }
244
+
245
+ $this->fclose($fp);
246
+ }
247
+
248
+ if ( ! $wxr_version )
249
+ return new WP_Error( 'AUXELS_WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
250
+
251
+ return array(
252
+ 'options' => $this->options
253
+ );
254
+ }
255
+
256
+ function get_tag( $string, $tag ) {
257
+ preg_match( "|<$tag.*?>(.*?)</$tag>|is", $string, $return );
258
+ if ( isset( $return[1] ) ) {
259
+ if ( substr( $return[1], 0, 9 ) == '<![CDATA[' ) {
260
+ if ( strpos( $return[1], ']]]]><![CDATA[>' ) !== false ) {
261
+ preg_match_all( '|<!\[CDATA\[(.*?)\]\]>|s', $return[1], $matches );
262
+ $return = '';
263
+ foreach( $matches[1] as $match )
264
+ $return .= $match;
265
+ } else {
266
+ $return = preg_replace( '|^<!\[CDATA\[(.*)\]\]>$|s', '$1', $return[1] );
267
+ }
268
+ } else {
269
+ $return = $return[1];
270
+ }
271
+ } else {
272
+ $return = '';
273
+ }
274
+ return $return;
275
+ }
276
+
277
+ function process_option( $t ) {
278
+ return array(
279
+ 'option_name' => $this->get_tag( $t, 'wp:option_name' ),
280
+ 'option_value' => $this->get_tag( $t, 'wp:option_value' )
281
+ );
282
+ }
283
+
284
+ function _normalize_tag( $matches ) {
285
+ return '<' . strtolower( $matches[1] );
286
+ }
287
+
288
+ function fopen( $filename, $mode = 'r' ) {
289
+ if ( $this->has_gzip )
290
+ return gzopen( $filename, $mode );
291
+ return fopen( $filename, $mode );
292
+ }
293
+
294
+ function feof( $fp ) {
295
+ if ( $this->has_gzip )
296
+ return gzeof( $fp );
297
+ return feof( $fp );
298
+ }
299
+
300
+ function fgets( $fp, $len = 8192 ) {
301
+ if ( $this->has_gzip )
302
+ return gzgets( $fp, $len );
303
+ return fgets( $fp, $len );
304
+ }
305
+
306
+ function fclose( $fp ) {
307
+ if ( $this->has_gzip )
308
+ return gzclose( $fp );
309
+ return fclose( $fp );
310
+ }
311
+
312
+ }
admin/includes/classes/class-auxels-import.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class for importing and exporting theme options
4
+ */
5
+
6
+ class Auxels_Import {
7
+
8
+ /**
9
+ * Instance of this class.
10
+ *
11
+ * @var object
12
+ */
13
+ protected static $instance = null;
14
+
15
+
16
+ function __construct(){
17
+ // Add a radio option for exporting auxin options to wp export options.
18
+ add_action( 'export_filters', array( $this, 'export_filters' ) );
19
+ // Process the check field for auxin options while export submited
20
+ add_filter( 'export_args', array( $this, 'export_args' ) );
21
+
22
+ // adding options to export file
23
+ add_action( 'rss2_head', array( $this, 'add_xml_tag_option_in_export' ) );
24
+ // Import the options based on parsed data from xml file
25
+ add_action( 'import_start', array( $this, 'import_start' ) );
26
+ }
27
+
28
+ /**
29
+ * Add a radio option for exporting auxin options to available export options.
30
+ *
31
+ * @return void
32
+ */
33
+ public function export_filters() {
34
+ ?>
35
+ <hr />
36
+ <p><label>
37
+ <input type="checkbox" name="auxin-options" checked="checked" aria-describedby="all-content-desc" />
38
+ <?php _e( 'Include theme options', 'auxin-elements' ); ?>
39
+ </label></p>
40
+ <?php
41
+ }
42
+
43
+ /**
44
+ * Process the check field for auxin options
45
+ *
46
+ * @param [type] $args [description]
47
+ * @return [type] [description]
48
+ */
49
+ public function export_args( $args ){
50
+
51
+ if ( ! empty( $_GET['auxin-options'] ) ) {
52
+ $args['auxin-options'] = true;
53
+ return $args;
54
+ }
55
+
56
+ return $args;
57
+ }
58
+
59
+
60
+ /**
61
+ * Generate option page for wp options in xml format
62
+ */
63
+ public function add_xml_tag_option_in_export(){
64
+ global $wpdb;
65
+
66
+ $options_ref = $this->get_export_option_list();
67
+
68
+ foreach ( $options_ref as $option_export_name => $option_import_name ) {
69
+ $sql = $wpdb->prepare("SELECT option_name, option_value FROM $wpdb->options WHERE option_name = %s", $option_import_name );
70
+ $result = $wpdb->get_results( $sql );
71
+
72
+ if( ! empty( $result[0]->option_value ) ){
73
+ ?>
74
+ <wp:option>
75
+ <wp:option_key><?php echo $this->wxr_cdata( $option_export_name ); ?></wp:option_key>
76
+ <wp:option_value><?php echo $this->wxr_cdata( $result[0]->option_value ); ?></wp:option_value>
77
+ </wp:option>
78
+ <?php
79
+ }
80
+
81
+ }
82
+ }
83
+
84
+
85
+ /**
86
+ * Import the options based on parsed data from xml file
87
+ */
88
+ public function import_start(){
89
+ global $wp_import;
90
+
91
+ $options_ref = $this->get_export_option_list();
92
+
93
+ $file = get_attached_file( $wp_import->id );
94
+ // if export file is not uploaded and is a link to a file in theme files
95
+ if( empty( $file ) && property_exists( $wp_import, 'import_file' ) ){
96
+ $file = $wp_import->import_file;
97
+ }
98
+
99
+ include 'class-auxels-import-parser.php';
100
+
101
+ $parser = new AUXELS_Import_Parser;
102
+ $options = $parser->parse( $file );
103
+
104
+ foreach ( $options as $option_key => $option_value ){
105
+ if( ! empty( $options_ref[ $option_key ] ) ){
106
+ update_option( $options_ref[ $option_key ], maybe_unserialize( $option_value ) );
107
+ }
108
+ }
109
+
110
+ }
111
+
112
+
113
+ /**
114
+ * Retrieves the list of options we intended to include in export file
115
+ */
116
+ public function get_export_option_list(){
117
+ return array(
118
+ 'formatted_options' => THEME_ID . '_formatted_options'
119
+ );
120
+ }
121
+
122
+
123
+ /**
124
+ * Print the data in cdata and utf8 format
125
+ * @param string $str
126
+ */
127
+ function wxr_cdata( $str ) {
128
+ if ( ! seems_utf8( $str ) ) {
129
+ $str = utf8_encode( $str );
130
+ }
131
+
132
+ $str = '<![CDATA[' . str_replace( ']]>', ']]]]><![CDATA[>', $str ) . ']]>';
133
+
134
+ return $str;
135
+ }
136
+
137
+
138
+ /**
139
+ * Return an instance of this class.
140
+ *
141
+ * @return object A single instance of this class.
142
+ */
143
+ public static function get_instance() {
144
+
145
+ // If the single instance hasn't been set, set it now.
146
+ if ( null == self::$instance ) {
147
+ self::$instance = new self;
148
+ }
149
+
150
+ return self::$instance;
151
+ }
152
+
153
+ }
154
+
155
+ new Auxels_Import();
admin/includes/index.php CHANGED
@@ -5,7 +5,7 @@ include_once( 'admin-the-functions.php' );
5
 
6
  // load admin related classes
7
  include_once( 'classes/class-auxels-admin-assets.php' );
8
-
9
 
10
  do_action( 'auxels_admin_classes_loaded' );
11
 
5
 
6
  // load admin related classes
7
  include_once( 'classes/class-auxels-admin-assets.php' );
8
+ include_once( 'classes/class-auxels-import.php' );
9
 
10
  do_action( 'auxels_admin_classes_loaded' );
11
 
auxin-elements.php CHANGED
@@ -11,8 +11,8 @@
11
  *
12
  * Plugin Name: Auxin Elements
13
  * Plugin URI: https://wordpress.org/plugins/auxin-elements/
14
- * Description: Extra features, shortcodes and widgets for PHLOX theme.
15
- * Version: 1.0.3
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
11
  *
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.6
16
  * Author: averta
17
  * Author URI: http://averta.net
18
  * Text Domain: auxin-elements
includes/classes/class-auxin-siteorigin-widget.php ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * A class for creating SiteOrigin widgets from the master widgets list
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
+ // no direct access allowed
14
+ if ( ! defined('ABSPATH') ) exit;
15
+
16
+ /*--------------------------------*/
17
+
18
+ if( ! class_exists( 'Auxin_SiteOrigin_Widget' ) && class_exists( 'SiteOrigin_Widget') ) :
19
+
20
+ class Auxin_SiteOrigin_Widget extends SiteOrigin_Widget {
21
+
22
+
23
+ private $widget_info = array();
24
+ private $widget_fields = array();
25
+ public $widget_fun_name;
26
+
27
+ /**
28
+ * Setups new SiteOrigin Widget
29
+ * @param Array $widget_info
30
+ */
31
+ function __construct( $widget_info ) {
32
+
33
+ $this->widget_info = $widget_info;
34
+ $this->widget_fields = $widget_info['params'];
35
+ $this->widget_fun_name = $widget_info['auxin_output_callback'];
36
+
37
+ parent::__construct(
38
+ // The unique id for your widget.
39
+ $widget_info['base'],
40
+
41
+ // The name of the widget for display purposes.
42
+ $widget_info['name'],
43
+
44
+ // The $widget_options array, which is passed through to WP_Widget.
45
+ // It has a couple of extras like the optional help URL, which should link to your sites help or support page.
46
+ array(
47
+ 'description' => $widget_info['description'],
48
+ 'has_preview' => false
49
+ //'help' => 'http://example.com/hello-world-widget-docs',
50
+ ),
51
+
52
+ //The $control_options array, which is passed through to WP_Widget
53
+ array(
54
+ ),
55
+
56
+ //The $form_options array, which describes the form fields used to configure SiteOrigin widgets. We'll explain these in more detail later.
57
+ false,
58
+ // array(
59
+ // 'text' => array(
60
+ // 'type' => 'text',
61
+ // 'label' => __('Hello world! goes here.', 'siteorigin-widgets'),
62
+ // 'default' => 'Hello world!'
63
+ // ),
64
+ // ),
65
+
66
+ //The $base_folder path string.
67
+ plugin_dir_path(__FILE__)
68
+ );
69
+
70
+ // we don't want to use template files for site origin widgets
71
+ add_filter( 'siteorigin_widgets_template_file_' . $widget_info['base'] , array( $this, 'get_widget_template_file' ) );
72
+ // override the widget template html
73
+ add_filter( 'siteorigin_widgets_template_html_' . $widget_info['base'] , array( $this, 'get_widget_html' ), 10, 2 );
74
+
75
+
76
+ }
77
+
78
+ function initialize_form(){
79
+
80
+ $so_fields = array();
81
+ $so_fields_sections = array();
82
+
83
+ foreach ( $this->widget_fields as $field ) {
84
+
85
+ $so_field = array(
86
+ 'label' => $field['heading'],
87
+ 'default' => ! empty( $field['value'] ) ? $field['value'] : '',
88
+ 'description' => ! empty( $field['description'] ) ? $field['description'] : ''
89
+ );
90
+
91
+ switch ( $field['type'] ) {
92
+ case 'iconpicker':
93
+ case 'aux_iconpicker':
94
+ // TODO: add icon picker to so builder
95
+ break;
96
+ case 'textarea_html':
97
+ $so_field['type'] = 'tinymce';
98
+ $so_field['rows'] = 20;
99
+ break;
100
+
101
+ case 'textbox':
102
+ case 'textfield':
103
+ $so_field['type'] = 'text';
104
+ break;
105
+
106
+ case 'dropdown':
107
+ case 'select':
108
+ $so_field['type'] = 'select';
109
+ $so_field['options'] = $field['value'];
110
+
111
+ if ( !empty( $field['def_value'] ) ) {
112
+ $so_field['default'] = $field['def_value'];
113
+ }
114
+ break;
115
+
116
+ // TODO: IT should change and now is just for test
117
+ case 'aux_multiple_selector' :
118
+ $so_field['type'] = 'select';
119
+ $so_field['options'] = $field['value'];
120
+ $so_field['multiple'] = true;
121
+
122
+ if ( !empty( $field['def_value'] ) ) {
123
+ $so_field['default'] = $field['def_value'];
124
+ }
125
+
126
+ break;
127
+
128
+ case 'aux_visual_select':
129
+ // TODO: add visual select field to so
130
+ break;
131
+
132
+ case 'checkbox':
133
+ case 'aux_switch':
134
+ // TODO: add switch box to so
135
+ $so_field['type'] = 'checkbox';
136
+ break;
137
+
138
+ case 'color':
139
+ case 'colorpicker':
140
+ // TODO: add color picker to so
141
+ $so_field['type'] = 'color';
142
+ break;
143
+
144
+ case 'aux_select_image':
145
+ case 'attach_image':
146
+ $so_field['type'] = 'media';
147
+ $so_field['library'] = 'image';
148
+ break;
149
+
150
+ case 'aux_select_images':
151
+ case 'attach_images':
152
+ $so_field['type'] = 'media';
153
+ $so_field['library'] = 'image';
154
+ break;
155
+
156
+ case 'aux_select_video':
157
+ case 'attach_video':
158
+ $so_field['type'] = 'media';
159
+ $so_field['library'] = 'video';
160
+ break;
161
+
162
+ case 'aux_select_audio':
163
+ case 'attach_audio':
164
+ $so_field['type'] = 'media';
165
+ $so_field['library'] = 'audio';
166
+ default:
167
+ continue;
168
+ break;
169
+ }
170
+
171
+
172
+ if ( ! empty( $field['repeater'] ) ) {
173
+ $repeater_name = $this->sanitize_field_name( $field['repeater'] );
174
+
175
+ if ( ! isset( $so_fields[ $repeater_name ] ) ) {
176
+ $so_fields[ $repeater_name ] = array(
177
+ 'type' => 'repeater',
178
+ 'label' => $field['repeater'],
179
+ 'hide' => true,
180
+ 'fields' => array()
181
+ );
182
+ }
183
+
184
+ $so_fields[ $repeater_name ]['fields'][ $field['param_name'] ] = $so_field;
185
+ } elseif ( ! empty( $field['group'] ) ) {
186
+ $section_name = $this->sanitize_field_name( $field['group'] );
187
+
188
+ if ( ! isset( $so_fields[ $section_name ] ) ) {
189
+ $so_fields[ $section_name ] = array(
190
+ 'type' => 'section',
191
+ 'label' => $field['group'],
192
+ 'hide' => true,
193
+ 'fields' => array()
194
+ );
195
+ }
196
+
197
+ $so_fields[ $section_name ]['fields'][ $field['param_name'] ] = $so_field;
198
+ } else {
199
+ $so_fields[$field['param_name']] = $so_field;
200
+ }
201
+
202
+ }
203
+
204
+ return $so_fields;
205
+ }
206
+
207
+ private function sanitize_field_name( $field_label ) {
208
+ return str_replace( ' ', '_', strtolower( $field_label ) );
209
+ }
210
+
211
+ /**
212
+ * get the widget output
213
+ */
214
+ function get_widget_html( $template_html, $instance ) {
215
+
216
+ // make sure to pass same class name for wrapper to widget too
217
+ if( isset( $this->widget_info['base_class'] ) ){
218
+ $args['base_class'] = $this->widget_info['base_class'];
219
+ }
220
+
221
+ $instance['widget_info'] = $args;
222
+
223
+ if( function_exists( $this->widget_fun_name ) ){
224
+ return call_user_func( $this->widget_fun_name, $instance );
225
+ } else {
226
+ auxin_error( __('The callback for widget does not exists.', THEME_DOMAIN) );
227
+ }
228
+ }
229
+
230
+ /**
231
+ * Auxin elements doesn't support template files
232
+ */
233
+ function get_widget_template_file( $template_path ) {
234
+ return '';
235
+ }
236
+
237
+ function get_template_name( $instance ) {
238
+ return '';
239
+ }
240
+
241
+ function get_template_dir( $instance ) {
242
+ return '';
243
+ }
244
+
245
+ }
246
+
247
+ endif;
includes/classes/class-auxin-widget-shortcode-map.php CHANGED
@@ -300,8 +300,27 @@ class Auxin_Widget_Shortcode_Map {
300
  'icon' => $element_info['icon']
301
  );
302
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  // remove the widget from SO if displaying widget in SO is not allowed
304
- } elseif( ! $element_info['is_so'] ){
305
  if( isset( $widgets[ $element_info['base'] ] ) ){
306
  unset( $widgets[ $element_info['base'] ] );
307
  }
@@ -320,19 +339,22 @@ class Auxin_Widget_Shortcode_Map {
320
  */
321
  function add_siteorigin_widget_object( $object, $widget ) {
322
 
323
- // We can skip this if there's already an object
324
- if ( ! empty( $object ) ){
 
325
  return $object;
 
 
326
  }
327
 
328
- $master_array = $this->get_master_array();
329
-
330
- if ( isset( $master_array[ $widget ] ) ) {
331
- $widget_instance = $this->generate_widget_array( $master_array[ $widget ] );
332
- $object = new Auxin_Widget( $widget_instance );
 
333
  }
334
 
335
- return $object;
336
  }
337
 
338
 
300
  'icon' => $element_info['icon']
301
  );
302
 
303
+
304
+ $screen = get_current_screen();
305
+
306
+ if ( isset( $element_info['so_api'] ) && $element_info['so_api'] ) {
307
+
308
+ // render widget to enqueue scripts
309
+ // this method is used in site origin panels too (siteorigin-panels.php:420)
310
+ if( $screen->base != 'widgets' ) {
311
+ $original_post = isset($GLOBALS['post']) ? $GLOBALS['post'] : null; // Make sure widgets don't change the global post.
312
+ ob_start();
313
+ $widget_obj = new Auxin_SiteOrigin_Widget( $element_info );
314
+ $widget_obj->form( array() );
315
+ ob_clean();
316
+
317
+ $GLOBALS['post'] = $original_post;
318
+ }
319
+
320
+ }
321
+
322
  // remove the widget from SO if displaying widget in SO is not allowed
323
+ } elseif ( ! $element_info['is_so'] ) {
324
  if( isset( $widgets[ $element_info['base'] ] ) ){
325
  unset( $widgets[ $element_info['base'] ] );
326
  }
339
  */
340
  function add_siteorigin_widget_object( $object, $widget ) {
341
 
342
+ $master_array = $this->get_master_array();
343
+
344
+ if ( ! isset( $master_array[ $widget ] ) ) {
345
  return $object;
346
+ } else {
347
+ $element_info = $master_array[ $widget ];
348
  }
349
 
350
+ if ( isset( $element_info['so_api'] ) && $element_info['so_api'] ) {
351
+ return new Auxin_SiteOrigin_Widget( $element_info );
352
+ } elseif ( ! empty( $object ) ) {
353
+ return $object;
354
+ } else {
355
+ return new Auxin_Widget( $this->generate_widget_array( $element_info ) );
356
  }
357
 
 
358
  }
359
 
360
 
includes/define.php CHANGED
@@ -12,7 +12,7 @@ if( ! defined( 'THEME_NAME' ) ){
12
  }
13
 
14
 
15
- define( 'AUXELS_VERSION' , '1.0.3' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
  define( 'AUXELS_TEXT_DOMAIN' , 'auxin-elements' );
12
  }
13
 
14
 
15
+ define( 'AUXELS_VERSION' , '1.0.6' );
16
 
17
  define( 'AUXELS_SLUG' , 'auxin-elements' );
18
  define( 'AUXELS_TEXT_DOMAIN' , 'auxin-elements' );
includes/elements/accordion.php CHANGED
@@ -36,13 +36,13 @@ function auxin_get_new_accordion_master_array( $master_array ) {
36
  'as_child' => '',
37
  'params' => array(
38
  array(
 
 
39
  'param_name' => 'title',
40
  'type' => 'textfield',
41
  'value' => '',
42
  'holder' => 'textfield',
43
  'class' => 'title',
44
- 'heading' => __('Title','auxin-elements'),
45
- 'description' => __('Accordion title, leave it empty if you don`t need title.', 'auxin-elements'),
46
  'admin_label' => true,
47
  'dependency' => '',
48
  'weight' => '',
@@ -50,10 +50,12 @@ function auxin_get_new_accordion_master_array( $master_array ) {
50
  'edit_field_class' => ''
51
  ),
52
  array(
 
 
53
  'param_name' => 'type',
54
  'type' => 'aux_visual_select',
55
  'def_value' => 'accordion',
56
- 'choices' => array(
57
  'false' => array(
58
  'label' => __('Toggle', 'auxin-elements'),
59
  'image' => AUX_URL . 'images/visual-select/toggle.svg'
@@ -65,8 +67,6 @@ function auxin_get_new_accordion_master_array( $master_array ) {
65
  ),
66
  'holder' => 'dropdown',
67
  'class' => 'type',
68
- 'heading' => __('Type','auxin-elements'),
69
- 'description' => __('Select accordion to show only 1 element opens at a time.','auxin-elements'),
70
  'admin_label' => true,
71
  'dependency' => '',
72
  'weight' => '',
@@ -74,14 +74,14 @@ function auxin_get_new_accordion_master_array( $master_array ) {
74
  'edit_field_class' => ''
75
  ),
76
  array(
 
 
77
  'param_name' => 'content',
78
  'type' => 'textarea_html',
79
  'value' => '',
80
  'def_value' => '',
81
  'holder' => 'div',
82
  'class' => 'content',
83
- 'heading' => __('Content','auxin-elements'),
84
- 'description' => __('Please use below sample for each accordion item.<br>[accordion_section label="Accordion label here" ] accordion content here [/accordion_section]', 'auxin-elements'),
85
  'admin_label' => true,
86
  'dependency' => '',
87
  'weight' => '',
@@ -89,14 +89,14 @@ function auxin_get_new_accordion_master_array( $master_array ) {
89
  'edit_field_class' => ''
90
  ),
91
  array(
 
 
92
  'param_name' => 'extra_classes',
93
  'type' => 'textfield',
94
  'value' => '',
95
  'def_value' => '',
96
  'holder' => 'textfield',
97
  'class' => 'extra_classes',
98
- 'heading' => __('Extra class name','auxin-elements'),
99
- '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'),
100
  'admin_label' => true,
101
  'dependency' => '',
102
  'weight' => '',
36
  'as_child' => '',
37
  'params' => array(
38
  array(
39
+ 'heading' => __('Title','auxin-elements'),
40
+ 'description' => __('Accordion 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' => '',
50
  'edit_field_class' => ''
51
  ),
52
  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'
67
  ),
68
  'holder' => 'dropdown',
69
  'class' => 'type',
 
 
70
  'admin_label' => true,
71
  'dependency' => '',
72
  'weight' => '',
74
  'edit_field_class' => ''
75
  ),
76
  array(
77
+ 'heading' => __('Content','auxin-elements'),
78
+ 'description' => sprintf(__('Please use below sample for each accordion item.%s[accordion_section label="Accordion label here" ] accordion content here [/accordion_section]', 'auxin-elements'), '<br>'),
79
  'param_name' => 'content',
80
  'type' => 'textarea_html',
81
  'value' => '',
82
  'def_value' => '',
83
  'holder' => 'div',
84
  'class' => 'content',
 
 
85
  'admin_label' => true,
86
  'dependency' => '',
87
  'weight' => '',
89
  'edit_field_class' => ''
90
  ),
91
  array(
92
+ 'heading' => __('Extra class name','auxin-elements'),
93
+ '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'),
94
  'param_name' => 'extra_classes',
95
  'type' => 'textfield',
96
  'value' => '',
97
  'def_value' => '',
98
  'holder' => 'textfield',
99
  'class' => 'extra_classes',
 
 
100
  'admin_label' => true,
101
  'dependency' => '',
102
  'weight' => '',
includes/elements/audio.php CHANGED
@@ -40,66 +40,68 @@ function auxin_get_audio_master_array( $master_array ) {
40
  'as_child' => '',
41
  'params' => array(
42
  array(
43
- 'param_name' => 'title',
44
- 'type' => 'textfield',
45
- 'value' => '',
46
- 'holder' => 'textfield',
47
- 'class' => 'title',
48
- 'heading' => __('Title','auxin-elements' ),
49
- 'description' => __('The title of audio element.','auxin-elements' ),
50
- 'admin_label' => true,
51
- 'dependency' => '',
52
- 'weight' => '',
53
- 'group' => '' ,
54
- 'edit_field_class' => ''
55
  ),
56
  array(
57
- 'param_name' => 'src',
58
- 'type' => 'aux_select_audio',
59
- 'value' => '',
60
- 'holder' => 'aux_select_audio',
61
- 'class' => 'audio_src',
62
- 'heading' => __('Audio file(MP3 or ogg)','auxin-elements' ),
63
- 'description' => '',
64
- 'admin_label' => true,
65
- 'dependency' => '',
66
- 'weight' => '',
67
- 'group' => '' ,
68
- 'edit_field_class' => ''
69
  ),
70
  array(
 
 
71
  'param_name' => 'loop',
72
  'type' => 'aux_switch',
73
  'def_value' => '0',
74
  'value' => '0',
75
  'class' => '',
76
- 'heading' => __('Repeat the audio','auxin-elements' ),
77
- 'description' => '',
78
  'admin_label' => true,
79
  'dependency' => '',
80
  'weight' => '',
81
- 'group' => '',
82
  'edit_field_class' => ''
83
  ),
84
  array(
 
 
85
  'param_name' => 'autoplay',
86
  'type' => 'aux_switch',
87
  'def_value' => '0',
88
  'value' => '0',
89
  'class' => '',
90
- 'heading' => __('AutoPlay','auxin-elements' ),
91
- 'description' => __('Play the audio file automatically.','auxin-elements' ),
92
  'admin_label' => true,
93
  'dependency' => '',
94
  'weight' => '',
95
- 'group' => '',
96
  'edit_field_class' => ''
97
  ),
98
  array(
 
 
99
  'param_name' => 'skin',
100
  'type' => 'aux_visual_select',
101
  'def_value' => 'dark',
102
- 'choices' => array(
103
  'dark' => array(
104
  'label' => __('Dark', 'auxin-elements'),
105
  'image' => AUX_URL . 'images/visual-select/audio-player-dark.svg'
@@ -111,8 +113,6 @@ function auxin_get_audio_master_array( $master_array ) {
111
  ),
112
  'holder' => 'dropdown',
113
  'class' => 'skin',
114
- 'heading' => __('Skin','auxin-elements' ),
115
- 'description' => __('The skin of audio element','auxin-elements' ),
116
  'admin_label' => true,
117
  'dependency' => '',
118
  'weight' => '',
@@ -120,18 +120,18 @@ function auxin_get_audio_master_array( $master_array ) {
120
  'edit_field_class' => ''
121
  ),
122
  array(
 
 
123
  'param_name' => 'extra_classes',
124
  'type' => 'textfield',
125
  'value' => '',
126
  'def_value' => '',
127
  'holder' => 'textfield',
128
  'class' => 'extra_classes',
129
- 'heading' => __('Extra class name','auxin-elements' ),
130
- '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' ),
131
  'admin_label' => true,
132
  'dependency' => '',
133
  'weight' => '',
134
- 'group' => '' ,
135
  'edit_field_class' => ''
136
  )
137
 
40
  'as_child' => '',
41
  'params' => array(
42
  array(
43
+ 'heading' => __('Title','auxin-elements' ),
44
+ 'description' => __('Audio title, leave it empty if you don`t need title.', 'auxin-elements'),
45
+ 'param_name' => 'title',
46
+ 'type' => 'textfield',
47
+ 'value' => '',
48
+ 'holder' => 'textfield',
49
+ 'class' => 'title',
50
+ 'admin_label' => true,
51
+ 'dependency' => '',
52
+ 'weight' => '',
53
+ 'group' => '' ,
54
+ 'edit_field_class' => ''
55
  ),
56
  array(
57
+ 'heading' => __('Audio file(MP3 or ogg)','auxin-elements' ),
58
+ 'description' => '',
59
+ 'param_name' => 'src',
60
+ 'type' => 'aux_select_audio',
61
+ 'value' => '',
62
+ 'holder' => 'aux_select_audio',
63
+ 'class' => 'audio_src',
64
+ 'admin_label' => true,
65
+ 'dependency' => '',
66
+ 'weight' => '',
67
+ 'group' => '' ,
68
+ 'edit_field_class' => ''
69
  ),
70
  array(
71
+ 'heading' => __('Repeat the audio','auxin-elements' ),
72
+ 'description' => '',
73
  'param_name' => 'loop',
74
  'type' => 'aux_switch',
75
  'def_value' => '0',
76
  'value' => '0',
77
  'class' => '',
 
 
78
  'admin_label' => true,
79
  'dependency' => '',
80
  'weight' => '',
81
+ 'group' => 'Extras',
82
  'edit_field_class' => ''
83
  ),
84
  array(
85
+ 'heading' => __('AutoPlay','auxin-elements' ),
86
+ 'description' => __('Play the audio file automatically.','auxin-elements' ),
87
  'param_name' => 'autoplay',
88
  'type' => 'aux_switch',
89
  'def_value' => '0',
90
  'value' => '0',
91
  'class' => '',
 
 
92
  'admin_label' => true,
93
  'dependency' => '',
94
  'weight' => '',
95
+ 'group' => 'Extras',
96
  'edit_field_class' => ''
97
  ),
98
  array(
99
+ 'heading' => __('Skin','auxin-elements' ),
100
+ 'description' => __('The skin of audio element.','auxin-elements' ),
101
  'param_name' => 'skin',
102
  'type' => 'aux_visual_select',
103
  'def_value' => 'dark',
104
+ 'choices' => array(
105
  'dark' => array(
106
  'label' => __('Dark', 'auxin-elements'),
107
  'image' => AUX_URL . 'images/visual-select/audio-player-dark.svg'
113
  ),
114
  'holder' => 'dropdown',
115
  'class' => 'skin',
 
 
116
  'admin_label' => true,
117
  'dependency' => '',
118
  'weight' => '',
120
  'edit_field_class' => ''
121
  ),
122
  array(
123
+ 'heading' => __('Extra class name','auxin-elements' ),
124
+ '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' ),
125
  'param_name' => 'extra_classes',
126
  'type' => 'textfield',
127
  'value' => '',
128
  'def_value' => '',
129
  'holder' => 'textfield',
130
  'class' => 'extra_classes',
 
 
131
  'admin_label' => true,
132
  'dependency' => '',
133
  'weight' => '',
134
+ 'group' => 'Extras' ,
135
  'edit_field_class' => ''
136
  )
137
 
includes/elements/button.php CHANGED
@@ -40,20 +40,22 @@ function auxin_get_button_master_array( $master_array ) {
40
  'as_child' => '',
41
  'params' => array(
42
  array(
43
- 'param_name' => 'label',
44
- 'type' => 'textfield',
45
- 'value' => 'Button',
46
- 'holder' => 'textfield',
47
- 'class' => 'label',
48
- 'heading' => __('Button Label','auxin-elements' ),
49
- 'description' => __('The label of button','auxin-elements' ),
50
- 'admin_label' => true,
51
- 'dependency' => '',
52
- 'weight' => '',
53
- 'group' => '' ,
54
- 'edit_field_class' => ''
55
  ),
56
  array(
 
 
57
  'param_name' => 'size',
58
  'type' => 'dropdown',
59
  'def_value' => 'medium',
@@ -66,8 +68,6 @@ function auxin_get_button_master_array( $master_array ) {
66
  ),
67
  'holder' => 'dropdown',
68
  'class' => 'round',
69
- 'heading' => __('Button Size','auxin-elements' ),
70
- 'description' => '',
71
  'admin_label' => true,
72
  'dependency' => '',
73
  'weight' => '',
@@ -76,20 +76,20 @@ function auxin_get_button_master_array( $master_array ) {
76
  ),
77
 
78
  array(
 
 
79
  'param_name' => 'border',
80
  'type' => 'aux_visual_select',
81
  'value' => '',
82
  'holder' => 'dropdown',
83
  'class' => 'border',
84
- 'heading' => __('Button shape style','auxin-elements' ),
85
- 'description' => '',
86
  'admin_label' => true,
87
  'dependency' => '',
88
  'weight' => '',
89
- 'group' => '' ,
90
  'edit_field_class' => '',
91
- 'choices' => array(
92
- '' => array(
93
  'label' => __('Box', 'auxin-elements' ),
94
  'image' => AUX_URL . 'images/visual-select/button-normal.svg'
95
  ),
@@ -105,24 +105,24 @@ function auxin_get_button_master_array( $master_array ) {
105
  ),
106
 
107
  array(
 
 
108
  'param_name' => 'style',
109
  'type' => 'aux_visual_select',
110
  'value' => '',
111
  'holder' => 'dropdown',
112
  'class' => 'style',
113
- 'heading' => __('Button style','auxin-elements' ),
114
- 'description' => '',
115
  'admin_label' => true,
116
  'dependency' => '',
117
  'weight' => '',
118
- 'group' => '' ,
119
  'edit_field_class' => '',
120
  'choices' => array(
121
- '' => array(
122
  'label' => __('Normal', 'auxin-elements' ),
123
  'image' => AUX_URL . 'images/visual-select/button-normal.svg'
124
  ),
125
- '3d' => array(
126
  'label' => __('3D', 'auxin-elements' ),
127
  'image' => AUX_URL . 'images/visual-select/button-3d.svg'
128
  ),
@@ -134,14 +134,14 @@ function auxin_get_button_master_array( $master_array ) {
134
  ),
135
 
136
  array(
 
 
137
  'param_name' => 'uppercase',
138
  'type' => 'aux_switch',
139
  'def_value' => '',
140
- 'value' => '0',
141
  'holder' => 'dropdown',
142
  'class' => 'showheader',
143
- 'heading' => __('Uppercase label','auxin-elements' ),
144
- 'description' => '',
145
  'admin_label' => true,
146
  'dependency' => '',
147
  'weight' => '',
@@ -149,14 +149,14 @@ function auxin_get_button_master_array( $master_array ) {
149
  'edit_field_class' => ''
150
  ),
151
  array(
 
 
152
  'param_name' => 'dark',
153
  'type' => 'aux_switch',
154
  'def_value' => '',
155
  'value' => '0',
156
  'holder' => 'dropdown',
157
  'class' => 'showheader',
158
- 'heading' => __('Darken the label','auxin-elements' ),
159
- 'description' => __('Darken label of button while mouse over it.','auxin-elements' ),
160
  'admin_label' => true,
161
  'dependency' => '',
162
  'weight' => '',
@@ -165,14 +165,14 @@ function auxin_get_button_master_array( $master_array ) {
165
  ),
166
 
167
  array(
 
 
168
  'param_name' => 'icon',
169
  'type' => 'iconpicker',
170
  'def_value' => '',
171
  'value' => '',
172
  'holder' => 'icon',
173
  'class' => 'icon-name',
174
- 'heading' => __('Icon for button','auxin-elements' ),
175
- 'description' => '',
176
  'admin_label' => true,
177
  'dependency' => '',
178
  'weight' => '',
@@ -180,21 +180,21 @@ function auxin_get_button_master_array( $master_array ) {
180
  'edit_field_class' => ''
181
  ),
182
  array(
 
 
183
  'param_name' => 'icon_align',
184
  'type' => 'dropdown',
185
  'def_value' => '',
186
  'value' => array(
187
- '' => __('Default' , 'auxin-elements' ),
188
- 'left' => __('Left' , 'auxin-elements' ),
189
- 'right' => __('Right' , 'auxin-elements' ),
190
- 'over' => __('Over' , 'auxin-elements' ),
191
- 'left-animate' => __('Animate from Left' , 'auxin-elements' ),
192
- 'right-animate' => __('Animate from Right' , 'auxin-elements' )
193
  ),
194
  'holder' => 'dropdown',
195
  'class' => 'icon-align',
196
- 'heading' => __('Icon alignment','auxin-elements' ),
197
- 'description' => '',
198
  'admin_label' => true,
199
  'dependency' => '',
200
  'weight' => '',
@@ -202,47 +202,47 @@ function auxin_get_button_master_array( $master_array ) {
202
  'edit_field_class' => ''
203
  ),
204
  array(
205
- 'param_name' => 'color_name',
206
- 'type' => 'dropdown',
207
- 'def_value' => 'carmine-pink',
208
- 'value' => auxin_get_famous_colors_list(),
209
- 'holder' => '',
210
- 'class' => 'color',
211
- 'heading' => __('Color of Button','auxin-elements' ),
212
- 'description' => '',
213
- 'admin_label' => true,
214
- 'dependency' => '',
215
- 'weight' => '',
216
- 'group' => '' ,
217
  'edit_field_class' => ''
218
  ),
219
  array(
220
- 'param_name' => 'link',
221
- 'type' => 'textfield',
222
- 'value' => '',
223
- 'def_value' => '',
224
- 'holder' => 'textfield',
225
- 'class' => 'link',
226
- 'heading' => __('Link','auxin-elements' ),
227
- 'description' => '',
228
- 'admin_label' => true,
229
- 'dependency' => '',
230
- 'weight' => '',
231
- 'group' => '' ,
232
  'edit_field_class' => ''
233
  ),
234
  array(
 
 
235
  'param_name' => 'target',
236
  'type' => 'dropdown',
237
  'def_value' => '_self',
238
  'value' => array(
239
- '_self' => __('Current page' , 'auxin-elements' ),
240
  '_blank' => __('New page', 'auxin-elements' )
241
  ),
242
  'holder' => 'dropdown',
243
  'class' => 'target',
244
- 'heading' => __('Open link in','auxin-elements' ),
245
- 'description' => '',
246
  'admin_label' => true,
247
  'dependency' => '',
248
  'weight' => '',
@@ -262,11 +262,11 @@ function auxin_widget_button_callback( $atts, $shortcode_content = null ){
262
 
263
  // Defining default attributes
264
  $default_atts = array(
265
- 'label' => '',
266
  'size' => 'medium',
267
  'border' => '',
268
  'style' => '',
269
- 'uppercase' => '0',
270
  'dark' => '0',
271
  'icon' => '',
272
  'icon_align' => '',
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',
47
+ 'value' => 'Button',
48
+ 'holder' => 'textfield',
49
+ 'class' => 'label',
50
+ 'admin_label' => true,
51
+ 'dependency' => '',
52
+ 'weight' => '',
53
+ 'group' => '' ,
54
+ 'edit_field_class' => ''
55
  ),
56
  array(
57
+ 'heading' => __('Button Size','auxin-elements' ),
58
+ 'description' => '',
59
  'param_name' => 'size',
60
  'type' => 'dropdown',
61
  'def_value' => 'medium',
68
  ),
69
  'holder' => 'dropdown',
70
  'class' => 'round',
 
 
71
  'admin_label' => true,
72
  'dependency' => '',
73
  'weight' => '',
76
  ),
77
 
78
  array(
79
+ 'heading' => __('Button shape style','auxin-elements' ),
80
+ 'description' => '',
81
  'param_name' => 'border',
82
  'type' => 'aux_visual_select',
83
  'value' => '',
84
  'holder' => 'dropdown',
85
  'class' => 'border',
 
 
86
  'admin_label' => true,
87
  'dependency' => '',
88
  'weight' => '',
89
+ 'group' => 'Style' ,
90
  'edit_field_class' => '',
91
+ 'choices' => array(
92
+ '' => array(
93
  'label' => __('Box', 'auxin-elements' ),
94
  'image' => AUX_URL . 'images/visual-select/button-normal.svg'
95
  ),
105
  ),
106
 
107
  array(
108
+ 'heading' => __('Button style','auxin-elements' ),
109
+ 'description' => '',
110
  'param_name' => 'style',
111
  'type' => 'aux_visual_select',
112
  'value' => '',
113
  'holder' => 'dropdown',
114
  'class' => 'style',
 
 
115
  'admin_label' => true,
116
  'dependency' => '',
117
  'weight' => '',
118
+ 'group' => 'Style' ,
119
  'edit_field_class' => '',
120
  'choices' => array(
121
+ '' => array(
122
  'label' => __('Normal', 'auxin-elements' ),
123
  'image' => AUX_URL . 'images/visual-select/button-normal.svg'
124
  ),
125
+ '3d' => array(
126
  'label' => __('3D', 'auxin-elements' ),
127
  'image' => AUX_URL . 'images/visual-select/button-3d.svg'
128
  ),
134
  ),
135
 
136
  array(
137
+ 'heading' => __('Uppercase label','auxin-elements' ),
138
+ 'description' => '',
139
  'param_name' => 'uppercase',
140
  'type' => 'aux_switch',
141
  'def_value' => '',
142
+ 'value' => '1',
143
  'holder' => 'dropdown',
144
  'class' => 'showheader',
 
 
145
  'admin_label' => true,
146
  'dependency' => '',
147
  'weight' => '',
149
  'edit_field_class' => ''
150
  ),
151
  array(
152
+ 'heading' => __('Darken the label','auxin-elements' ),
153
+ 'description' => __('Darken label of button while mouse over it.','auxin-elements' ),
154
  'param_name' => 'dark',
155
  'type' => 'aux_switch',
156
  'def_value' => '',
157
  'value' => '0',
158
  'holder' => 'dropdown',
159
  'class' => 'showheader',
 
 
160
  'admin_label' => true,
161
  'dependency' => '',
162
  'weight' => '',
165
  ),
166
 
167
  array(
168
+ 'heading' => __('Icon for button','auxin-elements' ),
169
+ 'description' => '',
170
  'param_name' => 'icon',
171
  'type' => 'iconpicker',
172
  'def_value' => '',
173
  'value' => '',
174
  'holder' => 'icon',
175
  'class' => 'icon-name',
 
 
176
  'admin_label' => true,
177
  'dependency' => '',
178
  'weight' => '',
180
  'edit_field_class' => ''
181
  ),
182
  array(
183
+ 'heading' => __('Icon alignment','auxin-elements' ),
184
+ 'description' => '',
185
  'param_name' => 'icon_align',
186
  'type' => 'dropdown',
187
  'def_value' => '',
188
  'value' => array(
189
+ '' => __('Default' , 'auxin-elements' ),
190
+ 'left' => __('Left' , 'auxin-elements' ),
191
+ 'right' => __('Right' , 'auxin-elements' ),
192
+ 'over' => __('Over' , 'auxin-elements' ),
193
+ 'left-animate' => __('Animate from Left' , 'auxin-elements' ),
194
+ 'right-animate' => __('Animate from Right' , 'auxin-elements' )
195
  ),
196
  'holder' => 'dropdown',
197
  'class' => 'icon-align',
 
 
198
  'admin_label' => true,
199
  'dependency' => '',
200
  'weight' => '',
202
  'edit_field_class' => ''
203
  ),
204
  array(
205
+ 'heading' => __('Color of Button','auxin-elements' ),
206
+ 'description' => '',
207
+ 'param_name' => 'color_name',
208
+ 'type' => 'dropdown',
209
+ 'def_value' => 'carmine-pink',
210
+ 'value' => auxin_get_famous_colors_list(),
211
+ 'holder' => '',
212
+ 'class' => 'color',
213
+ 'admin_label' => true,
214
+ 'dependency' => '',
215
+ 'weight' => '',
216
+ 'group' => '' ,
217
  'edit_field_class' => ''
218
  ),
219
  array(
220
+ 'heading' => __('Link','auxin-elements' ),
221
+ 'description' => __('If you want to link your button.', 'auxin-elements' ),
222
+ 'param_name' => 'link',
223
+ 'type' => 'textfield',
224
+ 'value' => '',
225
+ 'def_value' => '',
226
+ 'holder' => 'textfield',
227
+ 'class' => 'link',
228
+ 'admin_label' => true,
229
+ 'dependency' => '',
230
+ 'weight' => '',
231
+ 'group' => '' ,
232
  'edit_field_class' => ''
233
  ),
234
  array(
235
+ 'heading' => __('Open link in','auxin-elements' ),
236
+ 'description' => '',
237
  'param_name' => 'target',
238
  'type' => 'dropdown',
239
  'def_value' => '_self',
240
  'value' => array(
241
+ '_self' => __('Current page' , 'auxin-elements' ),
242
  '_blank' => __('New page', 'auxin-elements' )
243
  ),
244
  'holder' => 'dropdown',
245
  'class' => 'target',
 
 
246
  'admin_label' => true,
247
  'dependency' => '',
248
  'weight' => '',
262
 
263
  // Defining default attributes
264
  $default_atts = array(
265
+ 'label' => 'Button',
266
  'size' => 'medium',
267
  'border' => '',
268
  'style' => '',
269
+ 'uppercase' => '1',
270
  'dark' => '0',
271
  'icon' => '',
272
  'icon_align' => '',
includes/elements/code.php CHANGED
@@ -40,14 +40,14 @@ function auxin_get_code_master_array( $master_array ) {
40
  'as_child' => '',
41
  'params' => array(
42
  array(
 
 
43
  'param_name' => 'title',
44
  'type' => 'textfield',
45
  'std' => '',
46
  'value' => '',
47
  'holder' => 'textfield',
48
  'class' => 'title',
49
- 'heading' => __('Title','auxin-elements' ),
50
- 'description' => '',
51
  'admin_label' => true,
52
  'dependency' => '',
53
  'weight' => '',
@@ -55,14 +55,14 @@ function auxin_get_code_master_array( $master_array ) {
55
  'edit_field_class' => ''
56
  ),
57
  array(
 
 
58
  'param_name' => 'content',
59
  'type' => 'textarea_html',
60
  'value' => '',
61
  'def_value' => '',
62
  'holder' => 'div',
63
  'class' => 'content',
64
- 'heading' => __('Code','auxin-elements' ),
65
- 'description' => '',
66
  'admin_label' => true,
67
  'dependency' => '',
68
  'weight' => '',
@@ -70,6 +70,8 @@ function auxin_get_code_master_array( $master_array ) {
70
  'edit_field_class' => ''
71
  ),
72
  array( // @TODO: language option does not work here
 
 
73
  'param_name' => 'language',
74
  'type' => 'dropdown',
75
  'def_value' => 'javascript ',
@@ -80,8 +82,6 @@ function auxin_get_code_master_array( $master_array ) {
80
  ),
81
  'holder' => 'dropdown',
82
  'class' => 'language',
83
- 'heading' => __('Language','auxin-elements' ),
84
- 'description' => '',
85
  'admin_label' => true,
86
  'dependency' => '',
87
  'weight' => '',
@@ -89,6 +89,8 @@ function auxin_get_code_master_array( $master_array ) {
89
  'edit_field_class' => ''
90
  ),
91
  array(
 
 
92
  'param_name' => 'theme',
93
  'type' => 'dropdown',
94
  'value' => array(
@@ -101,8 +103,6 @@ function auxin_get_code_master_array( $master_array ) {
101
  ),
102
  'holder' => 'dropdown',
103
  'class' => 'theme',
104
- 'heading' => __('Theme','auxin-elements' ),
105
- 'description' => __('Specifies the theme for code element.','auxin-elements' ),
106
  'admin_label' => true,
107
  'dependency' => '',
108
  'weight' => '',
@@ -110,14 +110,14 @@ function auxin_get_code_master_array( $master_array ) {
110
  'edit_field_class' => ''
111
  ),
112
  array(
 
 
113
  'param_name' => 'extra_classes',
114
  'type' => 'textfield',
115
  'value' => '',
116
  'def_value' => '',
117
  'holder' => 'textfield',
118
  'class' => 'extra_classes',
119
- 'heading' => __('Extra class name','auxin-elements' ),
120
- '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' ),
121
  'admin_label' => true,
122
  'dependency' => '',
123
  'weight' => '',
40
  'as_child' => '',
41
  'params' => array(
42
  array(
43
+ 'heading' => __('Title','auxin-elements' ),
44
+ 'description' => __('Code title, leave it empty if you don`t need title.', 'auxin-elements'),
45
  'param_name' => 'title',
46
  'type' => 'textfield',
47
  'std' => '',
48
  'value' => '',
49
  'holder' => 'textfield',
50
  'class' => 'title',
 
 
51
  'admin_label' => true,
52
  'dependency' => '',
53
  'weight' => '',
55
  'edit_field_class' => ''
56
  ),
57
  array(
58
+ 'heading' => __('Code','auxin-elements' ),
59
+ 'description' => '',
60
  'param_name' => 'content',
61
  'type' => 'textarea_html',
62
  'value' => '',
63
  'def_value' => '',
64
  'holder' => 'div',
65
  'class' => 'content',
 
 
66
  'admin_label' => true,
67
  'dependency' => '',
68
  'weight' => '',
70
  'edit_field_class' => ''
71
  ),
72
  array( // @TODO: language option does not work here
73
+ 'heading' => __('Language','auxin-elements' ),
74
+ 'description' => '',
75
  'param_name' => 'language',
76
  'type' => 'dropdown',
77
  'def_value' => 'javascript ',
82
  ),
83
  'holder' => 'dropdown',
84
  'class' => 'language',
 
 
85
  'admin_label' => true,
86
  'dependency' => '',
87
  'weight' => '',
89
  'edit_field_class' => ''
90
  ),
91
  array(
92
+ 'heading' => __('Theme','auxin-elements' ),
93
+ 'description' => __('Specifies the theme for code element.','auxin-elements' ),
94
  'param_name' => 'theme',
95
  'type' => 'dropdown',
96
  'value' => array(
103
  ),
104
  'holder' => 'dropdown',
105
  'class' => 'theme',
 
 
106
  'admin_label' => true,
107
  'dependency' => '',
108
  'weight' => '',
110
  'edit_field_class' => ''
111
  ),
112
  array(
113
+ 'heading' => __('Extra class name','auxin-elements' ),
114
+ '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' ),
115
  'param_name' => 'extra_classes',
116
  'type' => 'textfield',
117
  'value' => '',
118
  'def_value' => '',
119
  'holder' => 'textfield',
120
  'class' => 'extra_classes',
 
 
121
  'admin_label' => true,
122
  'dependency' => '',
123
  'weight' => '',
includes/elements/contact-box.php CHANGED
@@ -36,14 +36,14 @@ function get_auxin_contact_box( $master_array ) {
36
  'as_child' => '',
37
  'params' => array(
38
  array(
 
 
39
  'param_name' => 'title',
40
  'type' => 'textfield',
41
  'value' => '',
42
  'def_value' => '',
43
  'holder' => 'textfield',
44
  'class' => 'id',
45
- 'heading' => __('Title','auxin-elements'),
46
- 'description' => '',
47
  'admin_label' => true,
48
  'dependency' => '',
49
  'weight' => '',
@@ -51,13 +51,13 @@ function get_auxin_contact_box( $master_array ) {
51
  'edit_field_class' => ''
52
  ),
53
  array(
 
 
54
  'param_name' => 'email',
55
  'type' => 'textfield',
56
  'value' => '',
57
  'holder' => 'textfield',
58
  'class' => 'title',
59
- 'heading' => __('Email','auxin-elements'),
60
- 'description' => __('The contact box email address.', 'auxin-elements'),
61
  'admin_label' => true,
62
  'dependency' => '',
63
  'weight' => '',
@@ -65,40 +65,40 @@ function get_auxin_contact_box( $master_array ) {
65
  'edit_field_class' => ''
66
  ),
67
  array(
 
 
68
  'param_name' => 'telephone',
69
  'type' => 'textfield',
70
  'value' => '',
71
  'holder' => 'textfield',
72
  'class' => 'telephone',
73
- 'heading' => __('Telephone','auxin-elements'),
74
- 'description' => __('The contact box phone number.', 'auxin-elements'),
75
  'admin_label' => true,
76
  'weight' => '',
77
  'group' => '',
78
  'edit_field_class' => ''
79
  ),
80
  array(
 
 
81
  'param_name' => 'address',
82
  'type' => 'textfield',
83
  'value' => '',
84
  'holder' => 'textfield',
85
  'class' => '',
86
- 'heading' => __('Address','auxin-elements'),
87
- 'description' => __('The contact box address.', 'auxin-elements'),
88
  'admin_label' => true,
89
  'weight' => '',
90
  'group' => '',
91
  'edit_field_class' => ''
92
  ),
93
  array(
 
 
94
  'param_name' => 'show_socials',
95
  'type' => 'aux_switch',
96
  'def_value' => '',
97
  'value' => '1',
98
  'holder' => 'dropdown',
99
  'class' => 'show_socials',
100
- 'heading' => __('Show Socials','auxin-elements'),
101
- 'description' => __('Show socials below the info.','auxin-elements'),
102
  'admin_label' => true,
103
  'dependency' => '',
104
  'weight' => '',
@@ -106,14 +106,14 @@ function get_auxin_contact_box( $master_array ) {
106
  'edit_field_class' => ''
107
  ),
108
  array(
 
 
109
  'param_name' => 'show_map',
110
  'type' => 'aux_switch',
111
  'def_value' => '',
112
  'value' => '0',
113
  'holder' => 'dropdown',
114
  'class' => 'show_map',
115
- 'heading' => __('Show Map','auxin-elements'),
116
- 'description' => __('Show map above the info.','auxin-elements'),
117
  'admin_label' => true,
118
  'dependency' => '',
119
  'weight' => '',
@@ -121,68 +121,68 @@ function get_auxin_contact_box( $master_array ) {
121
  'edit_field_class' => ''
122
  ),
123
  array(
 
 
124
  'param_name' => 'height',
125
  'type' => 'textfield',
126
  'value' => '160',
127
  'def_value' => '160',
128
  'holder' => 'textfield',
129
  'class' => 'height',
130
- 'heading' => __('Map height','auxin-elements'),
131
- 'description' => __('Height of the map in pixels.', 'auxin-elements'),
132
  'admin_label' => true,
133
  'dependency' => array(
134
- 'element' => 'show_map',
135
- 'value' => '1'
136
  ),
137
  'weight' => '',
138
  'group' => '' ,
139
  'edit_field_class' => ''
140
  ),
141
  array(
 
 
142
  'param_name' => 'latitude',
143
  'type' => 'textfield',
144
  'value' => '40.7',
145
  'holder' => 'textfield',
146
  'class' => '',
147
- 'heading' => __('Latitude','auxin-elements'),
148
- 'description' => __('Latitude location over the map.', 'auxin-elements'),
149
  'admin_label' => true,
150
  'dependency' => array(
151
- 'element' => 'show_map',
152
- 'value' => '1'
153
  ),
154
  'weight' => '',
155
  'group' => '' ,
156
  'edit_field_class' => ''
157
  ),
158
  array(
 
 
159
  'param_name' => 'longitude',
160
  'type' => 'textfield',
161
  'value' => '-74',
162
  'holder' => 'textfield',
163
  'class' => '',
164
- 'heading' => __('Longitude','auxin-elements'),
165
- 'description' => __('Longitude location over the map.', 'auxin-elements'),
166
  'admin_label' => true,
167
  'dependency' => array(
168
- 'element' => 'show_map',
169
- 'value' => '1'
170
  ),
171
  'weight' => '',
172
  'group' => '' ,
173
  'edit_field_class' => ''
174
  ),
175
  array(
 
176
  'param_name' => 'type',
177
  'type' => 'dropdown',
178
  'def_value' => 'ROADMAP',
179
  'value' => array( 'ROADMAP' => __('ROADMAP', 'auxin-elements'), 'SATELLITE' => __('SATELLITE', 'auxin-elements') ),
180
  'holder' => 'dropdown',
181
  'class' => 'type',
182
- 'heading' => __('Map Type','auxin-elements'),
183
  'dependency' => array(
184
- 'element' => 'show_map',
185
- 'value' => '1'
186
  ),
187
  'admin_label' => true,
188
  'weight' => '',
@@ -190,20 +190,20 @@ function get_auxin_contact_box( $master_array ) {
190
  'edit_field_class' => ''
191
  ),
192
  array(
 
 
 
193
  'param_name' => 'style',
194
  'type' => 'textarea_html',
195
  'def_value' => '',
196
  'value' => '',
197
  'holder' => 'div',
198
  'class' => 'style',
199
- 'heading' => __('Map style','auxin-elements'),
200
- 'description' => __('This feild allow you to customize the presentation of the standard Google base maps. You can find many preset styles in ', 'auxin-elements') .
201
- '<a href="https://snazzymaps.com/" target="_blank">' . __('this website.', 'auxin-elements') . '</a>' ,
202
  'admin_label' => false,
203
  'dependency' => array(
204
  // array(
205
- 'element' => 'show_map',
206
- 'value' => '1'
207
  // ),
208
  // @TODO: this kind of dependency is not working we should fix it later
209
  // array(
@@ -217,85 +217,85 @@ function get_auxin_contact_box( $master_array ) {
217
  'edit_field_class' => ''
218
  ),
219
  array(
 
 
220
  'param_name' => 'marker_info',
221
  'type' => 'textfield',
222
  'value' => '',
223
  'def_value' => '',
224
  'holder' => 'textfield',
225
  'class' => 'marker_info',
226
- 'heading' => __('Marker info','auxin-elements'),
227
- 'description' => __('Marker popup text, leave it empty if you don\'t need it.', 'auxin-elements'),
228
  'admin_label' => true,
229
  'dependency' => array(
230
- 'element' => 'show_map',
231
- 'value' => '1'
232
  ),
233
  'weight' => '',
234
  'group' => '' ,
235
  'edit_field_class' => ''
236
  ),
237
  array(
 
 
238
  'param_name' => 'show_mapcontrols',
239
  'type' => 'aux_switch',
240
  'def_value' => '',
241
  'value' => '0',
242
  'holder' => 'dropdown',
243
  'class' => 'show_mapcontrols',
244
- 'heading' => __('Navigation control','auxin-elements'),
245
- 'description' => __('Show nacigation control on map.','auxin-elements'),
246
  'admin_label' => true,
247
  'dependency' => array(
248
- 'element' => 'show_map',
249
- 'value' => '1'
250
  ),
251
  'weight' => '',
252
  'group' => '' ,
253
  'edit_field_class' => ''
254
  ),
255
  array(
 
 
256
  'param_name' => 'zoom',
257
  'type' => 'textfield',
258
  'value' => '10',
259
  'holder' => 'textfield',
260
  'class' => '',
261
- 'heading' => __('Zoom','auxin-elements'),
262
- 'description' => __('The initial resolution at which to display the map, between 1 to 20.', 'auxin-elements'),
263
  'admin_label' => true,
264
  'dependency' => array(
265
- 'element' => 'show_map',
266
- 'value' => '1'
267
  ),
268
  'weight' => '',
269
  'group' => '' ,
270
  'edit_field_class' => ''
271
  ),
272
  array(
 
 
273
  'param_name' => 'zoom_wheel',
274
  'type' => 'aux_switch',
275
  'def_value' => '',
276
  'value' => '0',
277
  'holder' => 'dropdown',
278
  'class' => 'zoom_wheel',
279
- 'heading' => __('Zoom with mouse wheel','auxin-elements'),
280
- 'description' => '',
281
  'admin_label' => true,
282
  'dependency' => array(
283
- 'element' => 'show_map',
284
- 'value' => '1'
285
  ),
286
  'weight' => '',
287
  'group' => '' ,
288
  'edit_field_class' => ''
289
  ),
290
  array(
 
 
291
  'param_name' => 'extra_classes',
292
  'type' => 'textfield',
293
  'value' => '',
294
  'def_value' => '',
295
  'holder' => 'textfield',
296
  'class' => 'extra_classes',
297
- 'heading' => __('Extra class name','auxin-elements'),
298
- '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'),
299
  'admin_label' => true,
300
  'dependency' => '',
301
  'weight' => '',
36
  'as_child' => '',
37
  'params' => array(
38
  array(
39
+ 'heading' => __('Title','auxin-elements'),
40
+ 'description' => __('Contact box title, leave it empty if you don`t need title.', 'auxin-elements'),
41
  'param_name' => 'title',
42
  'type' => 'textfield',
43
  'value' => '',
44
  'def_value' => '',
45
  'holder' => 'textfield',
46
  'class' => 'id',
 
 
47
  'admin_label' => true,
48
  'dependency' => '',
49
  'weight' => '',
51
  'edit_field_class' => ''
52
  ),
53
  array(
54
+ 'heading' => __('Email','auxin-elements'),
55
+ 'description' => __('Contact box email address.', 'auxin-elements'),
56
  'param_name' => 'email',
57
  'type' => 'textfield',
58
  'value' => '',
59
  'holder' => 'textfield',
60
  'class' => 'title',
 
 
61
  'admin_label' => true,
62
  'dependency' => '',
63
  'weight' => '',
65
  'edit_field_class' => ''
66
  ),
67
  array(
68
+ 'heading' => __('Telephone','auxin-elements'),
69
+ 'description' => __('Contact box phone number.', 'auxin-elements'),
70
  'param_name' => 'telephone',
71
  'type' => 'textfield',
72
  'value' => '',
73
  'holder' => 'textfield',
74
  'class' => 'telephone',
 
 
75
  'admin_label' => true,
76
  'weight' => '',
77
  'group' => '',
78
  'edit_field_class' => ''
79
  ),
80
  array(
81
+ 'heading' => __('Address','auxin-elements'),
82
+ 'description' => __('Contact box address.', 'auxin-elements'),
83
  'param_name' => 'address',
84
  'type' => 'textfield',
85
  'value' => '',
86
  'holder' => 'textfield',
87
  'class' => '',
 
 
88
  'admin_label' => true,
89
  'weight' => '',
90
  'group' => '',
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',
98
  'def_value' => '',
99
  'value' => '1',
100
  'holder' => 'dropdown',
101
  'class' => 'show_socials',
 
 
102
  'admin_label' => true,
103
  'dependency' => '',
104
  'weight' => '',
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',
113
  'def_value' => '',
114
  'value' => '0',
115
  'holder' => 'dropdown',
116
  'class' => 'show_map',
 
 
117
  'admin_label' => true,
118
  'dependency' => '',
119
  'weight' => '',
121
  'edit_field_class' => ''
122
  ),
123
  array(
124
+ 'heading' => __('Map height','auxin-elements'),
125
+ 'description' => __('Height of the map in pixels.', 'auxin-elements'),
126
  'param_name' => 'height',
127
  'type' => 'textfield',
128
  'value' => '160',
129
  'def_value' => '160',
130
  'holder' => 'textfield',
131
  'class' => 'height',
 
 
132
  'admin_label' => true,
133
  'dependency' => array(
134
+ 'element' => 'show_map',
135
+ 'value' => '1'
136
  ),
137
  'weight' => '',
138
  'group' => '' ,
139
  'edit_field_class' => ''
140
  ),
141
  array(
142
+ 'heading' => __('Latitude','auxin-elements'),
143
+ 'description' => __('Latitude location over the map.', 'auxin-elements'),
144
  'param_name' => 'latitude',
145
  'type' => 'textfield',
146
  'value' => '40.7',
147
  'holder' => 'textfield',
148
  'class' => '',
 
 
149
  'admin_label' => true,
150
  'dependency' => array(
151
+ 'element' => 'show_map',
152
+ 'value' => '1'
153
  ),
154
  'weight' => '',
155
  'group' => '' ,
156
  'edit_field_class' => ''
157
  ),
158
  array(
159
+ 'heading' => __('Longitude','auxin-elements'),
160
+ 'description' => __('Longitude location over the map.', 'auxin-elements'),
161
  'param_name' => 'longitude',
162
  'type' => 'textfield',
163
  'value' => '-74',
164
  'holder' => 'textfield',
165
  'class' => '',
 
 
166
  'admin_label' => true,
167
  'dependency' => array(
168
+ 'element' => 'show_map',
169
+ 'value' => '1'
170
  ),
171
  'weight' => '',
172
  'group' => '' ,
173
  'edit_field_class' => ''
174
  ),
175
  array(
176
+ 'heading' => __('Map Type','auxin-elements'),
177
  'param_name' => 'type',
178
  'type' => 'dropdown',
179
  'def_value' => 'ROADMAP',
180
  'value' => array( 'ROADMAP' => __('ROADMAP', 'auxin-elements'), 'SATELLITE' => __('SATELLITE', 'auxin-elements') ),
181
  'holder' => 'dropdown',
182
  'class' => 'type',
 
183
  'dependency' => array(
184
+ 'element' => 'show_map',
185
+ 'value' => '1'
186
  ),
187
  'admin_label' => true,
188
  'weight' => '',
190
  'edit_field_class' => ''
191
  ),
192
  array(
193
+ 'heading' => __('Map style','auxin-elements'),
194
+ 'description' => __('This feild allows you to customize the presentation of the standard Google base maps. You can find many preset styles in ', 'auxin-elements') .
195
+ '<a href="https://snazzymaps.com/" target="_blank">' . __('this website.', 'auxin-elements') . '</a>' ,
196
  'param_name' => 'style',
197
  'type' => 'textarea_html',
198
  'def_value' => '',
199
  'value' => '',
200
  'holder' => 'div',
201
  'class' => 'style',
 
 
 
202
  'admin_label' => false,
203
  'dependency' => array(
204
  // array(
205
+ 'element' => 'show_map',
206
+ 'value' => '1'
207
  // ),
208
  // @TODO: this kind of dependency is not working we should fix it later
209
  // array(
217
  'edit_field_class' => ''
218
  ),
219
  array(
220
+ 'heading' => __('Marker info','auxin-elements'),
221
+ 'description' => __('Marker popup text, leave it empty if you don\'t need it.', 'auxin-elements'),
222
  'param_name' => 'marker_info',
223
  'type' => 'textfield',
224
  'value' => '',
225
  'def_value' => '',
226
  'holder' => 'textfield',
227
  'class' => 'marker_info',
 
 
228
  'admin_label' => true,
229
  'dependency' => array(
230
+ 'element' => 'show_map',
231
+ 'value' => '1'
232
  ),
233
  'weight' => '',
234
  'group' => '' ,
235
  'edit_field_class' => ''
236
  ),
237
  array(
238
+ 'heading' => __('Navigation control','auxin-elements'),
239
+ 'description' => __('Show nacigation control on map.','auxin-elements'),
240
  'param_name' => 'show_mapcontrols',
241
  'type' => 'aux_switch',
242
  'def_value' => '',
243
  'value' => '0',
244
  'holder' => 'dropdown',
245
  'class' => 'show_mapcontrols',
 
 
246
  'admin_label' => true,
247
  'dependency' => array(
248
+ 'element' => 'show_map',
249
+ 'value' => '1'
250
  ),
251
  'weight' => '',
252
  'group' => '' ,
253
  'edit_field_class' => ''
254
  ),
255
  array(
256
+ 'heading' => __('Zoom','auxin-elements'),
257
+ 'description' => __('The initial resolution at which to display the map, between 1 to 20.', 'auxin-elements'),
258
  'param_name' => 'zoom',
259
  'type' => 'textfield',
260
  'value' => '10',
261
  'holder' => 'textfield',
262
  'class' => '',
 
 
263
  'admin_label' => true,
264
  'dependency' => array(
265
+ 'element' => 'show_map',
266
+ 'value' => '1'
267
  ),
268
  'weight' => '',
269
  'group' => '' ,
270
  'edit_field_class' => ''
271
  ),
272
  array(
273
+ 'heading' => __('Zoom with mouse wheel','auxin-elements'),
274
+ 'description' => '',
275
  'param_name' => 'zoom_wheel',
276
  'type' => 'aux_switch',
277
  'def_value' => '',
278
  'value' => '0',
279
  'holder' => 'dropdown',
280
  'class' => 'zoom_wheel',
 
 
281
  'admin_label' => true,
282
  'dependency' => array(
283
+ 'element' => 'show_map',
284
+ 'value' => '1'
285
  ),
286
  'weight' => '',
287
  'group' => '' ,
288
  'edit_field_class' => ''
289
  ),
290
  array(
291
+ 'heading' => __('Extra class name','auxin-elements'),
292
+ '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'),
293
  'param_name' => 'extra_classes',
294
  'type' => 'textfield',
295
  'value' => '',
296
  'def_value' => '',
297
  'holder' => 'textfield',
298
  'class' => 'extra_classes',
 
 
299
  'admin_label' => true,
300
  'dependency' => '',
301
  'weight' => '',
includes/elements/contact-form.php CHANGED
@@ -40,84 +40,84 @@ function auxin_get_contact_form_master_array( $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' => 'title',
49
- 'heading' => __('Title','auxin-elements' ),
50
- 'description' => __('Adds a title to the contact form.', 'auxin-elements' ),
51
- 'admin_label' => true,
52
- 'dependency' => '',
53
- 'weight' => '',
54
- 'group' => '' ,
55
  'edit_field_class' => ''
56
  ),
57
  array(
58
- 'param_name' => 'email',
59
- 'type' => 'textfield',
60
- 'value' => '',
61
- 'def_value' => '',
62
- 'holder' => 'textfield',
63
- 'class' => 'email',
64
- 'heading' => __('Email','auxin-elements' ),
65
- 'description' => __('The email address of message\'s recipient', 'auxin-elements' ),
66
- 'admin_label' => true,
67
- 'dependency' => '',
68
- 'weight' => '',
69
- 'group' => '' ,
70
  'edit_field_class' => ''
71
  ),
72
  array(
73
- 'param_name' => 'type',
74
- 'type' => 'dropdown',
75
- 'value' => array(
76
- 'phlox' => __('Phlox Contact Form', 'auxin-elements' ),
77
- 'cf7' => __('Contact Form 7 plugin', 'auxin-elements' ),
 
 
78
  ),
79
- 'std' => "phlox",
80
- 'def_value' => '',
81
- 'holder' => 'textfield',
82
- 'class' => 'width',
83
- 'heading' => __('Contact form type','auxin-elements' ),
84
- 'description' => __('Specifies the contact form element\'s type. The built-in form or adds Contact Form 7.', 'auxin-elements' ),
85
- 'admin_label' => true,
86
- 'weight' => '',
87
- 'group' => '' ,
88
  'edit_field_class' => ''
89
  ),
90
  array(
91
- 'param_name' => 'cf7_shortcode',
92
- 'type' => 'textfield',
93
- 'value' => '',
94
- 'def_value' => '',
95
- 'holder' => 'textfield',
96
- 'class' => 'cf7_shortcode',
97
- 'heading' => __('Contact form 7 shortcode','auxin-elements' ),
98
- 'description' => '',
99
- 'admin_label' => true,
100
- 'dependency' => array(
101
- 'element' => 'type',
102
- 'value' => 'cf7'
103
- ),
104
- 'weight' => '',
105
- 'group' => '' ,
106
  'edit_field_class' => ''
107
  ),
108
  array(
109
- 'param_name' => 'extra_classes',
110
- 'type' => 'textfield',
111
- 'value' => '',
112
- 'def_value' => '',
113
- 'holder' => 'textfield',
114
- 'class' => 'extra_classes',
115
- 'heading' => __('Extra class name','auxin-elements' ),
116
- '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' ),
117
- 'admin_label' => true,
118
- 'admin_label' => true,
119
- 'weight' => '',
120
- 'group' => '' ,
121
  'edit_field_class' => ''
122
  )
123
  )
40
  'as_child' => '',
41
  'params' => array(
42
  array(
43
+ 'heading' => __('Title','auxin-elements' ),
44
+ 'description' => __('Contact form title, leave it empty if you don`t need title.', 'auxin-elements'),
45
+ 'param_name' => 'title',
46
+ 'type' => 'textfield',
47
+ 'value' => '',
48
+ 'def_value' => '',
49
+ 'holder' => 'textfield',
50
+ 'class' => 'title',
51
+ 'admin_label' => true,
52
+ 'dependency' => '',
53
+ 'weight' => '',
54
+ 'group' => '' ,
55
  'edit_field_class' => ''
56
  ),
57
  array(
58
+ 'heading' => __('Email','auxin-elements' ),
59
+ 'description' => __('Email address of message\'s recipient', 'auxin-elements' ),
60
+ 'param_name' => 'email',
61
+ 'type' => 'textfield',
62
+ 'value' => '',
63
+ 'def_value' => '',
64
+ 'holder' => 'textfield',
65
+ 'class' => 'email',
66
+ 'admin_label' => true,
67
+ 'dependency' => '',
68
+ 'weight' => '',
69
+ 'group' => '' ,
70
  'edit_field_class' => ''
71
  ),
72
  array(
73
+ 'heading' => __('Contact form type','auxin-elements' ),
74
+ 'description' => __('Specifies contact form element\'s type. Whether to use built-in form or Contact Form 7.', 'auxin-elements' ),
75
+ 'param_name' => 'type',
76
+ 'type' => 'dropdown',
77
+ 'value' => array(
78
+ 'phlox' => __('Phlox Contact Form', 'auxin-elements' ),
79
+ 'cf7' => __('Contact Form 7 plugin', 'auxin-elements' ),
80
  ),
81
+ 'std' => "phlox",
82
+ 'def_value' => '',
83
+ 'holder' => 'textfield',
84
+ 'class' => 'width',
85
+ 'admin_label' => true,
86
+ 'weight' => '',
87
+ 'group' => '' ,
 
 
88
  'edit_field_class' => ''
89
  ),
90
  array(
91
+ 'heading' => __('Contact form 7 shortcode','auxin-elements' ),
92
+ 'description' => __('Put one of your Contact form 7 shortcodes that you created.','auxin-elements' ),
93
+ 'param_name' => 'cf7_shortcode',
94
+ 'type' => 'textfield',
95
+ 'value' => '',
96
+ 'def_value' => '',
97
+ 'holder' => 'textfield',
98
+ 'class' => 'cf7_shortcode',
99
+ 'admin_label' => true,
100
+ 'dependency' => array(
101
+ 'element' => 'type',
102
+ 'value' => 'cf7'
103
+ ),
104
+ 'weight' => '',
105
+ 'group' => '' ,
106
  'edit_field_class' => ''
107
  ),
108
  array(
109
+ 'heading' => __('Extra class name','auxin-elements' ),
110
+ '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' ),
111
+ 'param_name' => 'extra_classes',
112
+ 'type' => 'textfield',
113
+ 'value' => '',
114
+ 'def_value' => '',
115
+ 'holder' => 'textfield',
116
+ 'class' => 'extra_classes',
117
+ 'admin_label' => true,
118
+ 'admin_label' => true,
119
+ 'weight' => '',
120
+ 'group' => '' ,
121
  'edit_field_class' => ''
122
  )
123
  )
includes/elements/divider.php CHANGED
@@ -23,7 +23,7 @@ function auxin_get_divider_master_array( $master_array ) {
23
  'is_widget' => true,
24
  'is_shortcode' => true,
25
  'is_so' => true,
26
- 'is_vc' => false,
27
  'category' => THEME_NAME,
28
  'group' => '',
29
  'admin_enqueue_js' => '',
@@ -40,13 +40,13 @@ function auxin_get_divider_master_array( $master_array ) {
40
  'as_child' => '',
41
  'params' => array(
42
  array(
 
 
43
  'param_name' => 'style',
44
  'type' => 'aux_visual_select',
45
  'std' => "solid",
46
  'holder' => 'dropdown',
47
  'class' => 'style',
48
- 'heading' => __('Divider Style','auxin-elements'),
49
- 'description' => '',
50
  'admin_label' => true,
51
  'dependency' => '',
52
  'weight' => '',
@@ -55,7 +55,7 @@ function auxin_get_divider_master_array( $master_array ) {
55
  'choices' => array(
56
  'white-space' => array(
57
  'label' => __('White Space', 'auxin-elements'),
58
- 'image' => AUX_URL . 'images/visual-select/divider-white-space.svg'
59
  ),
60
  'solid' => array(
61
  'label' => __('Solid', 'auxin-elements'),
@@ -76,37 +76,37 @@ function auxin_get_divider_master_array( $master_array ) {
76
  )
77
  ),
78
  array(
 
 
79
  'param_name' => 'width',
80
  'type' => 'dropdown',
81
  'value' => array(
82
- 'large' => __('Large', 'auxin-elements'),
83
- 'medium' => __('Medium', 'auxin-elements'),
84
- 'small' => __('Small', 'auxin-elements')
85
  ),
86
  'std' => 'medium',
87
  'def_value' => 'medium',
88
  'holder' => 'textfield',
89
  'class' => 'width',
90
- 'heading' => __('Width','auxin-elements'),
91
- 'description' => __('Specifies the size of divider.', 'auxin-elements'),
92
  'admin_label' => true,
93
  'dependency' => array(
94
- 'element' => 'style',
95
- 'value' => array('solid', 'dashed', 'circle-symbol', 'diamond-symbol')
96
  ),
97
  'weight' => '',
98
  'group' => '' ,
99
  'edit_field_class' => ''
100
  ),
101
  array(
 
 
102
  'param_name' => 'margin_top',
103
  'type' => 'textfield',
104
  'value' => '',
105
  'def_value' => '',
106
  'holder' => 'textfield',
107
  'class' => 'margin_top',
108
- 'heading' => __('Margin top (px)','auxin-elements'),
109
- 'description' => __('Adds space above the divider in pixels.', 'auxin-elements'),
110
  'admin_label' => false,
111
  'dependency' => '',
112
  'weight' => '',
@@ -114,14 +114,14 @@ function auxin_get_divider_master_array( $master_array ) {
114
  'edit_field_class' => ''
115
  ),
116
  array(
 
 
117
  'param_name' => 'margin_bottom',
118
  'type' => 'textfield',
119
  'value' => '',
120
  'def_value' => '',
121
  'holder' => 'textfield',
122
  'class' => 'margin_bottom',
123
- 'heading' => __('Margin bottom (px)','auxin-elements'),
124
- 'description' => __('Adds space below the devider in pixels.', 'auxin-elements'),
125
  'admin_label' => true,
126
  'dependency' => '',
127
  'weight' => '',
@@ -129,14 +129,14 @@ function auxin_get_divider_master_array( $master_array ) {
129
  'edit_field_class' => ''
130
  ),
131
  array(
 
 
132
  'param_name' => 'extra_classes',
133
  'type' => 'textfield',
134
  'value' => '',
135
  'def_value' => '',
136
  'holder' => 'textfield',
137
  'class' => 'extra_classes',
138
- 'heading' => __('Extra class name','auxin-elements'),
139
- '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. you can add multiple CSS class by separating them with space.', 'auxin-elements'),
140
  'admin_label' => true,
141
  'dependency' => '',
142
  'weight' => '',
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' => '',
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',
47
  'std' => "solid",
48
  'holder' => 'dropdown',
49
  'class' => 'style',
 
 
50
  'admin_label' => true,
51
  'dependency' => '',
52
  'weight' => '',
55
  'choices' => array(
56
  'white-space' => array(
57
  'label' => __('White Space', 'auxin-elements'),
58
+ 'image' => AUX_URL . 'images/visual-select/divider-white-space.svg'
59
  ),
60
  'solid' => array(
61
  'label' => __('Solid', 'auxin-elements'),
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',
83
  'value' => array(
84
+ 'large' => __('Large', 'auxin-elements'),
85
+ 'medium' => __('Medium', 'auxin-elements'),
86
+ 'small' => __('Small', 'auxin-elements')
87
  ),
88
  'std' => 'medium',
89
  'def_value' => 'medium',
90
  'holder' => 'textfield',
91
  'class' => 'width',
 
 
92
  'admin_label' => true,
93
  'dependency' => array(
94
+ 'element' => 'style',
95
+ 'value' => array('solid', 'dashed', 'circle-symbol', 'diamond-symbol')
96
  ),
97
  'weight' => '',
98
  'group' => '' ,
99
  'edit_field_class' => ''
100
  ),
101
  array(
102
+ 'heading' => __('Margin top (px)','auxin-elements'),
103
+ 'description' => __('Adds space above the divider in pixels.', 'auxin-elements'),
104
  'param_name' => 'margin_top',
105
  'type' => 'textfield',
106
  'value' => '',
107
  'def_value' => '',
108
  'holder' => 'textfield',
109
  'class' => 'margin_top',
 
 
110
  'admin_label' => false,
111
  'dependency' => '',
112
  'weight' => '',
114
  'edit_field_class' => ''
115
  ),
116
  array(
117
+ 'heading' => __('Margin bottom (px)','auxin-elements'),
118
+ 'description' => __('Adds space below the devider in pixels.', 'auxin-elements'),
119
  'param_name' => 'margin_bottom',
120
  'type' => 'textfield',
121
  'value' => '',
122
  'def_value' => '',
123
  'holder' => 'textfield',
124
  'class' => 'margin_bottom',
 
 
125
  'admin_label' => true,
126
  'dependency' => '',
127
  'weight' => '',
129
  'edit_field_class' => ''
130
  ),
131
  array(
132
+ 'heading' => __('Extra class name','auxin-elements'),
133
+ '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. you can add multiple CSS class by separating them with space.', 'auxin-elements'),
134
  'param_name' => 'extra_classes',
135
  'type' => 'textfield',
136
  'value' => '',
137
  'def_value' => '',
138
  'holder' => 'textfield',
139
  'class' => 'extra_classes',
 
 
140
  'admin_label' => true,
141
  'dependency' => '',
142
  'weight' => '',
includes/elements/dropcap.php CHANGED
@@ -39,54 +39,54 @@ function auxin_get_dropcap_master_array( $master_array ) {
39
  'as_child' => '',
40
  'params' => array(
41
  array(
 
 
42
  'param_name' => 'style',
43
  'type' => 'aux_visual_select',
44
  'std' => 'classic',
45
  'holder' => 'dropdown',
46
  'class' => 'style',
47
- 'heading' => __('Dropcap Style','auxin-elements' ),
48
- 'description' => '',
49
  'admin_label' => true,
50
  'dependency' => '',
51
  'weight' => '',
52
  'group' => '' ,
53
  'edit_field_class' => '',
54
- 'choices' => array(
55
  'classic' => array(
56
  'label' => __('Classic', 'auxin-elements' ),
57
- 'image' => AUX_URL . 'images/visual-select/dropcap-classic.svg'
58
  ),
59
- 'square' => array(
60
  'label' => __('Square', 'auxin-elements' ),
61
- 'image' => AUX_URL . 'images/visual-select/dropcap-square.svg'
62
  ),
63
  'square-outline' => array(
64
  'label' => __('Outline Square', 'auxin-elements' ),
65
- 'image' => AUX_URL . 'images/visual-select/dropcap-square-outline.svg'
66
  ),
67
- 'square-round' => array(
68
  'label' => __('Round Square', 'auxin-elements' ),
69
- 'image' => AUX_URL . 'images/visual-select/dropcap-square-round.svg'
70
  ),
71
- 'circle' => array(
72
  'label' => __('Circle', 'auxin-elements' ),
73
- 'image' => AUX_URL . 'images/visual-select/dropcap-circle.svg'
74
  ),
75
  'circle-outline' => array(
76
  'label' => __('Outline Circle', 'auxin-elements' ),
77
- 'image' => AUX_URL . 'images/visual-select/dropcap-circle-outline.svg'
78
  )
79
  )
80
  ),
81
  array(
 
 
82
  'param_name' => 'content',
83
  'type' => 'textarea_html',
84
  'value' => '',
85
  'def_value' => '',
86
  'holder' => 'div',
87
  'class' => 'content',
88
- 'heading' => __('Content','auxin-elements' ),
89
- 'description' => __('Enter the text to show as dropcap text.', 'auxin-elements' ),
90
  'admin_label' => true,
91
  'dependency' => '',
92
  'weight' => '',
@@ -94,14 +94,14 @@ function auxin_get_dropcap_master_array( $master_array ) {
94
  'edit_field_class' => ''
95
  ),
96
  array(
 
 
97
  'param_name' => 'extra_classes',
98
  'type' => 'textfield',
99
  'def_value' => '',
100
  'value' => '',
101
  'holder' => 'textfield',
102
  'class' => 'extra_classes',
103
- 'heading' => __('Extra class name','auxin-elements' ),
104
- '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' ),
105
  'admin_label' => true,
106
  'dependency' => '',
107
  'weight' => '',
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',
46
  'std' => 'classic',
47
  'holder' => 'dropdown',
48
  'class' => 'style',
 
 
49
  'admin_label' => true,
50
  'dependency' => '',
51
  'weight' => '',
52
  'group' => '' ,
53
  'edit_field_class' => '',
54
+ 'choices' => array(
55
  'classic' => array(
56
  'label' => __('Classic', 'auxin-elements' ),
57
+ 'image' => AUX_URL . 'images/visual-select/dropcap-classic.svg'
58
  ),
59
+ 'square' => array(
60
  'label' => __('Square', 'auxin-elements' ),
61
+ 'image' => AUX_URL . 'images/visual-select/dropcap-square.svg'
62
  ),
63
  'square-outline' => array(
64
  'label' => __('Outline Square', 'auxin-elements' ),
65
+ 'image' => AUX_URL . 'images/visual-select/dropcap-square-outline.svg'
66
  ),
67
+ 'square-round' => array(
68
  'label' => __('Round Square', 'auxin-elements' ),
69
+ 'image' => AUX_URL . 'images/visual-select/dropcap-square-round.svg'
70
  ),
71
+ 'circle' => array(
72
  'label' => __('Circle', 'auxin-elements' ),
73
+ 'image' => AUX_URL . 'images/visual-select/dropcap-circle.svg'
74
  ),
75
  'circle-outline' => array(
76
  'label' => __('Outline Circle', 'auxin-elements' ),
77
+ 'image' => AUX_URL . 'images/visual-select/dropcap-circle-outline.svg'
78
  )
79
  )
80
  ),
81
  array(
82
+ 'heading' => __('Content','auxin-elements' ),
83
+ 'description' => __('Enter a text to show as dropcap text.', 'auxin-elements' ),
84
  'param_name' => 'content',
85
  'type' => 'textarea_html',
86
  'value' => '',
87
  'def_value' => '',
88
  'holder' => 'div',
89
  'class' => 'content',
 
 
90
  'admin_label' => true,
91
  'dependency' => '',
92
  'weight' => '',
94
  'edit_field_class' => ''
95
  ),
96
  array(
97
+ 'heading' => __('Extra class name','auxin-elements' ),
98
+ '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' ),
99
  'param_name' => 'extra_classes',
100
  'type' => 'textfield',
101
  'def_value' => '',
102
  'value' => '',
103
  'holder' => 'textfield',
104
  'class' => 'extra_classes',
 
 
105
  'admin_label' => true,
106
  'dependency' => '',
107
  'weight' => '',
includes/elements/gallery.php CHANGED
@@ -38,30 +38,30 @@ function auxin_get_gallery_master_array( $master_array ) {
38
  'as_parent' => '',
39
  'as_child' => '',
40
  'params' => array(
41
- // array(
42
- // 'param_name' => 'title',
43
- // 'type' => 'textfield',
44
- // 'value' => '',
45
- // 'def_value' => '',
46
- // 'holder' => 'textfield',
47
- // 'class' => 'id',
48
- // 'heading' => __('Gallery title','auxin-elements'),
49
- // 'description' => '',
50
- // 'admin_label' => true,
51
- // 'dependency' => '',
52
- // 'weight' => '',
53
- // 'group' => '' ,
54
- // 'edit_field_class' => ''
55
- // ),
56
  array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  'param_name' => 'include',
58
  'type' => 'attach_images',
59
  'value' => '',
60
  'def_value' => '',
61
  'holder' => 'attach_images',
62
  'class' => 'include',
63
- 'heading' => __('Images','auxin-elements'),
64
- 'description' => '',
65
  'admin_label' => true,
66
  'dependency' => '',
67
  'weight' => '',
@@ -69,21 +69,21 @@ function auxin_get_gallery_master_array( $master_array ) {
69
  'edit_field_class' => ''
70
  ),
71
  array(
 
 
72
  'param_name' => 'columns',
73
  'type' => 'dropdown',
74
  'value' => array(
75
- '1' => __('1 Column' , 'auxin-elements'),
76
- '2' => __('2 Columns', 'auxin-elements'),
77
- '3' => __('3 Columns', 'auxin-elements'),
78
- '4' => __('4 Columns', 'auxin-elements'),
79
- '5' => __('5 Columns', 'auxin-elements'),
80
- '6' => __('6 Columns', 'auxin-elements')
81
  ),
82
  'def_value' => '2',
83
  'holder' => 'dropdown',
84
  'class' => 'columns',
85
- 'heading' => __('Column number','auxin-elements'),
86
- 'description' => '',
87
  'admin_label' => true,
88
  'dependency' => '',
89
  'weight' => '',
@@ -91,63 +91,65 @@ function auxin_get_gallery_master_array( $master_array ) {
91
  'edit_field_class' => ''
92
  ),
93
  array(
94
- 'param_name' => 'wp_order',
95
- 'type' => 'aux_switch',
96
- 'value' => '0',
97
- 'class' => '',
98
- 'heading' => __('Order images by query','auxin-elements'),
99
- 'description' => '',
100
- 'admin_label' => true,
101
- 'dependency' => '',
102
- 'weight' => '',
103
- 'group' => '' ,
104
- 'edit_field_class' => ''
105
  ),
106
  array(
107
- 'param_name' => 'order',
108
- 'type' => 'dropdown',
109
- 'def_value' => 'ASC',
110
- 'value' => array(
111
- 'ASC' => __('ASC' , 'auxin-elements'),
112
- 'DESC' => __('DESC', 'auxin-elements')
 
 
113
  ),
114
- 'holder' => 'dropdown',
115
- 'class' => 'order',
116
- 'heading' => __('Order','auxin-elements'),
117
- 'description' => __('Order images ascending or descending','auxin-elements'),
118
- 'admin_label' => true,
119
- 'dependency' => array(
120
- 'element' => 'wp_order',
121
- 'value' => '1'
122
  ),
123
- 'weight' => '',
124
- 'group' => '' ,
125
- 'edit_field_class' => ''
126
  ),
127
  array(
 
 
128
  'param_name' => 'orderby',
129
  'type' => 'dropdown',
130
  'def_value' => 'menu_order ID',
131
- 'value' => array(
132
  'menu_order ID' => __('Menu Order' , 'auxin-elements'),
133
  'date' => __('Date' , 'auxin-elements'),
134
  'ID' => __('ID' , 'auxin-elements'),
135
  'none' => __('None' , 'auxin-elements')
136
  ),
137
- 'dependency' => array(
138
- 'element' => 'wp_order',
139
- 'value' => '1'
140
  ),
141
  'holder' => 'dropdown',
142
  'class' => 'orderby',
143
- 'heading' => __('Order images by','auxin-elements'),
144
- 'description' => '',
145
  'admin_label' => true,
146
  'weight' => '',
147
  'group' => '' ,
148
  'edit_field_class' => ''
149
  ),
150
  array(
 
 
151
  'param_name' => 'layout',
152
  'type' => 'dropdown',
153
  'def_value' => 'grid',
@@ -158,8 +160,6 @@ function auxin_get_gallery_master_array( $master_array ) {
158
  ),
159
  'holder' => 'dropdown',
160
  'class' => 'layout',
161
- 'heading' => __('Gallery layout','auxin-elements'),
162
- 'description' => '',
163
  'admin_label' => true,
164
  'dependency' => '',
165
  'weight' => '',
@@ -167,85 +167,85 @@ function auxin_get_gallery_master_array( $master_array ) {
167
  'edit_field_class' => ''
168
  ),
169
  array(
170
- 'param_name' => 'link',
171
- 'type' => 'dropdown',
172
- 'def_value' => 'lightbox',
173
- 'value' => array(
174
- 'lightbox' => __('Lightbox', 'auxin-elements'),
175
- 'none' => __('None' , 'auxin-elements'),
176
- '' => __('Attachment Page' , 'auxin-elements'),
177
- 'file' => __('File' , 'auxin-elements')
 
 
178
  ),
179
- 'holder' => 'dropdown',
180
- 'class' => 'link',
181
- 'heading' => __('Link images to','auxin-elements'),
182
- 'description' => '',
183
- 'admin_label' => true,
184
- 'dependency' => '',
185
- 'weight' => '',
186
- 'group' => '' ,
187
- 'edit_field_class' => ''
188
  ),
189
  array(
190
- 'param_name' => 'size',
191
- 'type' => 'dropdown',
192
- 'def_value' => 'medium',
193
- 'value' => array(
194
- 'full' => __('Original' , 'auxin-elements'),
195
- 'large' => __('Large' , 'auxin-elements'),
196
- 'medium' => __('Medium' , 'auxin-elements'),
197
- 'thumbnail' => __('Thumbnail' , 'auxin-elements')
 
 
198
  ),
199
- 'holder' => 'dropdown',
200
- 'class' => 'size',
201
- 'heading' => __('Image size','auxin-elements'),
202
- 'description' => '',
203
- 'admin_label' => true,
204
- 'dependency' => '',
205
- 'weight' => '',
206
- 'group' => '' ,
207
- 'edit_field_class' => ''
 
 
 
 
 
 
 
 
 
 
 
208
  ),
209
  array(
210
- 'param_name' => 'pagination',
211
- 'type' => 'aux_switch',
212
- 'value' => '0',
213
- 'class' => '',
214
- 'heading' => __('Enable pagination','auxin-elements'),
215
  'description' => '',
 
 
 
 
 
 
216
  'admin_label' => true,
217
- 'dependency' => '',
 
 
 
218
  'weight' => '',
219
  'group' => '' ,
220
  'edit_field_class' => ''
221
  ),
222
  array(
223
- 'param_name' => 'perpage',
224
- 'type' => 'textfield',
225
- 'value' => '24',
226
- 'def_value' => '',
227
- 'holder' => 'textfield',
228
- 'class' => 'id',
229
- 'heading' => __('Images per page','auxin-elements'),
230
- 'description' => '',
231
- 'admin_label' => true,
232
- 'dependency' => array(
233
- 'element' => 'pagination',
234
- 'value' => '1'
235
- ),
236
- 'weight' => '',
237
- 'group' => '' ,
238
- 'edit_field_class' => ''
239
- ),
240
- array(
241
  'param_name' => 'extra_classes',
242
  'type' => 'textfield',
243
  'value' => '',
244
  'def_value' => '',
245
  'holder' => 'textfield',
246
  'class' => 'extra_classes',
247
- 'heading' => __('Extra CSS class','auxin-elements'),
248
- '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'),
249
  'admin_label' => true,
250
  'dependency' => '',
251
  'weight' => '',
@@ -565,5 +565,5 @@ function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
565
 
566
  $output .= "</div>\n</div>\n";
567
 
568
- return $output;
569
  }
38
  'as_parent' => '',
39
  'as_child' => '',
40
  'params' => array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  array(
42
+ 'heading' => __('Title','auxin-elements'),
43
+ 'description' => '',
44
+ 'param_name' => 'title',
45
+ 'type' => 'textfield',
46
+ 'value' => '',
47
+ 'def_value' => '',
48
+ 'holder' => 'textfield',
49
+ 'class' => 'title',
50
+ 'admin_label' => true,
51
+ 'dependency' => '',
52
+ 'weight' => '',
53
+ 'group' => '' ,
54
+ 'edit_field_class' => ''
55
+ ),
56
+ array(
57
+ 'heading' => __('Images','auxin-elements'),
58
+ 'description' => '',
59
  'param_name' => 'include',
60
  'type' => 'attach_images',
61
  'value' => '',
62
  'def_value' => '',
63
  'holder' => 'attach_images',
64
  'class' => 'include',
 
 
65
  'admin_label' => true,
66
  'dependency' => '',
67
  'weight' => '',
69
  'edit_field_class' => ''
70
  ),
71
  array(
72
+ 'heading' => __('Column number','auxin-elements'),
73
+ 'description' => '',
74
  'param_name' => 'columns',
75
  'type' => 'dropdown',
76
  'value' => array(
77
+ '1' => __('1 Column' , 'auxin-elements'),
78
+ '2' => __('2 Columns', 'auxin-elements'),
79
+ '3' => __('3 Columns', 'auxin-elements'),
80
+ '4' => __('4 Columns', 'auxin-elements'),
81
+ '5' => __('5 Columns', 'auxin-elements'),
82
+ '6' => __('6 Columns', 'auxin-elements')
83
  ),
84
  'def_value' => '2',
85
  'holder' => 'dropdown',
86
  'class' => 'columns',
 
 
87
  'admin_label' => true,
88
  'dependency' => '',
89
  'weight' => '',
91
  'edit_field_class' => ''
92
  ),
93
  array(
94
+ 'heading' => __('Order images by query','auxin-elements'),
95
+ 'description' => '',
96
+ 'param_name' => 'wp_order',
97
+ 'type' => 'aux_switch',
98
+ 'value' => '0',
99
+ 'class' => '',
100
+ 'admin_label' => true,
101
+ 'dependency' => '',
102
+ 'weight' => '',
103
+ 'group' => '' ,
104
+ 'edit_field_class' => ''
105
  ),
106
  array(
107
+ 'heading' => __('Order','auxin-elements'),
108
+ 'description' => __('Order images ascending or descending','auxin-elements'),
109
+ 'param_name' => 'order',
110
+ 'type' => 'dropdown',
111
+ 'def_value' => 'ASC',
112
+ 'value' => array(
113
+ 'ASC' => __('ASC' , 'auxin-elements'),
114
+ 'DESC' => __('DESC', 'auxin-elements')
115
  ),
116
+ 'holder' => 'dropdown',
117
+ 'class' => 'order',
118
+ 'admin_label' => true,
119
+ 'dependency' => array(
120
+ 'element' => 'wp_order',
121
+ 'value' => '1'
 
 
122
  ),
123
+ 'weight' => '',
124
+ 'group' => '' ,
125
+ 'edit_field_class' => ''
126
  ),
127
  array(
128
+ 'heading' => __('Order images by','auxin-elements'),
129
+ 'description' => '',
130
  'param_name' => 'orderby',
131
  'type' => 'dropdown',
132
  'def_value' => 'menu_order ID',
133
+ 'value' => array(
134
  'menu_order ID' => __('Menu Order' , 'auxin-elements'),
135
  'date' => __('Date' , 'auxin-elements'),
136
  'ID' => __('ID' , 'auxin-elements'),
137
  'none' => __('None' , 'auxin-elements')
138
  ),
139
+ 'dependency' => array(
140
+ 'element' => 'wp_order',
141
+ 'value' => '1'
142
  ),
143
  'holder' => 'dropdown',
144
  'class' => 'orderby',
 
 
145
  'admin_label' => true,
146
  'weight' => '',
147
  'group' => '' ,
148
  'edit_field_class' => ''
149
  ),
150
  array(
151
+ 'heading' => __('Gallery layout','auxin-elements'),
152
+ 'description' => '',
153
  'param_name' => 'layout',
154
  'type' => 'dropdown',
155
  'def_value' => 'grid',
160
  ),
161
  'holder' => 'dropdown',
162
  'class' => 'layout',
 
 
163
  'admin_label' => true,
164
  'dependency' => '',
165
  'weight' => '',
167
  'edit_field_class' => ''
168
  ),
169
  array(
170
+ 'heading' => __('Link images to','auxin-elements'),
171
+ 'description' => '',
172
+ 'param_name' => 'link',
173
+ 'type' => 'dropdown',
174
+ 'def_value' => 'lightbox',
175
+ 'value' => array(
176
+ 'lightbox' => __('Lightbox', 'auxin-elements'),
177
+ 'none' => __('None' , 'auxin-elements'),
178
+ '' => __('Attachment Page' , 'auxin-elements'),
179
+ 'file' => __('File' , 'auxin-elements')
180
  ),
181
+ 'holder' => 'dropdown',
182
+ 'class' => 'link',
183
+ 'admin_label' => true,
184
+ 'dependency' => '',
185
+ 'weight' => '',
186
+ 'group' => '' ,
187
+ 'edit_field_class' => ''
 
 
188
  ),
189
  array(
190
+ 'heading' => __('Image size','auxin-elements'),
191
+ 'description' => '',
192
+ 'param_name' => 'size',
193
+ 'type' => 'dropdown',
194
+ 'def_value' => 'medium',
195
+ 'value' => array(
196
+ 'full' => __('Original' , 'auxin-elements'),
197
+ 'large' => __('Large' , 'auxin-elements'),
198
+ 'medium' => __('Medium' , 'auxin-elements'),
199
+ 'thumbnail' => __('Thumbnail' , 'auxin-elements')
200
  ),
201
+ 'holder' => 'dropdown',
202
+ 'class' => 'size',
203
+ 'admin_label' => true,
204
+ 'dependency' => '',
205
+ 'weight' => '',
206
+ 'group' => '' ,
207
+ 'edit_field_class' => ''
208
+ ),
209
+ array(
210
+ 'heading' => __('Enable pagination','auxin-elements'),
211
+ 'description' => '',
212
+ 'param_name' => 'pagination',
213
+ 'type' => 'aux_switch',
214
+ 'value' => '0',
215
+ 'class' => '',
216
+ 'admin_label' => true,
217
+ 'dependency' => '',
218
+ 'weight' => '',
219
+ 'group' => '' ,
220
+ 'edit_field_class' => ''
221
  ),
222
  array(
223
+ 'heading' => __('Images per page','auxin-elements'),
 
 
 
 
224
  'description' => '',
225
+ 'param_name' => 'perpage',
226
+ 'type' => 'textfield',
227
+ 'value' => '24',
228
+ 'def_value' => '',
229
+ 'holder' => 'textfield',
230
+ 'class' => 'id',
231
  'admin_label' => true,
232
+ 'dependency' => array(
233
+ 'element' => 'pagination',
234
+ 'value' => '1'
235
+ ),
236
  'weight' => '',
237
  'group' => '' ,
238
  'edit_field_class' => ''
239
  ),
240
  array(
241
+ 'heading' => __('Extra CSS class','auxin-elements'),
242
+ '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'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  'param_name' => 'extra_classes',
244
  'type' => 'textfield',
245
  'value' => '',
246
  'def_value' => '',
247
  'holder' => 'textfield',
248
  'class' => 'extra_classes',
 
 
249
  'admin_label' => true,
250
  'dependency' => '',
251
  'weight' => '',
565
 
566
  $output .= "</div>\n</div>\n";
567
 
568
+ return $result['widget_header'] . $result['widget_title'] . $output . $result['widget_footer'];
569
  }
includes/elements/gmap.php CHANGED
@@ -35,13 +35,13 @@ function auxin_get_gmap_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' => '',
45
  'admin_label' => true,
46
  'dependency' => '',
47
  'weight' => '',
@@ -49,14 +49,14 @@ function auxin_get_gmap_master_array( $master_array ) {
49
  'edit_field_class' => ''
50
  ),
51
  array(
 
 
52
  'param_name' => 'height',
53
  'type' => 'textfield',
54
  'value' => '700',
55
  'def_value' => '700',
56
  'holder' => 'textfield',
57
  'class' => 'height',
58
- 'heading' => __('Height','auxin-elements' ),
59
- 'description' => '',
60
  'admin_label' => true,
61
  'dependency' => '',
62
  'weight' => '',
@@ -64,14 +64,14 @@ function auxin_get_gmap_master_array( $master_array ) {
64
  'edit_field_class' => ''
65
  ),
66
  array(
 
 
67
  'param_name' => 'latitude',
68
  'type' => 'textfield',
69
  'value' => '52',
70
  'def_value' => '52',
71
  'holder' => 'textfield',
72
  'class' => 'latitude',
73
- 'heading' => __('Latitude','auxin-elements' ),
74
- 'description' => __('Latitude location over the map.','auxin-elements' ),
75
  'admin_label' => true,
76
  'dependency' => '',
77
  'weight' => '',
@@ -79,14 +79,14 @@ function auxin_get_gmap_master_array( $master_array ) {
79
  'edit_field_class' => ''
80
  ),
81
  array(
 
 
82
  'param_name' => 'longitude',
83
  'type' => 'textfield',
84
  'value' => '14',
85
  'def_value' => '14',
86
  'holder' => 'textfield',
87
  'class' => 'longitude',
88
- 'heading' => __('Longitude','auxin-elements' ),
89
- 'description' => __('Longitude location over the map.','auxin-elements' ),
90
  'admin_label' => true,
91
  'dependency' => '',
92
  'weight' => '',
@@ -94,14 +94,14 @@ function auxin_get_gmap_master_array( $master_array ) {
94
  'edit_field_class' => ''
95
  ),
96
  array(
 
 
97
  'param_name' => 'type',
98
  'type' => 'dropdown',
99
  'def_value' => 'ROADMAP',
100
  'value' => array( 'ROADMAP' => __('ROADMAP', 'auxin-elements' ), 'SATELLITE' => __('SATELLITE', 'auxin-elements' ) ),
101
  'holder' => 'dropdown',
102
  'class' => 'type',
103
- 'heading' => __('Map Type','auxin-elements' ),
104
- 'description' => '',
105
  'admin_label' => true,
106
  'dependency' => '',
107
  'weight' => '',
@@ -109,30 +109,30 @@ function auxin_get_gmap_master_array( $master_array ) {
109
  'edit_field_class' => ''
110
  ),
111
  array(
 
 
 
112
  'param_name' => 'style',
113
  'type' => 'textarea_html',
114
  'def_value' => '',
115
  'value' => '',
116
  'holder' => 'div',
117
  'class' => 'style',
118
- 'heading' => __('Map Style','auxin-elements' ),
119
- 'description' => __('This feild allow you to customize the presentation of the standard Google base maps. You can find many preset styles in ', 'auxin-elements' ) .
120
- '<a href="https://snazzymaps.com/" target="_blank">' . __('this website.', 'auxin-elements' ) . '</a>' ,
121
  'admin_label' => false,
122
  'dependency' => array(
123
- 'element' => 'type',
124
- 'value' => 'ROADMAP'
125
  )
126
  ),
127
  array(
 
 
128
  'param_name' => 'marker_info',
129
  'type' => 'textfield',
130
  'value' => '',
131
  'def_value' => '',
132
  'holder' => 'textfield',
133
  'class' => 'marker_info',
134
- 'heading' => __('Marker Info','auxin-elements' ),
135
- 'description' => __('Marker popup text, leave it empty if you don\'t need it.', 'auxin-elements' ),
136
  'admin_label' => true,
137
  'dependency' => '',
138
  'weight' => '',
@@ -140,63 +140,63 @@ function auxin_get_gmap_master_array( $master_array ) {
140
  'edit_field_class' => ''
141
  ),
142
  array(
 
 
143
  'param_name' => 'show_mapcontrols',
144
  'type' => 'aux_switch',
145
  'def_value' => '',
146
  'value' => '1',
147
  'holder' => 'dropdown',
148
  'class' => 'show_mapcontrols',
149
- 'heading' => __('Navigation control','auxin-elements' ),
150
- 'description' => __('Show navigation control on map.','auxin-elements' ),
151
  'admin_label' => true,
152
  'dependency' => '',
153
  'weight' => '',
154
- 'group' => '' ,
155
  'edit_field_class' => ''
156
  ),
157
  array(
 
 
158
  'param_name' => 'zoom',
159
  'type' => 'textfield',
160
  'value' => '4',
161
  'def_value' => '4',
162
  'holder' => 'textfield',
163
  'class' => 'zoom',
164
- 'heading' => __('Zoom','auxin-elements' ),
165
- 'description' => '',
166
  'admin_label' => true,
167
  'dependency' => '',
168
  'weight' => '',
169
- 'group' => '' ,
170
  'edit_field_class' => ''
171
  ),
172
  array(
 
 
173
  'param_name' => 'zoom_wheel',
174
  'type' => 'aux_switch',
175
  'def_value' => '',
176
  'value' => '0',
177
  'holder' => 'dropdown',
178
  'class' => 'zoom_wheel',
179
- 'heading' => __('Zoom with mouse wheel','auxin-elements' ),
180
- 'description' => '',
181
  'admin_label' => true,
182
  'dependency' => '',
183
  'weight' => '',
184
- 'group' => '' ,
185
  'edit_field_class' => ''
186
  ),
187
  array(
 
 
188
  'param_name' => 'extra_classes',
189
  'type' => 'textfield',
190
  'value' => '',
191
  'def_value' => '',
192
  'holder' => 'textfield',
193
  'class' => 'extra_classes',
194
- 'heading' => __('Extra class name','auxin-elements' ),
195
- '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' ),
196
  'admin_label' => true,
197
  'dependency' => '',
198
  'weight' => '',
199
- 'group' => '' ,
200
  'edit_field_class' => ''
201
  )
202
 
35
  'as_child' => '',
36
  'params' => array(
37
  array(
38
+ 'heading' => __('Title','auxin-elements' ),
39
+ 'description' => __('Map 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' => __('Height','auxin-elements' ),
53
+ 'description' => '',
54
  'param_name' => 'height',
55
  'type' => 'textfield',
56
  'value' => '700',
57
  'def_value' => '700',
58
  'holder' => 'textfield',
59
  'class' => 'height',
 
 
60
  'admin_label' => true,
61
  'dependency' => '',
62
  'weight' => '',
64
  'edit_field_class' => ''
65
  ),
66
  array(
67
+ 'heading' => __('Latitude','auxin-elements' ),
68
+ 'description' => __('Latitude location over the map.','auxin-elements' ),
69
  'param_name' => 'latitude',
70
  'type' => 'textfield',
71
  'value' => '52',
72
  'def_value' => '52',
73
  'holder' => 'textfield',
74
  'class' => 'latitude',
 
 
75
  'admin_label' => true,
76
  'dependency' => '',
77
  'weight' => '',
79
  'edit_field_class' => ''
80
  ),
81
  array(
82
+ 'heading' => __('Longitude','auxin-elements' ),
83
+ 'description' => __('Longitude location over the map.','auxin-elements' ),
84
  'param_name' => 'longitude',
85
  'type' => 'textfield',
86
  'value' => '14',
87
  'def_value' => '14',
88
  'holder' => 'textfield',
89
  'class' => 'longitude',
 
 
90
  'admin_label' => true,
91
  'dependency' => '',
92
  'weight' => '',
94
  'edit_field_class' => ''
95
  ),
96
  array(
97
+ 'heading' => __('Map Type','auxin-elements' ),
98
+ 'description' => '',
99
  'param_name' => 'type',
100
  'type' => 'dropdown',
101
  'def_value' => 'ROADMAP',
102
  'value' => array( 'ROADMAP' => __('ROADMAP', 'auxin-elements' ), 'SATELLITE' => __('SATELLITE', 'auxin-elements' ) ),
103
  'holder' => 'dropdown',
104
  'class' => 'type',
 
 
105
  'admin_label' => true,
106
  'dependency' => '',
107
  'weight' => '',
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',
116
  'type' => 'textarea_html',
117
  'def_value' => '',
118
  'value' => '',
119
  'holder' => 'div',
120
  'class' => 'style',
 
 
 
121
  'admin_label' => false,
122
  'dependency' => array(
123
+ 'element' => 'type',
124
+ 'value' => 'ROADMAP'
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',
132
  'value' => '',
133
  'def_value' => '',
134
  'holder' => 'textfield',
135
  'class' => 'marker_info',
 
 
136
  'admin_label' => true,
137
  'dependency' => '',
138
  'weight' => '',
140
  'edit_field_class' => ''
141
  ),
142
  array(
143
+ 'heading' => __('Navigation control','auxin-elements' ),
144
+ 'description' => __('Show navigation control on map.','auxin-elements' ),
145
  'param_name' => 'show_mapcontrols',
146
  'type' => 'aux_switch',
147
  'def_value' => '',
148
  'value' => '1',
149
  'holder' => 'dropdown',
150
  'class' => 'show_mapcontrols',
 
 
151
  'admin_label' => true,
152
  'dependency' => '',
153
  'weight' => '',
154
+ 'group' => 'Extras' ,
155
  'edit_field_class' => ''
156
  ),
157
  array(
158
+ 'heading' => __('Zoom','auxin-elements' ),
159
+ 'description' => '',
160
  'param_name' => 'zoom',
161
  'type' => 'textfield',
162
  'value' => '4',
163
  'def_value' => '4',
164
  'holder' => 'textfield',
165
  'class' => 'zoom',
 
 
166
  'admin_label' => true,
167
  'dependency' => '',
168
  'weight' => '',
169
+ 'group' => 'Extras' ,
170
  'edit_field_class' => ''
171
  ),
172
  array(
173
+ 'heading' => __('Zoom with mouse wheel','auxin-elements' ),
174
+ 'description' => '',
175
  'param_name' => 'zoom_wheel',
176
  'type' => 'aux_switch',
177
  'def_value' => '',
178
  'value' => '0',
179
  'holder' => 'dropdown',
180
  'class' => 'zoom_wheel',
 
 
181
  'admin_label' => true,
182
  'dependency' => '',
183
  'weight' => '',
184
+ 'group' => 'Extras' ,
185
  'edit_field_class' => ''
186
  ),
187
  array(
188
+ 'heading' => __('Extra class name','auxin-elements' ),
189
+ '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' ),
190
  'param_name' => 'extra_classes',
191
  'type' => 'textfield',
192
  'value' => '',
193
  'def_value' => '',
194
  'holder' => 'textfield',
195
  'class' => 'extra_classes',
 
 
196
  'admin_label' => true,
197
  'dependency' => '',
198
  'weight' => '',
199
+ 'group' => 'Extras' ,
200
  'edit_field_class' => ''
201
  )
202
 
includes/elements/image.php CHANGED
@@ -39,14 +39,14 @@ function auxin_get_image_master_array( $master_array ) {
39
  'as_child' => '',
40
  'params' => array(
41
  array(
 
 
42
  'param_name' => 'title',
43
  'type' => 'textfield',
44
  'value' => '',
45
  'def_value' => '',
46
  'holder' => 'textfield',
47
  'class' => 'id',
48
- 'heading' => __('Title','auxin-elements' ),
49
- 'description' => '',
50
  'admin_label' => true,
51
  'dependency' => '',
52
  'weight' => '',
@@ -54,14 +54,14 @@ function auxin_get_image_master_array( $master_array ) {
54
  'edit_field_class' => ''
55
  ),
56
  array(
 
 
57
  'param_name' => 'attach_id',
58
  'type' => 'attach_image',
59
  'value' => '',
60
  'def_value' => '',
61
  'holder' => 'textfield',
62
  'class' => 'attach_id',
63
- 'heading' => __('Image','auxin-elements' ),
64
- 'description' => '',
65
  'admin_label' => true,
66
  'dependency' => '',
67
  'weight' => '',
@@ -69,14 +69,14 @@ function auxin_get_image_master_array( $master_array ) {
69
  'edit_field_class' => ''
70
  ),
71
  array(
 
 
72
  'param_name' => 'attach_id_hover',
73
  'type' => 'attach_image',
74
  'value' => '',
75
  'def_value' => '',
76
  'holder' => 'textfield',
77
  'class' => 'attach_id_hover',
78
- 'heading' => __('Image Hover','auxin-elements' ),
79
- 'description' => '',
80
  'admin_label' => true,
81
  'dependency' => '',
82
  'weight' => '',
@@ -85,14 +85,14 @@ function auxin_get_image_master_array( $master_array ) {
85
  ),
86
 
87
  array(
 
 
88
  'param_name' => 'width',
89
  'type' => 'textfield',
90
  'value' => '',
91
  'def_value' => '',
92
  'holder' => 'textfield',
93
  'class' => 'width',
94
- 'heading' => __('Width','auxin-elements' ),
95
- 'description' => '',
96
  'admin_label' => true,
97
  'dependency' => '',
98
  'weight' => '',
@@ -100,14 +100,14 @@ function auxin_get_image_master_array( $master_array ) {
100
  'edit_field_class' => ''
101
  ),
102
  array(
 
 
103
  'param_name' => 'height',
104
  'type' => 'textfield',
105
  'value' => '',
106
  'def_value' => '',
107
  'holder' => 'textfield',
108
  'class' => 'height',
109
- 'heading' => __('Height','auxin-elements' ),
110
- 'description' => '',
111
  'admin_label' => true,
112
  'dependency' => '',
113
  'weight' => '',
@@ -115,17 +115,17 @@ function auxin_get_image_master_array( $master_array ) {
115
  'edit_field_class' => ''
116
  ),
117
  array(
 
 
118
  'param_name' => 'align',
119
  'type' => 'dropdown',
120
- 'def_value' => 'left',
121
  'value' => array(
122
  'alignleft' => __('Left' , 'auxin-elements' ),
123
  'alignright' => __('Right' , 'auxin-elements' ),
124
  'alignnone' => __('None' , 'auxin-elements' )
125
  ),
126
  'holder' => 'dropdown',
127
- 'heading' => __('Alignment','auxin-elements' ),
128
- 'description' => __('Image alignment in content.', 'auxin-elements' ),
129
  'admin_label' => true,
130
  'dependency' => '',
131
  'weight' => '',
@@ -133,18 +133,18 @@ function auxin_get_image_master_array( $master_array ) {
133
  'edit_field_class' => ''
134
  ),
135
  array(
 
 
136
  'param_name' => 'icon',
137
  'type' => 'dropdown',
138
  'def_value' => 'plus',
139
  'value' => array(
140
- '' => __('None', 'auxin-elements' ),
141
- 'plus' => __('Plus', 'auxin-elements' )
142
 
143
  ),
144
  'holder' => 'dropdown',
145
  'class' => 'icon',
146
- 'heading' => __('Iconic Button','auxin-elements' ),
147
- 'description' => '',
148
  'admin_label' => true,
149
  'dependency' => '',
150
  'weight' => '',
@@ -152,13 +152,13 @@ function auxin_get_image_master_array( $master_array ) {
152
  'edit_field_class' => ''
153
  ),
154
  array(
 
 
155
  'param_name' => 'lightbox',
156
  'type' => 'aux_switch',
157
  'value' => '0',
158
  'holder' => 'dropdown',
159
  'class' => 'lightbox',
160
- 'heading' => __('Open large image in lightbox','auxin-elements' ),
161
- 'description' => '',
162
  'admin_label' => true,
163
  'dependency' => '',
164
  'weight' => '',
@@ -167,53 +167,53 @@ function auxin_get_image_master_array( $master_array ) {
167
  ),
168
 
169
  array(
 
 
170
  'param_name' => 'link',
171
  'type' => 'textfield',
172
  'value' => '',
173
  'def_value' => '',
174
  'holder' => 'textfield',
175
  'class' => 'link',
176
- 'heading' => __('Link URL','auxin-elements' ),
177
- 'description' => '',
178
  'admin_label' => true,
179
  'dependency' => array(
180
- 'element' => 'lightbox',
181
- 'value' => array('0', 'false')
182
  ),
183
  'weight' => '',
184
  'group' => '' ,
185
  'edit_field_class' => ''
186
  ),
187
  array(
 
 
188
  'param_name' => 'target',
189
  'type' => 'dropdown',
190
  'def_value' => 'curve',
191
  'value' => array(
192
- '_self' => __('Self' , 'auxin-elements' ) ,
193
- '_blank' => __('Blank' , 'auxin-elements' )
194
  ),
195
  'holder' => 'dropdown',
196
  'class' => 'target',
197
- 'heading' => __('Target','auxin-elements' ),
198
- 'description' => __('Open in new page or this page.','auxin-elements' ),
199
  'admin_label' => true,
200
  'dependency' => array(
201
- 'element' => 'lightbox',
202
- 'value' => array('0', 'false')
203
  ),
204
  'weight' => '',
205
  'group' => '' ,
206
  'edit_field_class' => ''
207
  ),
208
  array(
 
 
209
  'param_name' => 'extra_classes',
210
  'type' => 'textfield',
211
  'value' => '',
212
  'def_value' => '',
213
  'holder' => 'textfield',
214
  'class' => 'extra_classes',
215
- 'heading' => __('Extra class name','auxin-elements' ),
216
- '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' ),
217
  'admin_label' => true,
218
  'dependency' => '',
219
  'weight' => '',
@@ -243,7 +243,7 @@ function auxin_widget_image_callback( $atts, $shortcode_content = null ){
243
  'alt' => '', // alternative text
244
  'width' => '', // final width of image
245
  'height' => '', // final height of image
246
- 'align' => 'alignleft',
247
  'icon' => 'plus', // icon type. plus, zoom, none
248
  'lightbox' => 'no', // open in lightbox or not
249
 
39
  'as_child' => '',
40
  'params' => array(
41
  array(
42
+ 'heading' => __('Title','auxin-elements' ),
43
+ 'description' => __('Image title, leave it empty if you don`t need title.', 'auxin-elements'),
44
  'param_name' => 'title',
45
  'type' => 'textfield',
46
  'value' => '',
47
  'def_value' => '',
48
  'holder' => 'textfield',
49
  'class' => 'id',
 
 
50
  'admin_label' => true,
51
  'dependency' => '',
52
  'weight' => '',
54
  'edit_field_class' => ''
55
  ),
56
  array(
57
+ 'heading' => __('Image','auxin-elements' ),
58
+ 'description' => '',
59
  'param_name' => 'attach_id',
60
  'type' => 'attach_image',
61
  'value' => '',
62
  'def_value' => '',
63
  'holder' => 'textfield',
64
  'class' => 'attach_id',
 
 
65
  'admin_label' => true,
66
  'dependency' => '',
67
  'weight' => '',
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',
76
  'value' => '',
77
  'def_value' => '',
78
  'holder' => 'textfield',
79
  'class' => 'attach_id_hover',
 
 
80
  'admin_label' => true,
81
  'dependency' => '',
82
  'weight' => '',
85
  ),
86
 
87
  array(
88
+ 'heading' => __('Width','auxin-elements' ),
89
+ 'description' => '',
90
  'param_name' => 'width',
91
  'type' => 'textfield',
92
  'value' => '',
93
  'def_value' => '',
94
  'holder' => 'textfield',
95
  'class' => 'width',
 
 
96
  'admin_label' => true,
97
  'dependency' => '',
98
  'weight' => '',
100
  'edit_field_class' => ''
101
  ),
102
  array(
103
+ 'heading' => __('Height','auxin-elements' ),
104
+ 'description' => '',
105
  'param_name' => 'height',
106
  'type' => 'textfield',
107
  'value' => '',
108
  'def_value' => '',
109
  'holder' => 'textfield',
110
  'class' => 'height',
 
 
111
  'admin_label' => true,
112
  'dependency' => '',
113
  'weight' => '',
115
  'edit_field_class' => ''
116
  ),
117
  array(
118
+ 'heading' => __('Alignment','auxin-elements' ),
119
+ 'description' => __('Image alignment in content.', 'auxin-elements' ),
120
  'param_name' => 'align',
121
  'type' => 'dropdown',
122
+ 'def_value' => 'alignnone',
123
  'value' => array(
124
  'alignleft' => __('Left' , 'auxin-elements' ),
125
  'alignright' => __('Right' , 'auxin-elements' ),
126
  'alignnone' => __('None' , 'auxin-elements' )
127
  ),
128
  'holder' => 'dropdown',
 
 
129
  'admin_label' => true,
130
  'dependency' => '',
131
  'weight' => '',
133
  'edit_field_class' => ''
134
  ),
135
  array(
136
+ 'heading' => __('Iconic Button','auxin-elements' ),
137
+ 'description' => '',
138
  'param_name' => 'icon',
139
  'type' => 'dropdown',
140
  'def_value' => 'plus',
141
  'value' => array(
142
+ '' => __('None', 'auxin-elements' ),
143
+ 'plus' => __('Plus', 'auxin-elements' )
144
 
145
  ),
146
  'holder' => 'dropdown',
147
  'class' => 'icon',
 
 
148
  'admin_label' => true,
149
  'dependency' => '',
150
  'weight' => '',
152
  'edit_field_class' => ''
153
  ),
154
  array(
155
+ 'heading' => __('Open large image in lightbox','auxin-elements' ),
156
+ 'description' => '',
157
  'param_name' => 'lightbox',
158
  'type' => 'aux_switch',
159
  'value' => '0',
160
  'holder' => 'dropdown',
161
  'class' => 'lightbox',
 
 
162
  'admin_label' => true,
163
  'dependency' => '',
164
  'weight' => '',
167
  ),
168
 
169
  array(
170
+ 'heading' => __('Link URL','auxin-elements' ),
171
+ 'description' => '',
172
  'param_name' => 'link',
173
  'type' => 'textfield',
174
  'value' => '',
175
  'def_value' => '',
176
  'holder' => 'textfield',
177
  'class' => 'link',
 
 
178
  'admin_label' => true,
179
  'dependency' => array(
180
+ 'element' => 'lightbox',
181
+ 'value' => array('0', 'false')
182
  ),
183
  'weight' => '',
184
  'group' => '' ,
185
  'edit_field_class' => ''
186
  ),
187
  array(
188
+ 'heading' => __('Target','auxin-elements' ),
189
+ 'description' => __('Open in new page or this page.','auxin-elements' ),
190
  'param_name' => 'target',
191
  'type' => 'dropdown',
192
  'def_value' => 'curve',
193
  'value' => array(
194
+ '_self' => __('Self' , 'auxin-elements' ) ,
195
+ '_blank' => __('Blank' , 'auxin-elements' )
196
  ),
197
  'holder' => 'dropdown',
198
  'class' => 'target',
 
 
199
  'admin_label' => true,
200
  'dependency' => array(
201
+ 'element' => 'lightbox',
202
+ 'value' => array('0', 'false')
203
  ),
204
  'weight' => '',
205
  'group' => '' ,
206
  'edit_field_class' => ''
207
  ),
208
  array(
209
+ 'heading' => __('Extra class name','auxin-elements' ),
210
+ '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' ),
211
  'param_name' => 'extra_classes',
212
  'type' => 'textfield',
213
  'value' => '',
214
  'def_value' => '',
215
  'holder' => 'textfield',
216
  'class' => 'extra_classes',
 
 
217
  'admin_label' => true,
218
  'dependency' => '',
219
  'weight' => '',
243
  'alt' => '', // alternative text
244
  'width' => '', // final width of image
245
  'height' => '', // final height of image
246
+ 'align' => 'alignnone',
247
  'icon' => 'plus', // icon type. plus, zoom, none
248
  'lightbox' => 'no', // open in lightbox or not
249
 
includes/elements/latest-posts-slider.php CHANGED
@@ -15,7 +15,7 @@ function auxin_get_post_slider_master_array( $master_array ) {
15
  'name' => __('[Phlox] Latest Posts Slider ', 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_latest_posts_slider_callback',
17
  'base' => 'aux_latest_posts_slider',
18
- 'description' => __('Slider for latest posts', 'auxin-elements' ),
19
  'class' => 'aux-widget-post-slider',
20
  'show_settings_on_create' => true,
21
  'weight' => 1,
@@ -39,31 +39,31 @@ function auxin_get_post_slider_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 this element', 'auxin-elements' ),
49
- 'admin_label' => true,
50
- 'dependency' => '',
51
- 'weight' => '',
52
- 'group' => '' ,
53
- 'edit_field_class' => ''
54
  ),
55
  array(
 
 
56
  'param_name' => 'post_type',
57
  'type' => 'dropdown',
58
  'def_value' => 'post',
59
  'value' => array(
60
- 'post' => __('Posts', 'auxin-elements' ),
61
- 'page' => __('Pages', 'auxin-elements' ),
62
  ),
63
  'holder' => 'dropdown',
64
  'class' => 'border',
65
- 'heading' => __('Create slides from','auxin-elements' ),
66
- 'description' => '',
67
  'admin_label' => true,
68
  'dependency' => '',
69
  'weight' => '',
@@ -71,13 +71,13 @@ function auxin_get_post_slider_master_array( $master_array ) {
71
  'edit_field_class' => ''
72
  ),
73
  array(
 
 
74
  'param_name' => 'slides_num',
75
  'type' => 'textfield',
76
  'value' => '10',
77
  'holder' => 'textfield',
78
  'class' => '',
79
- 'heading' => __('Slides number','auxin-elements' ),
80
- 'description' => __('Specifies maximum number of slides in slider', 'auxin-elements' ),
81
  'admin_label' => true,
82
  'dependency' => '',
83
  'weight' => '',
@@ -85,13 +85,13 @@ function auxin_get_post_slider_master_array( $master_array ) {
85
  'edit_field_class' => ''
86
  ),
87
  array(
 
 
88
  'param_name' => 'exclude',
89
  'type' => 'textfield',
90
  'value' => '',
91
  'holder' => 'textfield',
92
  'class' => '',
93
- 'heading' => __('Exclude posts','auxin-elements' ),
94
- 'description' => __('Post IDs separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
95
  'admin_label' => true,
96
  'dependency' => '',
97
  'weight' => '',
@@ -99,13 +99,13 @@ function auxin_get_post_slider_master_array( $master_array ) {
99
  'edit_field_class' => ''
100
  ),
101
  array(
 
 
102
  'param_name' => 'include',
103
  'type' => 'textfield',
104
  'value' => '',
105
  'holder' => 'textfield',
106
  'class' => '',
107
- 'heading' => __('Include posts','auxin-elements' ),
108
- 'description' => __('Post IDs separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
109
  'admin_label' => true,
110
  'dependency' => '',
111
  'weight' => '',
@@ -113,13 +113,13 @@ function auxin_get_post_slider_master_array( $master_array ) {
113
  'edit_field_class' => ''
114
  ),
115
  array(
 
 
116
  'param_name' => 'offset',
117
  'type' => 'textfield',
118
  'value' => '',
119
  'holder' => 'textfield',
120
  'class' => '',
121
- 'heading' => __('Start offset','auxin-elements' ),
122
- 'description' => __('Number of post to displace or pass over', 'auxin-elements' ),
123
  'admin_label' => true,
124
  'dependency' => '',
125
  'weight' => '',
@@ -127,10 +127,12 @@ function auxin_get_post_slider_master_array( $master_array ) {
127
  'edit_field_class' => ''
128
  ),
129
  array(
130
- 'param_name' => 'order_by',
131
- 'type' => 'dropdown',
132
- 'def_value' => 'date',
133
- 'value' => array(
 
 
134
  'date' => __('Date', 'auxin-elements' ),
135
  'menu_order date' => __('Menu Order', 'auxin-elements' ),
136
  'title' => __('Title', 'auxin-elements' ),
@@ -140,127 +142,125 @@ function auxin_get_post_slider_master_array( $master_array ) {
140
  'modified' => __('Date Modified', 'auxin-elements' ),
141
  'author' => __('Author', 'auxin-elements' ),
142
  ),
143
- 'holder' => 'dropdown',
144
- 'class' => 'border',
145
- 'heading' => __('Order by','auxin-elements' ),
146
- 'description' => '',
147
- 'admin_label' => true,
148
- 'dependency' => '',
149
- 'weight' => '',
150
- 'group' => '' ,
151
- 'edit_field_class' => ''
152
  ),
153
  array(
154
- 'param_name' => 'order_dir',
155
- 'type' => 'dropdown',
156
- 'def_value' => 'DESC',
157
- 'value' => array(
158
- 'DESC' => __('Descending', 'auxin-elements' ),
159
- 'ASC' => __('Ascending', 'auxin-elements' ),
 
 
160
  ),
161
- 'holder' => 'dropdown',
162
- 'class' => 'border',
163
- 'heading' => __('Order direction','auxin-elements' ),
164
- 'description' => '',
165
- 'admin_label' => true,
166
- 'dependency' => '',
167
- 'weight' => '',
168
- 'group' => '' ,
169
- 'edit_field_class' => ''
170
  ),
171
  array(
172
- 'param_name' => 'skin',
173
- 'type' => 'dropdown',
174
- 'def_value' => 'aux-light-skin',
175
- 'value' => array(
 
 
176
  'aux-light-skin' => __('Light and boxed', 'auxin-elements' ),
177
  'aux-dark-skin' => __('Dark and boxed', 'auxin-elements' ),
178
  'aux-full-light-skin' => __('Light overlay', 'auxin-elements' ),
179
  'aux-full-dark-skin' => __('Dark overlay', 'auxin-elements' ),
180
  ),
181
- 'holder' => 'dropdown',
182
- 'class' => 'border',
183
- 'heading' => __('Slider skin','auxin-elements' ),
184
- 'description' => '',
185
- 'admin_label' => true,
186
- 'dependency' => '',
187
- 'weight' => '',
188
- 'group' => '' ,
189
- 'edit_field_class' => ''
190
  ),
191
  array(
192
- 'param_name' => 'add_title',
193
- 'type' => 'aux_switch',
194
- 'value' => '1',
195
- 'class' => '',
196
- 'heading' => __('Insert post title','auxin-elements' ),
197
- 'description' => '',
198
- 'admin_label' => true,
199
- 'dependency' => '',
200
- 'weight' => '',
201
- 'group' => '' ,
202
- 'edit_field_class' => ''
203
  ),
204
  array(
205
- 'param_name' => 'add_meta',
206
- 'type' => 'aux_switch',
207
- 'value' => '1',
208
- 'class' => '',
209
- 'heading' => __('Insert post meta','auxin-elements' ),
210
- 'description' => '',
211
- 'dependency' => array(
212
- 'element' => 'add_title',
213
- 'value' => '1'
214
  ),
215
- 'admin_label' => true,
216
- 'weight' => '',
217
- 'group' => '' ,
218
- 'edit_field_class' => ''
219
  ),
220
 
221
  array(
222
- 'param_name' => 'image_from',
223
- 'type' => 'dropdown',
224
- 'def_value' => 'auto',
225
- 'value' => array(
 
 
226
  'auto' => __('Auto select', 'auxin-elements' ),
227
  'featured' => __('Featured image', 'auxin-elements' ),
228
  'first' => __('First image in post', 'auxin-elements' ),
229
  'custom' => __('Custom image', 'auxin-elements' ),
230
  ),
231
- 'holder' => 'dropdown',
232
- 'class' => 'border',
233
- 'heading' => __('Grab the image from','auxin-elements' ),
234
- 'description' => '',
235
- 'admin_label' => true,
236
- 'dependency' => '',
237
- 'weight' => '',
238
- 'group' => '' ,
239
- 'edit_field_class' => ''
240
  ),
241
  array(
242
- 'param_name' => 'custom_image',
243
- 'type' => 'attach_image',
244
- 'value' => '',
245
- 'class' => '',
246
- 'heading' => __('Background image','auxin-elements' ),
247
- 'description' => '',
248
- 'admin_label' => true,
249
- 'dependency' => array(
250
- 'element' => 'image_from',
251
- 'value' => 'custom'
252
  ),
253
- 'weight' => '',
254
- 'group' => '' ,
255
- 'edit_field_class' => ''
256
  ),
257
  array(
 
 
258
  'param_name' => 'exclude_without_image',
259
  'type' => 'aux_switch',
260
  'value' => '1',
261
  'class' => '',
262
- 'heading' => __('Exclude posts without image','auxin-elements' ),
263
- 'description' => '',
264
  'admin_label' => true,
265
  'dependency' => '',
266
  'weight' => '',
@@ -270,12 +270,12 @@ function auxin_get_post_slider_master_array( $master_array ) {
270
 
271
 
272
  array(
 
273
  'param_name' => 'width',
274
  'type' => 'textfield',
275
  'value' => '960',
276
  'holder' => 'textfield',
277
  'class' => '',
278
- 'heading' => __('Slider image width','auxin-elements' ),
279
  'admin_label' => true,
280
  'dependency' => '',
281
  'weight' => '',
@@ -283,12 +283,12 @@ function auxin_get_post_slider_master_array( $master_array ) {
283
  'edit_field_class' => ''
284
  ),
285
  array(
 
286
  'param_name' => 'height',
287
  'type' => 'textfield',
288
  'value' => '560',
289
  'holder' => 'textfield',
290
  'class' => '',
291
- 'heading' => __('Slider image height','auxin-elements' ),
292
  'admin_label' => true,
293
  'dependency' => '',
294
  'weight' => '',
@@ -296,71 +296,71 @@ function auxin_get_post_slider_master_array( $master_array ) {
296
  'edit_field_class' => ''
297
  ),
298
  array(
 
 
299
  'param_name' => 'arrows',
300
  'type' => 'aux_switch',
301
  'value' => '0',
302
  'class' => '',
303
- 'heading' => __('Arrow navigation','auxin-elements' ),
304
- 'description' => '',
305
  'admin_label' => true,
306
  'dependency' => '',
307
  'weight' => '',
308
- 'group' => '' ,
309
  'edit_field_class' => ''
310
  ),
311
  array(
 
312
  'param_name' => 'space',
313
  'type' => 'textfield',
314
  'value' => '5',
315
  'holder' => 'textfield',
316
  'class' => '',
317
- 'heading' => __('Space between slides','auxin-elements' ),
318
  'admin_label' => true,
319
  'dependency' => '',
320
  'weight' => '',
321
- 'group' => '' ,
322
  'edit_field_class' => ''
323
  ),
324
  array(
 
 
325
  'param_name' => 'loop',
326
  'type' => 'aux_switch',
327
  'value' => '0',
328
  'class' => '',
329
- 'heading' => __('Looped navigation','auxin-elements' ),
330
- 'description' => '',
331
  'admin_label' => true,
332
  'dependency' => '',
333
  'weight' => '',
334
- 'group' => '' ,
335
  'edit_field_class' => ''
336
  ),
337
  array(
 
 
338
  'param_name' => 'slideshow',
339
  'type' => 'aux_switch',
340
  'value' => '0',
341
  'class' => '',
342
- 'heading' => __('Slideshow','auxin-elements' ),
343
- 'description' => '',
344
  'admin_label' => true,
345
  'dependency' => '',
346
  'weight' => '',
347
- 'group' => '' ,
348
  'edit_field_class' => ''
349
  ),
350
  array(
 
351
  'param_name' => 'slideshow_delay',
352
  'type' => 'textfield',
353
  'value' => '2',
354
  'holder' => 'textfield',
355
  'class' => '',
356
- 'heading' => __('Slideshow delay in seconds','auxin-elements' ),
357
  'admin_label' => true,
358
  'dependency' => array(
359
- 'element' => 'slideshow',
360
- 'value' => '1'
361
  ),
362
  'weight' => '',
363
- 'group' => '' ,
364
  'edit_field_class' => ''
365
  ),
366
  )
15
  'name' => __('[Phlox] Latest Posts Slider ', 'auxin-elements' ),
16
  'auxin_output_callback' => 'auxin_latest_posts_slider_callback',
17
  'base' => 'aux_latest_posts_slider',
18
+ 'description' => __('Slider for latest posts.', 'auxin-elements' ),
19
  'class' => 'aux-widget-post-slider',
20
  'show_settings_on_create' => true,
21
  'weight' => 1,
39
  'as_child' => '',
40
  'params' => array(
41
  array(
42
+ 'heading' => __('Title','auxin-elements' ),
43
+ 'description' => __('Latest post slider title, leave it empty if you don`t need title.', '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' => '',
52
+ 'group' => '' ,
53
+ 'edit_field_class' => ''
54
  ),
55
  array(
56
+ 'heading' => __('Create slides from','auxin-elements' ),
57
+ 'description' => '',
58
  'param_name' => 'post_type',
59
  'type' => 'dropdown',
60
  'def_value' => 'post',
61
  'value' => array(
62
+ 'post' => __('Posts', 'auxin-elements' ),
63
+ 'page' => __('Pages', 'auxin-elements' ),
64
  ),
65
  'holder' => 'dropdown',
66
  'class' => 'border',
 
 
67
  'admin_label' => true,
68
  'dependency' => '',
69
  'weight' => '',
71
  'edit_field_class' => ''
72
  ),
73
  array(
74
+ 'heading' => __('Slides number','auxin-elements' ),
75
+ 'description' => __('Specifies maximum number of slides in slider.', 'auxin-elements' ),
76
  'param_name' => 'slides_num',
77
  'type' => 'textfield',
78
  'value' => '10',
79
  'holder' => 'textfield',
80
  'class' => '',
 
 
81
  'admin_label' => true,
82
  'dependency' => '',
83
  'weight' => '',
85
  'edit_field_class' => ''
86
  ),
87
  array(
88
+ 'heading' => __('Exclude posts','auxin-elements' ),
89
+ 'description' => __('Post IDs separated by comma (eg. 53,34,87,25).', 'auxin-elements' ),
90
  'param_name' => 'exclude',
91
  'type' => 'textfield',
92
  'value' => '',
93
  'holder' => 'textfield',
94
  'class' => '',
 
 
95
  'admin_label' => true,
96
  'dependency' => '',
97
  'weight' => '',
99
  'edit_field_class' => ''
100
  ),
101
  array(
102
+ 'heading' => __('Include posts','auxin-elements' ),
103
+ 'description' => __('Post IDs separated by comma (eg. 53,34,87,25).', 'auxin-elements' ),
104
  'param_name' => 'include',
105
  'type' => 'textfield',
106
  'value' => '',
107
  'holder' => 'textfield',
108
  'class' => '',
 
 
109
  'admin_label' => true,
110
  'dependency' => '',
111
  'weight' => '',
113
  'edit_field_class' => ''
114
  ),
115
  array(
116
+ 'heading' => __('Start offset','auxin-elements' ),
117
+ 'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
118
  'param_name' => 'offset',
119
  'type' => 'textfield',
120
  'value' => '',
121
  'holder' => 'textfield',
122
  'class' => '',
 
 
123
  'admin_label' => true,
124
  'dependency' => '',
125
  'weight' => '',
127
  'edit_field_class' => ''
128
  ),
129
  array(
130
+ 'heading' => __('Order by','auxin-elements' ),
131
+ 'description' => '',
132
+ 'param_name' => 'order_by',
133
+ 'type' => 'dropdown',
134
+ 'def_value' => 'date',
135
+ 'value' => array(
136
  'date' => __('Date', 'auxin-elements' ),
137
  'menu_order date' => __('Menu Order', 'auxin-elements' ),
138
  'title' => __('Title', 'auxin-elements' ),
142
  'modified' => __('Date Modified', 'auxin-elements' ),
143
  'author' => __('Author', 'auxin-elements' ),
144
  ),
145
+ 'holder' => 'dropdown',
146
+ 'class' => 'border',
147
+ 'admin_label' => true,
148
+ 'dependency' => '',
149
+ 'weight' => '',
150
+ 'group' => '' ,
151
+ 'edit_field_class' => ''
 
 
152
  ),
153
  array(
154
+ 'heading' => __('Order direction','auxin-elements' ),
155
+ 'description' => '',
156
+ 'param_name' => 'order_dir',
157
+ 'type' => 'dropdown',
158
+ 'def_value' => 'DESC',
159
+ 'value' => array(
160
+ 'DESC' => __('Descending', 'auxin-elements' ),
161
+ 'ASC' => __('Ascending', 'auxin-elements' ),
162
  ),
163
+ 'holder' => 'dropdown',
164
+ 'class' => 'border',
165
+ 'admin_label' => true,
166
+ 'dependency' => '',
167
+ 'weight' => '',
168
+ 'group' => '' ,
169
+ 'edit_field_class' => ''
 
 
170
  ),
171
  array(
172
+ 'heading' => __('Slider skin','auxin-elements' ),
173
+ 'description' => '',
174
+ 'param_name' => 'skin',
175
+ 'type' => 'dropdown',
176
+ 'def_value' => 'aux-light-skin',
177
+ 'value' => array(
178
  'aux-light-skin' => __('Light and boxed', 'auxin-elements' ),
179
  'aux-dark-skin' => __('Dark and boxed', 'auxin-elements' ),
180
  'aux-full-light-skin' => __('Light overlay', 'auxin-elements' ),
181
  'aux-full-dark-skin' => __('Dark overlay', 'auxin-elements' ),
182
  ),
183
+ 'holder' => 'dropdown',
184
+ 'class' => 'border',
185
+ 'admin_label' => true,
186
+ 'dependency' => '',
187
+ 'weight' => '',
188
+ 'group' => '' ,
189
+ 'edit_field_class' => ''
 
 
190
  ),
191
  array(
192
+ 'heading' => __('Insert post title','auxin-elements' ),
193
+ 'description' => '',
194
+ 'param_name' => 'add_title',
195
+ 'type' => 'aux_switch',
196
+ 'value' => '1',
197
+ 'class' => '',
198
+ 'admin_label' => true,
199
+ 'dependency' => '',
200
+ 'weight' => '',
201
+ 'group' => '' ,
202
+ 'edit_field_class' => ''
203
  ),
204
  array(
205
+ 'heading' => __('Insert post meta','auxin-elements' ),
206
+ 'description' => '',
207
+ 'param_name' => 'add_meta',
208
+ 'type' => 'aux_switch',
209
+ 'value' => '1',
210
+ 'class' => '',
211
+ 'dependency' => array(
212
+ 'element' => 'add_title',
213
+ 'value' => '1'
214
  ),
215
+ 'admin_label' => true,
216
+ 'weight' => '',
217
+ 'group' => '' ,
218
+ 'edit_field_class' => ''
219
  ),
220
 
221
  array(
222
+ 'heading' => __('Grab the image from','auxin-elements' ),
223
+ 'description' => '',
224
+ 'param_name' => 'image_from',
225
+ 'type' => 'dropdown',
226
+ 'def_value' => 'auto',
227
+ 'value' => array(
228
  'auto' => __('Auto select', 'auxin-elements' ),
229
  'featured' => __('Featured image', 'auxin-elements' ),
230
  'first' => __('First image in post', 'auxin-elements' ),
231
  'custom' => __('Custom image', 'auxin-elements' ),
232
  ),
233
+ 'holder' => 'dropdown',
234
+ 'class' => 'border',
235
+ 'admin_label' => true,
236
+ 'dependency' => '',
237
+ 'weight' => '',
238
+ 'group' => '' ,
239
+ 'edit_field_class' => ''
 
 
240
  ),
241
  array(
242
+ 'heading' => __('Background image','auxin-elements' ),
243
+ 'description' => '',
244
+ 'param_name' => 'custom_image',
245
+ 'type' => 'attach_image',
246
+ 'value' => '',
247
+ 'class' => '',
248
+ 'admin_label' => true,
249
+ 'dependency' => array(
250
+ 'element' => 'image_from',
251
+ 'value' => 'custom'
252
  ),
253
+ 'weight' => '',
254
+ 'group' => '' ,
255
+ 'edit_field_class' => ''
256
  ),
257
  array(
258
+ 'heading' => __('Exclude posts without image','auxin-elements' ),
259
+ 'description' => '',
260
  'param_name' => 'exclude_without_image',
261
  'type' => 'aux_switch',
262
  'value' => '1',
263
  'class' => '',
 
 
264
  'admin_label' => true,
265
  'dependency' => '',
266
  'weight' => '',
270
 
271
 
272
  array(
273
+ 'heading' => __('Slider image width','auxin-elements' ),
274
  'param_name' => 'width',
275
  'type' => 'textfield',
276
  'value' => '960',
277
  'holder' => 'textfield',
278
  'class' => '',
 
279
  'admin_label' => true,
280
  'dependency' => '',
281
  'weight' => '',
283
  'edit_field_class' => ''
284
  ),
285
  array(
286
+ 'heading' => __('Slider image height','auxin-elements' ),
287
  'param_name' => 'height',
288
  'type' => 'textfield',
289
  'value' => '560',
290
  'holder' => 'textfield',
291
  'class' => '',
 
292
  'admin_label' => true,
293
  'dependency' => '',
294
  'weight' => '',
296
  'edit_field_class' => ''
297
  ),
298
  array(
299
+ 'heading' => __('Arrow navigation','auxin-elements' ),
300
+ 'description' => '',
301
  'param_name' => 'arrows',
302
  'type' => 'aux_switch',
303
  'value' => '0',
304
  'class' => '',
 
 
305
  'admin_label' => true,
306
  'dependency' => '',
307
  'weight' => '',
308
+ 'group' => 'Extras' ,
309
  'edit_field_class' => ''
310
  ),
311
  array(
312
+ 'heading' => __('Space between slides','auxin-elements' ),
313
  'param_name' => 'space',
314
  'type' => 'textfield',
315
  'value' => '5',
316
  'holder' => 'textfield',
317
  'class' => '',
 
318
  'admin_label' => true,
319
  'dependency' => '',
320
  'weight' => '',
321
+ 'group' => 'Extras' ,
322
  'edit_field_class' => ''
323
  ),
324
  array(
325
+ 'heading' => __('Looped navigation','auxin-elements' ),
326
+ 'description' => '',
327
  'param_name' => 'loop',
328
  'type' => 'aux_switch',
329
  'value' => '0',
330
  'class' => '',
 
 
331
  'admin_label' => true,
332
  'dependency' => '',
333
  'weight' => '',
334
+ 'group' => 'Extras' ,
335
  'edit_field_class' => ''
336
  ),
337
  array(
338
+ 'heading' => __('Slideshow','auxin-elements' ),
339
+ 'description' => '',
340
  'param_name' => 'slideshow',
341
  'type' => 'aux_switch',
342
  'value' => '0',
343
  'class' => '',
 
 
344
  'admin_label' => true,
345
  'dependency' => '',
346
  'weight' => '',
347
+ 'group' => 'Extras' ,
348
  'edit_field_class' => ''
349
  ),
350
  array(
351
+ 'heading' => __('Slideshow delay in seconds','auxin-elements' ),
352
  'param_name' => 'slideshow_delay',
353
  'type' => 'textfield',
354
  'value' => '2',
355
  'holder' => 'textfield',
356
  'class' => '',
 
357
  'admin_label' => true,
358
  'dependency' => array(
359
+ 'element' => 'slideshow',
360
+ 'value' => '1'
361
  ),
362
  'weight' => '',
363
+ 'group' => 'Extras' ,
364
  'edit_field_class' => ''
365
  ),
366
  )
includes/elements/popular-posts-widget.php ADDED
@@ -0,0 +1,406 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_popular_post_widget_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
+
22
+ $master_array['aux_popular_posts_widget'] = array(
23
+ 'name' => __('[Phlox] Popular Posts Widget', 'auxin-elements' ),
24
+ 'auxin_output_callback' => 'auxin_widget_popular_post_widget_callback',
25
+ 'base' => 'aux_popular_posts_widget',
26
+ 'description' => __('Shows popular and most commented posts with thumbnail.', 'auxin-elements' ),
27
+ 'class' => 'aux-widget-popular-posts-widget',
28
+ 'show_settings_on_create' => true,
29
+ 'weight' => 1,
30
+ 'is_widget' => true,
31
+ 'is_shortcode' => false,
32
+ 'is_so' => false,
33
+ 'is_vc' => false,
34
+ 'category' => THEME_NAME,
35
+ 'group' => '',
36
+ 'admin_enqueue_js' => '',
37
+ 'admin_enqueue_css' => '',
38
+ 'front_enqueue_js' => '',
39
+ 'front_enqueue_css' => '',
40
+ 'icon' => 'auxin-element auxin-code',
41
+ 'custom_markup' => '',
42
+ 'js_view' => '',
43
+ 'html_template' => '',
44
+ 'deprecated' => '',
45
+ 'content_element' => '',
46
+ 'as_parent' => '',
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' => '',
61
+ 'group' => '' ,
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',
75
+ '7' => '7' , '8' => '8' , '9' => '9' ,
76
+ '10' => '10','11' => '11' ,'12' => '12'
77
+ ),
78
+ 'admin_label' => true,
79
+ 'dependency' => '',
80
+ 'weight' => '',
81
+ 'group' => '' ,
82
+ 'edit_field_class' => ''
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' => '',
97
+ 'group' => '' ,
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' => '',
112
+ 'group' => '' ,
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' => '',
127
+ 'group' => '' ,
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' => '',
142
+ 'group' => '' ,
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' => '',
157
+ 'group' => '' ,
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' => '',
171
+ 'group' => '' ,
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' => '',
185
+ 'group' => '' ,
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'),
199
+ 'title' => __('Title', 'auxin-elements'),
200
+ 'ID' => __('ID', 'auxin-elements'),
201
+ 'rand' => __('Random', 'auxin-elements'),
202
+ 'comment_count' => __('Comments', 'auxin-elements'),
203
+ 'modified' => __('Date Modified', 'auxin-elements'),
204
+ 'author' => __('Author', 'auxin-elements'),
205
+ ),
206
+ 'admin_label' => true,
207
+ 'dependency' => '',
208
+ 'weight' => '',
209
+ 'group' => '' ,
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'),
223
+ ),
224
+ 'admin_label' => true,
225
+ 'dependency' => '',
226
+ 'weight' => '',
227
+ 'group' => '' ,
228
+ 'edit_field_class' => ''
229
+ ),
230
+ array(
231
+ 'param_name' => 'cat',
232
+ 'type' => 'dropdown',
233
+ 'def_value' => 'default',
234
+ 'holder' => 'dropdown',
235
+ 'class' => 'cat',
236
+ 'heading' => __('Categories', 'auxin-elements'),
237
+ 'description' => __('specify a categories that you want.', 'auxin-elements' ),
238
+ 'value' => $categories_list,
239
+ 'admin_label' => true,
240
+ 'dependency' => '',
241
+ 'weight' => '',
242
+ 'group' => '' ,
243
+ 'edit_field_class' => ''
244
+ ),
245
+ // array(
246
+ // 'param_name' => 'tag',
247
+ // 'type' => 'dropdown',
248
+ // 'def_value' => '',
249
+ // 'holder' => 'dropdown',
250
+ // 'class' => 'tag',
251
+ // 'heading' => __('Tags', 'auxin-elements'),
252
+ // 'description' => __('specify a tags that you want.', 'auxin-elements' ),
253
+ // 'value' => $tags_list,
254
+ // 'admin_label' => true,
255
+ // 'dependency' => '',
256
+ // 'weight' => '',
257
+ // 'group' => '' ,
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' => '',
272
+ 'group' => '',
273
+ 'edit_field_class' => ''
274
+ )
275
+ )
276
+ );
277
+
278
+ return $master_array;
279
+ }
280
+
281
+ add_filter( 'auxin_master_array_shortcodes', 'auxin_get_popular_post_widget_master_array', 10, 1 );
282
+
283
+
284
+
285
+
286
+ /**
287
+ * Element without loop and column
288
+ * The front-end output of this element is returned by the following function
289
+ *
290
+ * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above.
291
+ * @param string $shortcode_content The shorcode content
292
+ * @return string The output of element markup
293
+ */
294
+ function auxin_widget_popular_post_widget_callback( $atts, $shortcode_content = null ){
295
+
296
+ // Defining default attributes
297
+ $default_atts = array(
298
+ 'title' => '', // header title
299
+ 'num' => '4',
300
+
301
+ 'show_recent' => 1,
302
+ 'show_popular' => 1,
303
+ 'show_comment' => 1,
304
+
305
+ 'show_media' => 1,
306
+ 'show_excerpt' => 1,
307
+ 'show_date' => 1,
308
+ 'excerpt_len' => '60',
309
+ 'order' => 'desc',
310
+ 'order_by' => 'date',
311
+ 'cat' => '',
312
+ 'tag' => '',
313
+ 'extra_classes' => '',
314
+ 'custom_el_id' => '',
315
+ 'base_class' => 'aux-widget-popular-posts-widget'
316
+ );
317
+
318
+ // the parsed widget params
319
+ $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
320
+ $output = '';
321
+
322
+ // wp_query args to get recent posts
323
+ $recent_args = array(
324
+ 'post_type' => 'post',
325
+ 'orderby' => 'date',
326
+ 'order' => 'desc',
327
+ 'post_status' => 'publish',
328
+ 'posts_per_page' => $result['parsed_atts']['num'],
329
+ 'cat' => $result['parsed_atts']['cat'],
330
+ // 'tag_id' => $tag,
331
+ 'ignore_sticky_posts' => 1
332
+ );
333
+
334
+ // wp_query args to get popular posts
335
+ $popular_args = array(
336
+ 'post_type' => 'post',
337
+ 'orderby' => 'comment_count',
338
+ 'order' => 'desc',
339
+ 'post_status' => 'publish',
340
+ 'posts_per_page' => $result['parsed_atts']['num'],
341
+ 'cat' => $result['parsed_atts']['cat'],
342
+ // 'tag_id' => $tag,
343
+ 'ignore_sticky_posts' => 1
344
+ );
345
+
346
+ // wp_query args to get most commented posts
347
+ $comment_args = array(
348
+ 'post_type' => 'post',
349
+ 'orderby' => 'comment_count',
350
+ 'order' => 'desc',
351
+ 'post_status' => 'publish',
352
+ 'posts_per_page' => $result['parsed_atts']['num'],
353
+ 'cat' => $result['parsed_atts']['cat'],
354
+ // 'tag_id' => $tag,
355
+ 'ignore_sticky_posts' => 1
356
+ );
357
+
358
+ // @TODO
359
+ $result['parsed_atts']['show_format'] = false;
360
+
361
+ $tabs_display = array(
362
+ $result['parsed_atts']['show_popular'],
363
+ $result['parsed_atts']['show_recent'],
364
+ $result['parsed_atts']['show_comment']
365
+ );
366
+
367
+ // count the number of enabled tabs
368
+ $tabs_count = 0;
369
+ foreach ( $tabs_display as $value) {
370
+ if( $value ){
371
+ $tabs_count++;
372
+ }
373
+ }
374
+
375
+ $widget_class = $tabs_count > 1 ? 'widget-tabs aux-stripe aux-fill' : '';
376
+
377
+ // widget header ------------------------------
378
+ $output .= $result['widget_header'];
379
+ $output .= $result['widget_title'];
380
+
381
+
382
+ $output .= '<div class="'. $widget_class .'"><div class="widget-inner">';
383
+
384
+ // only display tabs if more that one tab is enabled
385
+ if( $tabs_count > 1 ){
386
+ $output .= '<ul class="tabs">';
387
+ $output .= $result['parsed_atts']['show_popular'] ? '<li><a href="#">'. __( 'Popular', 'auxin-elements' ) .'</a></li>' : '';
388
+ $output .= $result['parsed_atts']['show_recent' ] ? '<li><a href="#">'. __( 'Recent' , 'auxin-elements' ) .'</a></li>' : '';
389
+ $output .= $result['parsed_atts']['show_comment'] ? '<li><a href="#">'. __( 'Comment', 'auxin-elements' ) .'</a></li>' : '';
390
+ $output .= '</ul>';
391
+ }
392
+ $output .= '<ul class="tabs-content">';
393
+ $output .= $result['parsed_atts']['show_popular'] ?
394
+ '<li>' . auxin_get_post_type_markup( $popular_args, 'templates/theme-parts/entry/widget-recent-post.php', $result['parsed_atts'] ) . '</li>' : '';
395
+ $output .= $result['parsed_atts']['show_recent' ] ?
396
+ '<li>' . auxin_get_post_type_markup( $recent_args , 'templates/theme-parts/entry/widget-recent-post.php', $result['parsed_atts'] ) . '</li>' : '';
397
+ $output .= $result['parsed_atts']['show_comment'] ?
398
+ '<li>' . auxin_get_post_type_markup( $comment_args, 'templates/theme-parts/entry/widget-recent-post.php', $result['parsed_atts'] ) . '</li>' : '';
399
+ $output .= '</ul>';
400
+ $output .= '</div></div>';
401
+
402
+ // widget footer ------------------------------
403
+ $output .= $result['widget_footer'];
404
+
405
+ return $output;
406
+ }
includes/elements/quote.php CHANGED
@@ -38,13 +38,13 @@ function auxin_get_quote_master_array( $master_array ) {
38
  'as_child' => '',
39
  'params' => array(
40
  array(
 
 
41
  'param_name' => 'title',
42
  'type' => 'textfield',
43
  'value' => '',
44
  'holder' => 'textfield',
45
  'class' => 'title',
46
- 'heading' => __('Title','auxin-elements' ),
47
- 'description' => __('Quote title, leave it empty if you don`t need title.', 'auxin-elements' ),
48
  'admin_label' => true,
49
  'dependency' => '',
50
  'weight' => '',
@@ -52,14 +52,14 @@ function auxin_get_quote_master_array( $master_array ) {
52
  'edit_field_class' => ''
53
  ),
54
  array(
 
 
55
  'param_name' => 'content',
56
  'type' => 'textarea_html',
57
  'value' => '',
58
  'def_value' => '',
59
  'holder' => 'div',
60
  'class' => 'content',
61
- 'heading' => __('Quote text','auxin-elements' ),
62
- 'description' => '',
63
  'admin_label' => true,
64
  'dependency' => '',
65
  'weight' => '',
@@ -67,67 +67,67 @@ function auxin_get_quote_master_array( $master_array ) {
67
  'edit_field_class' => ''
68
  ),
69
  array(
70
- 'param_name' => 'type',
71
- 'type' => 'aux_visual_select',
72
- 'def_value' => 'blockquote-normal',
73
- 'choices' => array(
74
- 'quote-normal' => array(
75
- 'label' => __('Quote Normal', 'auxin-elements'),
76
- 'image' => AUX_URL . 'images/visual-select/blockquote-normal-1.svg'
 
 
77
  ),
78
  'blockquote-normal' => array(
79
- 'label' => __('Blockquote Normal', 'auxin-elements'),
80
- 'image' => AUX_URL . 'images/visual-select/blockquote-normal.svg'
81
  ),
82
  'blockquote-bordered' => array(
83
- 'label' => __('Blockquote Bordered', 'auxin-elements'),
84
- 'image' => AUX_URL . 'images/visual-select/blockquote-bordered.svg'
85
  ),
86
- 'intro-normal' => array(
87
- 'label' => __('Intro', 'auxin-elements'),
88
- 'image' => AUX_URL . 'images/visual-select/quote-intro-normal.svg'
89
  ),
90
- 'intro-hero' => array(
91
- 'label' => __('Intro Hero', 'auxin-elements'),
92
- 'image' => AUX_URL . 'images/visual-select/quote-intro-hero.svg'
93
  ),
94
- 'intro-splitter' => array(
95
- 'label' => __('Intro with Splitter', 'auxin-elements'),
96
- 'image' => AUX_URL . 'images/visual-select/quote-intro-splitter.svg'
97
  ),
98
  'pullquote-normal' => array(
99
- 'label' => __('Pullquote Normal', 'auxin-elements'),
100
- 'image' => AUX_URL . 'images/visual-select/pullquote-normal.svg'
101
  ),
102
  'pullquote-colorized' => array(
103
- 'label' => __('Pullquote Colorized', 'auxin-elements'),
104
- 'image' => AUX_URL . 'images/visual-select/pullquote-colorized.svg'
105
  )
106
  ),
107
- 'holder' => 'dropdown',
108
- 'class' => 'type',
109
- 'heading' => __('Blockqoute Style','auxin-elements' ),
110
- 'description' => '',
111
- 'admin_label' => true,
112
- 'dependency' => '',
113
- 'weight' => '',
114
- 'group' => '' ,
115
- 'edit_field_class' => ''
116
  ),
117
  array(
 
 
118
  'param_name' => 'text_align',
119
  'type' => 'dropdown',
120
  'def_value' => 'none',
121
  'value' => array(
122
- 'none' => __('Default', 'auxin-elements' ),
123
- 'left' => __('Left' , 'auxin-elements' ),
124
- 'right' => __('Right' , 'auxin-elements' ),
125
- 'center' => __('Center' , 'auxin-elements' )
126
  ),
127
  'holder' => 'dropdown',
128
  'class' => 'type',
129
- 'heading' => __('Text align','auxin-elements' ),
130
- 'description' => '',
131
  'admin_label' => true,
132
  'dependency' => '',
133
  'weight' => '',
@@ -154,14 +154,14 @@ function auxin_get_quote_master_array( $master_array ) {
154
  // 'edit_field_class' => ''
155
  // ),
156
  array(
 
 
157
  'param_name' => 'quote_symbol',
158
  'type' => 'aux_switch',
159
  'def_value' => '',
160
  'value' => '1',
161
  'holder' => 'dropdown',
162
  'class' => 'showheader',
163
- 'heading' => __('Insert quote symbol', 'auxin-elements'),
164
- 'description' => '',
165
  'admin_label' => true,
166
  'dependency' => '',
167
  'weight' => '',
@@ -170,14 +170,14 @@ function auxin_get_quote_master_array( $master_array ) {
170
  ),
171
 
172
  array(
 
 
173
  'param_name' => 'extra_classes',
174
  'type' => 'textfield',
175
  'value' => '',
176
  'def_value' => '',
177
  'holder' => 'textfield',
178
  'class' => 'extra_classes',
179
- 'heading' => __('Extra class name','auxin-elements' ),
180
- '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' ),
181
  'admin_label' => true,
182
  'dependency' => '',
183
  'weight' => '',
38
  'as_child' => '',
39
  'params' => array(
40
  array(
41
+ 'heading' => __('Title','auxin-elements' ),
42
+ 'description' => __('Quote title, leave it empty if you don`t need title.', 'auxin-elements' ),
43
  'param_name' => 'title',
44
  'type' => 'textfield',
45
  'value' => '',
46
  'holder' => 'textfield',
47
  'class' => 'title',
 
 
48
  'admin_label' => true,
49
  'dependency' => '',
50
  'weight' => '',
52
  'edit_field_class' => ''
53
  ),
54
  array(
55
+ 'heading' => __('Quote text','auxin-elements' ),
56
+ 'description' => __('Enter a text as a quote.','auxin-elements' ),
57
  'param_name' => 'content',
58
  'type' => 'textarea_html',
59
  'value' => '',
60
  'def_value' => '',
61
  'holder' => 'div',
62
  'class' => 'content',
 
 
63
  'admin_label' => true,
64
  'dependency' => '',
65
  'weight' => '',
67
  'edit_field_class' => ''
68
  ),
69
  array(
70
+ 'heading' => __('Blockqoute Style','auxin-elements' ),
71
+ 'description' => '',
72
+ 'param_name' => 'type',
73
+ 'type' => 'aux_visual_select',
74
+ 'def_value' => 'blockquote-normal',
75
+ 'choices' => array(
76
+ 'quote-normal' => array(
77
+ 'label' => __('Quote Normal', 'auxin-elements'),
78
+ 'image' => AUX_URL . 'images/visual-select/blockquote-normal-1.svg'
79
  ),
80
  'blockquote-normal' => array(
81
+ 'label' => __('Blockquote Normal', 'auxin-elements'),
82
+ 'image' => AUX_URL . 'images/visual-select/blockquote-normal.svg'
83
  ),
84
  'blockquote-bordered' => array(
85
+ 'label' => __('Blockquote Bordered', 'auxin-elements'),
86
+ 'image' => AUX_URL . 'images/visual-select/blockquote-bordered.svg'
87
  ),
88
+ 'intro-normal' => array(
89
+ 'label' => __('Intro', 'auxin-elements'),
90
+ 'image' => AUX_URL . 'images/visual-select/quote-intro-normal.svg'
91
  ),
92
+ 'intro-hero' => array(
93
+ 'label' => __('Intro Hero', 'auxin-elements'),
94
+ 'image' => AUX_URL . 'images/visual-select/quote-intro-hero.svg'
95
  ),
96
+ 'intro-splitter' => array(
97
+ 'label' => __('Intro with Splitter', 'auxin-elements'),
98
+ 'image' => AUX_URL . 'images/visual-select/quote-intro-splitter.svg'
99
  ),
100
  'pullquote-normal' => array(
101
+ 'label' => __('Pullquote Normal', 'auxin-elements'),
102
+ 'image' => AUX_URL . 'images/visual-select/pullquote-normal.svg'
103
  ),
104
  'pullquote-colorized' => array(
105
+ 'label' => __('Pullquote Colorized', 'auxin-elements'),
106
+ 'image' => AUX_URL . 'images/visual-select/pullquote-colorized.svg'
107
  )
108
  ),
109
+ 'holder' => 'dropdown',
110
+ 'class' => 'type',
111
+ 'admin_label' => true,
112
+ 'dependency' => '',
113
+ 'weight' => '',
114
+ 'group' => '' ,
115
+ 'edit_field_class' => ''
 
 
116
  ),
117
  array(
118
+ 'heading' => __('Text align','auxin-elements' ),
119
+ 'description' => '',
120
  'param_name' => 'text_align',
121
  'type' => 'dropdown',
122
  'def_value' => 'none',
123
  'value' => array(
124
+ 'none' => __('Default', 'auxin-elements' ),
125
+ 'left' => __('Left' , 'auxin-elements' ),
126
+ 'right' => __('Right' , 'auxin-elements' ),
127
+ 'center' => __('Center' , 'auxin-elements' )
128
  ),
129
  'holder' => 'dropdown',
130
  'class' => 'type',
 
 
131
  'admin_label' => true,
132
  'dependency' => '',
133
  'weight' => '',
154
  // 'edit_field_class' => ''
155
  // ),
156
  array(
157
+ 'heading' => __('Insert quote symbol', 'auxin-elements'),
158
+ 'description' => '',
159
  'param_name' => 'quote_symbol',
160
  'type' => 'aux_switch',
161
  'def_value' => '',
162
  'value' => '1',
163
  'holder' => 'dropdown',
164
  'class' => 'showheader',
 
 
165
  'admin_label' => true,
166
  'dependency' => '',
167
  'weight' => '',
170
  ),
171
 
172
  array(
173
+ 'heading' => __('Extra class name','auxin-elements' ),
174
+ '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' ),
175
  'param_name' => 'extra_classes',
176
  'type' => 'textfield',
177
  'value' => '',
178
  'def_value' => '',
179
  'holder' => 'textfield',
180
  'class' => 'extra_classes',
 
 
181
  'admin_label' => true,
182
  'dependency' => '',
183
  'weight' => '',
includes/elements/recent-posts-timeline.php ADDED
@@ -0,0 +1,551 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_timeline_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_timeline'] = array(
29
+ 'name' => __('[Phlox] Timeline Recent Posts', 'auxin-elements' ),
30
+ 'auxin_output_callback' => 'auxin_widget_recent_posts_timeline_callback',
31
+ 'base' => 'aux_recent_posts_timeline',
32
+ 'description' => __('It adds recent posts in timeline style.', '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-code',
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
+ 'param_name' => 'cat',
91
+ 'type' => 'dropdown',
92
+ 'def_value' => '',
93
+ 'holder' => 'dropdown',
94
+ 'class' => 'cat',
95
+ 'heading' => __('Categories', 'auxin-elements'),
96
+ 'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
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' => __('Insert post title','auxin-elements' ),
268
+ 'description' => '',
269
+ 'param_name' => 'show_title',
270
+ 'type' => 'aux_switch',
271
+ 'value' => '1',
272
+ 'class' => '',
273
+ 'admin_label' => true,
274
+ 'dependency' => '',
275
+ 'weight' => '',
276
+ 'group' => '' ,
277
+ 'edit_field_class' => ''
278
+ ),
279
+
280
+ array(
281
+ 'heading' => __('Insert post meta','auxin-elements' ),
282
+ 'description' => '',
283
+ 'param_name' => 'show_info',
284
+ 'type' => 'aux_switch',
285
+ 'value' => '1',
286
+ 'class' => '',
287
+ 'admin_label' => true,
288
+ 'weight' => '',
289
+ 'group' => '' ,
290
+ 'edit_field_class' => ''
291
+ ),
292
+
293
+ array(
294
+ 'heading' => __('Display Excerpt','auxin-elements' ),
295
+ 'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
296
+ 'param_name' => 'show_excerpt',
297
+ 'type' => 'aux_switch',
298
+ 'def_value' => '',
299
+ 'value' => '1',
300
+ 'holder' => 'dropdown',
301
+ 'class' => 'show_excerpt',
302
+ 'admin_label' => 1,
303
+ 'dependency' => '',
304
+ 'weight' => '',
305
+ 'group' => '' ,
306
+ 'edit_field_class' => ''
307
+ ),
308
+
309
+ array(
310
+ 'heading' => __('Excerpt Length','auxin-elements' ),
311
+ 'description' => __('Specify summary content in character.','auxin-elements' ),
312
+ 'param_name' => 'excerpt_len',
313
+ 'type' => 'textfield',
314
+ 'value' => '160',
315
+ 'holder' => 'textfield',
316
+ 'class' => 'excerpt_len',
317
+ 'admin_label' => 1,
318
+ 'dependency' => array(
319
+ 'element' => 'show_excerpt',
320
+ 'value' => '1'
321
+ ),
322
+ 'weight' => '',
323
+ 'group' => '' ,
324
+ 'edit_field_class' => ''
325
+ ),
326
+
327
+
328
+ array(
329
+ 'heading' => __('Insert read more button','auxin-elements' ),
330
+ 'description' => '',
331
+ 'param_name' => 'show_readmore',
332
+ 'type' => 'aux_switch',
333
+ 'value' => '1',
334
+ 'class' => '',
335
+ 'admin_label' => true,
336
+ 'weight' => '',
337
+ 'group' => '' ,
338
+ 'edit_field_class' => ''
339
+ ),
340
+
341
+ array(
342
+ 'heading' => __('Insert author name in bottom side','auxin-elements' ),
343
+ 'description' => '',
344
+ 'param_name' => 'show_author_footer',
345
+ 'type' => 'aux_switch',
346
+ 'value' => '1',
347
+ 'class' => '',
348
+ 'dependency' => array(
349
+ 'element' => 'show_readmore',
350
+ 'value' => '0'
351
+ ),
352
+ 'admin_label' => false,
353
+ 'weight' => '',
354
+ 'group' => '' ,
355
+ 'edit_field_class' => ''
356
+ ),
357
+
358
+ array(
359
+ 'heading' => __('Timeline Alignment','auxin-elements' ),
360
+ 'description' => '',
361
+ 'param_name' => 'timeline_alignment',
362
+ 'type' => 'aux_visual_select',
363
+ 'choices' => array(
364
+ 'center' => array(
365
+ 'label' => __('Center', 'auxin-elements'),
366
+ 'image' => AUX_URL . 'images/visual-select/divider-white-space.svg'
367
+ ),
368
+ 'left' => array(
369
+ 'label' => __('Left', 'auxin-elements'),
370
+ 'image' => AUX_URL . 'images/visual-select/divider-solid.svg'
371
+ ),
372
+ 'right' => array(
373
+ 'label' => __('Right', 'auxin-elements'),
374
+ 'image' => AUX_URL . 'images/visual-select/divider-dashed.svg'
375
+ )
376
+ ),
377
+ 'value' => 'center',
378
+ 'class' => '',
379
+ 'dependency' => '',
380
+ 'admin_label' => false,
381
+ 'weight' => '',
382
+ 'group' => '' ,
383
+ 'edit_field_class' => ''
384
+ ),
385
+
386
+ array(
387
+ 'heading' => __('Extra class name','auxin-elements' ),
388
+ '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' ),
389
+ 'param_name' => 'extra_classes',
390
+ 'type' => 'textfield',
391
+ 'value' => '',
392
+ 'def_value' => '',
393
+ 'holder' => 'textfield',
394
+ 'class' => 'extra_classes',
395
+ 'admin_label' => true,
396
+ 'dependency' => '',
397
+ 'weight' => '',
398
+ 'group' => '',
399
+ 'edit_field_class' => ''
400
+ )
401
+ )
402
+ );
403
+
404
+ return $master_array;
405
+ }
406
+
407
+ add_filter( 'auxin_master_array_shortcodes', 'auxin_get_recent_posts_timeline_master_array', 10, 1 );
408
+
409
+
410
+
411
+
412
+ /**
413
+ * Element without loop and column
414
+ * The front-end output of this element is returned by the following function
415
+ *
416
+ * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above.
417
+ * @param string $shortcode_content The shorcode content
418
+ * @return string The output of element markup
419
+ */
420
+ function auxin_widget_recent_posts_timeline_callback( $atts, $shortcode_content = null ){
421
+
422
+ global $aux_content_width;
423
+
424
+ // Defining default attributes
425
+ $default_atts = array(
426
+ 'title' => '', // header title
427
+ 'cat' => '',
428
+ 'num' => '4',
429
+ 'exclude' => '',
430
+ 'include' => '',
431
+ 'include' => '',
432
+ 'posts_per_page' => -1,
433
+ 'paged' => '',
434
+ 'offset' => '',
435
+ 'order_by' => 'menu_order date',
436
+ 'order' => 'desc',
437
+ 'exclude_without_media' => 0,
438
+ 'exclude_custom_post_formats' => 0,
439
+ 'exclude_qoute_link' => 0,
440
+ 'show_media' => true,
441
+ 'show_excerpt' => true,
442
+ 'excerpt_len' => '160',
443
+ 'show_title' => true,
444
+ 'show_info' => true,
445
+ 'show_readmore' => true,
446
+ 'show_author_footer' => false,
447
+ 'timeline_alignment' => 'center',
448
+ 'tag' => '',
449
+ 'reset_query' => true,
450
+ 'extra_classes' => '',
451
+ 'custom_el_id' => '',
452
+ 'base_class' => 'aux-widget-recent-posts'
453
+ );
454
+
455
+ $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
456
+ extract( $result['parsed_atts'] );
457
+
458
+ ob_start();
459
+
460
+ // create wp_query to get latest items -----------
461
+ $args = array(
462
+ 'post_type' => 'post',
463
+ 'orderby' => $order_by,
464
+ 'order' => $order,
465
+ 'offset' => $offset,
466
+ 'paged' => $paged,
467
+ 'cat' => $cat,
468
+ 'post__not_in' => array_filter( explode( ',', $exclude ) ),
469
+ 'post__in' => array_filter( explode( ',', $include ) ),
470
+ 'post_status' => 'publish',
471
+ 'posts_per_page' => $posts_per_page,
472
+ 'ignore_sticky_posts' => 1
473
+ );
474
+
475
+ global $wp_query;
476
+ $wp_query = new WP_Query( $args );
477
+
478
+ // widget header ------------------------------
479
+ echo $result['widget_header'];
480
+ echo $result['widget_title'];
481
+
482
+
483
+ $phone_break_point = 767;
484
+ $tablet_break_point = 992;
485
+
486
+ $show_comments = true; // shows comments icon
487
+ $post_counter = 0;
488
+ $wrapper_class = 'aux-timeline';
489
+ $item_class = 'aux-block';
490
+ $post_classes = 'aux-block';
491
+ $post_month;
492
+ $old_post_month = '';
493
+
494
+ // whether any result was found or not
495
+ $have_posts = $wp_query->have_posts();
496
+
497
+ if( $wp_query->have_posts() ){
498
+ ?><div class="<?php echo $wrapper_class ?>" data-layout="<?php echo $timeline_alignment ?>"> <?php
499
+ while ( $wp_query->have_posts() ) {
500
+
501
+ // break the loop if it is reached to the limit
502
+ if ( $post_counter < $num ) {
503
+ $post_counter ++;
504
+ } else {
505
+ break;
506
+ }
507
+
508
+ $wp_query->the_post();
509
+ $post = $wp_query->post;
510
+ $post_vars = auxin_get_post_format_media( $post , 'archive', $phone_break_point, true );
511
+ extract( $post_vars );
512
+
513
+ $the_format = get_post_format($post);
514
+
515
+ if (
516
+ ( $exclude_custom_post_formats && !empty( $the_format ) ) ||
517
+ ( $exclude_qoute_link && ( 'link' == $the_format || 'quote' == $the_format ) ) ||
518
+ ( $exclude_without_media && !$has_attach )
519
+ ) {
520
+ $post_counter --;
521
+ continue;
522
+ }
523
+ $post_month = date('m', strtotime(str_replace('/', '-', get_the_date() ) ) );
524
+ if($post_month != $old_post_month){
525
+ ?>
526
+ <span class="aux-date-label"><?php the_time('F, Y'); ?></span>
527
+ <?php
528
+ }
529
+ ?>
530
+ <?php include( locate_template( 'templates/theme-parts/entry/post-column.php' ) ); ?>
531
+ <?php
532
+ $old_post_month = $post_month;
533
+ }
534
+ ?> </div> <?php
535
+ }
536
+
537
+ if( $reset_query ){
538
+ wp_reset_query();
539
+ }
540
+
541
+ // return false if no result found
542
+ if( ! $have_posts ){
543
+ ob_get_clean();
544
+ return false;
545
+ }
546
+
547
+ // widget footer ------------------------------
548
+ echo $result['widget_footer'];
549
+
550
+ return ob_get_clean();
551
+ }
includes/elements/recent-posts-widget.php CHANGED
@@ -193,8 +193,8 @@ function auxin_get_recent_post_widget_master_array( $master_array ) {
193
  'def_value' => 'default',
194
  'holder' => 'dropdown',
195
  'class' => 'cat',
196
- 'heading' => __('Categories', 'auxin-elements'),
197
- 'description' => __('specify a categories that you want.', 'auxin-elements' ),
198
  'value' => $categories_list,
199
  'admin_label' => true,
200
  'dependency' => '',
@@ -270,72 +270,34 @@ function auxin_widget_recent_post_widget_callback( $atts, $shortcode_content = n
270
  'base_class' => 'aux-widget-recent-post-widget'
271
  );
272
 
 
273
  $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
274
- extract( $result['parsed_atts'] );
275
-
276
- ob_start();
277
-
278
-
279
 
280
  // create wp_query to get latest items -----------
281
- $args = array(
282
- 'post_type' => 'post',
283
- 'orderby' => $order_by,
284
- 'order' => $order,
285
- 'post_status' => 'publish',
286
- 'posts_per_page' => $num,
287
- 'cat' => $cat,
288
- // 'tag_id' => $tag,
289
- 'ignore_sticky_posts' => 1
290
  );
291
 
292
- $th_query = null;
293
- $th_query = new WP_Query( $args );
294
-
295
- $show_format = 'false'; // @TODO
296
 
297
  // widget header ------------------------------
298
- echo $result['widget_header'];
299
- echo $result['widget_title'];
300
-
301
- if( $th_query->have_posts() ): while ($th_query->have_posts()) : $th_query->the_post(); ?>
302
-
303
- <article class="media-land">
304
- <?php if( $show_media == true && $entry_media = auxin_get_the_post_thumbnail( null, 160, 160, true ) ) { ?>
305
- <?php //if( $entry_media = auxin_get_the_post_thumbnail( null, 160, 160, true ) ) { ?>
306
- <div class="entry-media">
307
- <div class="aux-media-frame aux-media-image">
308
- <a href="<?php the_permalink(); ?>">
309
- <?php echo $entry_media; ?>
310
- </a>
311
- </div>
312
- </div>
313
- <?php } if( $show_format ) { ?>
314
- <div class="entry-format">
315
- <a href="<?php the_permalink(); ?>" class="post-format format-<?php echo get_post_format(); ?>"></a>
316
- </div>
317
- <?php } ?>
318
- <div>
319
- <header class="entry-header">
320
- <h4 class="entry-title"><a href="<?php the_permalink(); ?>"><?php echo auxin_get_trimmed_string( get_the_title(), 40, '...'); ?></a></h4>
321
- </header>
322
-
323
- <div class="entry-content">
324
- <?php if($show_date != false ) { ?>
325
- <time datetime="<?php the_time('Y-m-d')?>" title="<?php the_time('Y-m-d')?>" ><?php the_time('F j, Y'); ?></time>
326
- <?php } if( $show_excerpt != false ) { ?>
327
- <p><?php auxin_the_trim_excerpt( null, (int) $excerpt_len, null, true ); ?></p>
328
- <?php } ?>
329
- </div>
330
- </div>
331
- </article>
332
 
 
 
333
 
334
- <?php endwhile; endif;
335
- wp_reset_query();
336
 
337
  // widget footer ------------------------------
338
- echo $result['widget_footer'];
339
 
340
- return ob_get_clean();
341
  }
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' => '',
270
  'base_class' => 'aux-widget-recent-post-widget'
271
  );
272
 
273
+ // the parsed widget params
274
  $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
275
+ $output = '';
 
 
 
 
276
 
277
  // create wp_query to get latest items -----------
278
+ $recent_args = array(
279
+ 'post_type' => 'post',
280
+ 'orderby' => $result['parsed_atts']['order_by'],
281
+ 'order' => $result['parsed_atts']['order'],
282
+ 'post_status' => 'publish',
283
+ 'posts_per_page' => $result['parsed_atts']['num'],
284
+ 'cat' => $result['parsed_atts']['cat'],
285
+ // 'tag_id' => $tag,
286
+ 'ignore_sticky_posts' => 1
287
  );
288
 
289
+ // @TODO
290
+ $result['parsed_atts']['show_format'] = false;
 
 
291
 
292
  // widget header ------------------------------
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
 
294
+ $output .= $result['widget_header'];
295
+ $output .= $result['widget_title'];
296
 
297
+ $output .= auxin_get_post_type_markup( $recent_args, 'templates/theme-parts/entry/widget-recent-post.php', $result['parsed_atts'] );
 
298
 
299
  // widget footer ------------------------------
300
+ $output .= $result['widget_footer'];
301
 
302
+ return $output;
303
  }
includes/elements/recent-posts.php CHANGED
@@ -53,14 +53,14 @@ function auxin_get_recent_posts_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' => '',
@@ -87,29 +87,29 @@ function auxin_get_recent_posts_master_array( $master_array ) {
87
  // ),
88
 
89
  array(
90
- 'param_name' => 'cat',
91
- 'type' => 'dropdown',
92
- 'def_value' => '',
93
- 'holder' => 'dropdown',
94
- 'class' => 'cat',
95
- 'heading' => __('Categories', 'auxin-elements'),
96
- 'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
97
- 'value' => $categories_list,
98
- 'admin_label' => true,
99
- 'dependency' => '',
100
- 'weight' => '',
101
- 'group' => '' ,
102
- 'edit_field_class' => ''
103
  ),
104
 
105
  array(
106
- 'param_name' => 'num',
107
- 'type' => 'textfield',
108
- 'def_value' => '8',
109
- 'holder' => 'textfield',
110
- 'class' => 'num',
111
- 'heading' => __('Number of posts to show', 'auxin-elements'),
112
- 'description' => '',
113
  'admin_label' => true,
114
  'dependency' => '',
115
  'weight' => '',
@@ -118,12 +118,12 @@ function auxin_get_recent_posts_master_array( $master_array ) {
118
  ),
119
 
120
  array(
 
 
121
  'param_name' => 'exclude_without_media',
122
  'type' => 'aux_switch',
123
  'value' => '0',
124
  'class' => '',
125
- 'heading' => __('Exclude posts without media','auxin-elements' ),
126
- 'description' => '',
127
  'admin_label' => true,
128
  'dependency' => '',
129
  'weight' => '',
@@ -132,12 +132,12 @@ function auxin_get_recent_posts_master_array( $master_array ) {
132
  ),
133
 
134
  array(
 
 
135
  'param_name' => 'exclude_custom_post_formats',
136
  'type' => 'aux_switch',
137
  'value' => '0',
138
  'class' => '',
139
- 'heading' => __('Exclude custom post formats','auxin-elements' ),
140
- 'description' => '',
141
  'admin_label' => true,
142
  'dependency' => '',
143
  'weight' => '',
@@ -146,16 +146,16 @@ function auxin_get_recent_posts_master_array( $master_array ) {
146
  ),
147
 
148
  array(
 
 
149
  'param_name' => 'exclude_qoute_link',
150
  'type' => 'aux_switch',
151
  'value' => '0',
152
  'class' => '',
153
- 'heading' => __('Exclude qoute and link post formats','auxin-elements' ),
154
- 'description' => '',
155
  'admin_label' => true,
156
  'dependency' => array(
157
- 'element' => 'exclude_custom_post_formats',
158
- 'value' => '0'
159
  ),
160
  'weight' => '',
161
  'group' => '' ,
@@ -163,42 +163,42 @@ function auxin_get_recent_posts_master_array( $master_array ) {
163
  ),
164
 
165
  array(
166
- 'param_name' => 'exclude',
167
- 'type' => 'textfield',
168
- 'value' => '',
169
- 'holder' => 'textfield',
170
- 'class' => '',
171
- 'heading' => __('Exclude posts','auxin-elements' ),
172
- 'description' => __('Post IDs separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
173
- 'admin_label' => true,
174
- 'dependency' => '',
175
- 'weight' => '',
176
- 'group' => '' ,
177
  'edit_field_class' => ''
178
  ),
179
  array(
180
- 'param_name' => 'include',
181
- 'type' => 'textfield',
182
- 'value' => '',
183
- 'holder' => 'textfield',
184
- 'class' => '',
185
- 'heading' => __('Include posts','auxin-elements' ),
186
- 'description' => __('Post IDs separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
187
- 'admin_label' => true,
188
- 'dependency' => '',
189
- 'weight' => '',
190
- 'group' => '' ,
191
  'edit_field_class' => ''
192
  ),
193
  array(
194
- 'param_name' => 'order_by',
195
- 'type' => 'dropdown',
196
- 'def_value' => 'date',
197
- 'holder' => 'dropdown',
198
- 'class' => 'order_by',
199
- 'heading' => __('Order By', 'auxin-elements'),
200
- 'description' => '',
201
- 'value' => array (
202
  'date' => __('Date', 'auxin-elements'),
203
  'menu_order date' => __('Menu Order', 'auxin-elements'),
204
  'title' => __('Title', 'auxin-elements'),
@@ -215,16 +215,16 @@ function auxin_get_recent_posts_master_array( $master_array ) {
215
  'edit_field_class' => ''
216
  ),
217
  array(
218
- 'param_name' => 'order',
219
- 'type' => 'dropdown',
220
- 'def_value' => 'DESC',
221
- 'holder' => 'dropdown',
222
- 'class' => 'order',
223
- 'heading' => __('Order', 'auxin-elements'),
224
- 'description' => '',
225
- 'value' =>array (
226
- 'DESC' => __('Descending', 'auxin-elements'),
227
- 'ASC' => __('Ascending', 'auxin-elements'),
228
  ),
229
  'admin_label' => true,
230
  'dependency' => '',
@@ -234,13 +234,13 @@ function auxin_get_recent_posts_master_array( $master_array ) {
234
  ),
235
 
236
  array(
 
 
237
  'param_name' => 'offset',
238
  'type' => 'textfield',
239
  'value' => '',
240
  'holder' => 'textfield',
241
  'class' => '',
242
- 'heading' => __('Start offset','auxin-elements' ),
243
- 'description' => __('Number of post to displace or pass over', 'auxin-elements' ),
244
  'admin_label' => true,
245
  'dependency' => '',
246
  'weight' => '',
@@ -249,13 +249,13 @@ function auxin_get_recent_posts_master_array( $master_array ) {
249
  ),
250
 
251
  array(
 
252
  'param_name' => 'show_media',
253
  'type' => 'aux_switch',
254
  'def_value' => '',
255
  'value' => '1',
256
  'holder' => 'dropdown',
257
  'class' => 'show_media',
258
- 'heading' => __('Display post media (image, video, etc)', 'auxin-elements' ),
259
  'admin_label' => true,
260
  'dependency' => '',
261
  'weight' => '',
@@ -264,12 +264,12 @@ function auxin_get_recent_posts_master_array( $master_array ) {
264
  ),
265
 
266
  array(
 
 
267
  'param_name' => 'show_title',
268
  'type' => 'aux_switch',
269
  'value' => '1',
270
  'class' => '',
271
- 'heading' => __('Insert post title','auxin-elements' ),
272
- 'description' => '',
273
  'admin_label' => true,
274
  'dependency' => '',
275
  'weight' => '',
@@ -278,12 +278,12 @@ function auxin_get_recent_posts_master_array( $master_array ) {
278
  ),
279
 
280
  array(
 
 
281
  'param_name' => 'show_info',
282
  'type' => 'aux_switch',
283
  'value' => '1',
284
  'class' => '',
285
- 'heading' => __('Insert post meta','auxin-elements' ),
286
- 'description' => '',
287
  'admin_label' => true,
288
  'weight' => '',
289
  'group' => '' ,
@@ -291,14 +291,14 @@ function auxin_get_recent_posts_master_array( $master_array ) {
291
  ),
292
 
293
  array(
 
 
294
  'param_name' => 'show_excerpt',
295
  'type' => 'aux_switch',
296
  'def_value' => '',
297
  'value' => '1',
298
  'holder' => 'dropdown',
299
  'class' => 'show_excerpt',
300
- 'heading' => __('Display Excerpt','auxin-elements' ),
301
- 'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
302
  'admin_label' => 1,
303
  'dependency' => '',
304
  'weight' => '',
@@ -307,13 +307,13 @@ function auxin_get_recent_posts_master_array( $master_array ) {
307
  ),
308
 
309
  array(
 
 
310
  'param_name' => 'excerpt_len',
311
  'type' => 'textfield',
312
  'value' => '160',
313
  'holder' => 'textfield',
314
  'class' => 'excerpt_len',
315
- 'heading' => __('Excerpt Length','auxin-elements' ),
316
- 'description' => __('Specify summary content in character','auxin-elements' ),
317
  'admin_label' => 1,
318
  'dependency' => array(
319
  'element' => 'show_excerpt',
@@ -326,12 +326,12 @@ function auxin_get_recent_posts_master_array( $master_array ) {
326
 
327
 
328
  array(
 
 
329
  'param_name' => 'show_readmore',
330
  'type' => 'aux_switch',
331
  'value' => '1',
332
  'class' => '',
333
- 'heading' => __('Insert read more button','auxin-elements' ),
334
- 'description' => '',
335
  'admin_label' => true,
336
  'weight' => '',
337
  'group' => '' ,
@@ -339,12 +339,12 @@ function auxin_get_recent_posts_master_array( $master_array ) {
339
  ),
340
 
341
  array(
 
 
342
  'param_name' => 'show_author_footer',
343
  'type' => 'aux_switch',
344
  'value' => '1',
345
  'class' => '',
346
- 'heading' => __('Insert author name in bottom side','auxin-elements' ),
347
- 'description' => '',
348
  'dependency' => array(
349
  'element' => 'show_readmore',
350
  'value' => '0'
@@ -356,13 +356,13 @@ function auxin_get_recent_posts_master_array( $master_array ) {
356
  ),
357
 
358
  array(
 
 
359
  'param_name' => 'desktop_cnum',
360
  'type' => 'dropdown',
361
  'def_value' => '4',
362
  'holder' => 'dropdown',
363
  'class' => 'num',
364
- 'heading' => __('Number of columns', 'auxin-elements'),
365
- 'description' => '',
366
  'value' => array(
367
  '1' => '1' , '2' => '2' , '3' => '3' ,
368
  '4' => '4' , '5' => '5' , '6' => '6'
@@ -370,18 +370,18 @@ function auxin_get_recent_posts_master_array( $master_array ) {
370
  'admin_label' => true,
371
  'dependency' => '',
372
  'weight' => '',
373
- 'group' => '' ,
374
  'edit_field_class' => ''
375
  ),
376
 
377
  array(
 
 
378
  'param_name' => 'tablet_cnum',
379
  'type' => 'dropdown',
380
  'def_value' => 'inherit',
381
  'holder' => 'dropdown',
382
  'class' => 'num',
383
- 'heading' => __('Number of columns in tablet size', 'auxin-elements'),
384
- 'description' => '',
385
  'value' => array(
386
  'inherit' => 'Inherited from larger',
387
  '1' => '1' , '2' => '2' , '3' => '3' ,
@@ -390,18 +390,18 @@ function auxin_get_recent_posts_master_array( $master_array ) {
390
  'admin_label' => true,
391
  'dependency' => '',
392
  'weight' => '',
393
- 'group' => '' ,
394
  'edit_field_class' => ''
395
  ),
396
 
397
  array(
 
 
398
  'param_name' => 'phone_cnum',
399
  'type' => 'dropdown',
400
  'def_value' => 'inherit',
401
  'holder' => 'dropdown',
402
  'class' => 'num',
403
- 'heading' => __('Number of columns in phone size', 'auxin-elements'),
404
- 'description' => '',
405
  'value' => array(
406
  'inherit' => 'Inherited from larger',
407
  '1' => '1' , '2' => '2'
@@ -409,7 +409,7 @@ function auxin_get_recent_posts_master_array( $master_array ) {
409
  'admin_label' => true,
410
  'dependency' => '',
411
  'weight' => '',
412
- 'group' => '' ,
413
  'edit_field_class' => ''
414
  ),
415
 
@@ -533,14 +533,14 @@ function auxin_get_recent_posts_master_array( $master_array ) {
533
 
534
 
535
  array(
 
 
536
  'param_name' => 'extra_classes',
537
  'type' => 'textfield',
538
  'value' => '',
539
  'def_value' => '',
540
  'holder' => 'textfield',
541
  'class' => 'extra_classes',
542
- 'heading' => __('Extra class name','auxin-elements' ),
543
- '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' ),
544
  'admin_label' => true,
545
  'dependency' => '',
546
  'weight' => '',
@@ -574,12 +574,13 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
574
  $default_atts = array(
575
  'title' => '', // header title
576
  'cat' => '',
577
- 'num' => '4',
578
  'exclude' => '',
579
  'include' => '',
580
- 'include' => '',
581
  'offset' => '',
582
- 'order_by' => 'date',
 
583
  'order' => 'desc',
584
  'exclude_without_media' => 0,
585
  'exclude_custom_post_formats' => 0,
@@ -596,6 +597,7 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
596
  'phone_cnum' => 'inherit',
597
  'preview_mode' => 'grid',
598
  'tag' => '',
 
599
  'extra_classes' => '',
600
  'custom_el_id' => '',
601
  'carousel_space' => '30',
@@ -617,15 +619,17 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
617
  'orderby' => $order_by,
618
  'order' => $order,
619
  'offset' => $offset,
 
620
  'cat' => $cat,
621
  'post__not_in' => array_filter( explode( ',', $exclude ) ),
622
  'post__in' => array_filter( explode( ',', $include ) ),
623
  'post_status' => 'publish',
624
- 'posts_per_page' => -1,
625
  'ignore_sticky_posts' => 1
626
  );
627
 
628
- $th_query = new WP_Query( $args );
 
629
 
630
 
631
  // widget header ------------------------------
@@ -633,14 +637,14 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
633
  echo $result['widget_title'];
634
 
635
 
636
- $phone_break_point = 767;
637
  $tablet_break_point = 992;
638
 
639
- $show_comments = true; // shows comments icon
640
- $post_counter = 0;
641
- $column_class = '';
642
- $item_class = 'aux-col';
643
- $carousel_attrs = '';
644
 
645
  if ( 'grid' == $preview_mode ) {
646
  // generate columns class
@@ -663,9 +667,11 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
663
 
664
  }
665
 
666
- if( $th_query->have_posts() ){
 
 
667
  ?><div class="<?php echo $column_class ?>" <?php echo $carousel_attrs ?>> <?php
668
- while ( $th_query->have_posts() ) {
669
 
670
  // break the loop if it is reached to the limit
671
  if ( $post_counter < $num ) {
@@ -674,8 +680,9 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
674
  break;
675
  }
676
 
677
- $th_query->the_post();
678
- $post = $th_query->post;
 
679
  $post_vars = auxin_get_post_format_media( $post , 'archive', $phone_break_point, true );
680
  extract( $post_vars );
681
 
@@ -699,7 +706,15 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
699
  ?> </div> <?php
700
  }
701
 
702
- wp_reset_query();
 
 
 
 
 
 
 
 
703
 
704
  // widget footer ------------------------------
705
  echo $result['widget_footer'];
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' => '',
87
  // ),
88
 
89
  array(
90
+ 'param_name' => 'cat',
91
+ 'type' => 'dropdown',
92
+ 'def_value' => '',
93
+ 'holder' => 'dropdown',
94
+ 'class' => 'cat',
95
+ 'heading' => __('Categories', 'auxin-elements'),
96
+ 'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
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' => '',
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' => '',
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' => '',
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' => '' ,
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'),
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' => '',
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' => '',
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' => '',
264
  ),
265
 
266
  array(
267
+ 'heading' => __('Insert post title','auxin-elements' ),
268
+ 'description' => '',
269
  'param_name' => 'show_title',
270
  'type' => 'aux_switch',
271
  'value' => '1',
272
  'class' => '',
 
 
273
  'admin_label' => true,
274
  'dependency' => '',
275
  'weight' => '',
278
  ),
279
 
280
  array(
281
+ 'heading' => __('Insert post meta','auxin-elements' ),
282
+ 'description' => '',
283
  'param_name' => 'show_info',
284
  'type' => 'aux_switch',
285
  'value' => '1',
286
  'class' => '',
 
 
287
  'admin_label' => true,
288
  'weight' => '',
289
  'group' => '' ,
291
  ),
292
 
293
  array(
294
+ 'heading' => __('Display Excerpt','auxin-elements' ),
295
+ 'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
296
  'param_name' => 'show_excerpt',
297
  'type' => 'aux_switch',
298
  'def_value' => '',
299
  'value' => '1',
300
  'holder' => 'dropdown',
301
  'class' => 'show_excerpt',
 
 
302
  'admin_label' => 1,
303
  'dependency' => '',
304
  'weight' => '',
307
  ),
308
 
309
  array(
310
+ 'heading' => __('Excerpt Length','auxin-elements' ),
311
+ 'description' => __('Specify summary content in character.','auxin-elements' ),
312
  'param_name' => 'excerpt_len',
313
  'type' => 'textfield',
314
  'value' => '160',
315
  'holder' => 'textfield',
316
  'class' => 'excerpt_len',
 
 
317
  'admin_label' => 1,
318
  'dependency' => array(
319
  'element' => 'show_excerpt',
326
 
327
 
328
  array(
329
+ 'heading' => __('Insert read more button','auxin-elements' ),
330
+ 'description' => '',
331
  'param_name' => 'show_readmore',
332
  'type' => 'aux_switch',
333
  'value' => '1',
334
  'class' => '',
 
 
335
  'admin_label' => true,
336
  'weight' => '',
337
  'group' => '' ,
339
  ),
340
 
341
  array(
342
+ 'heading' => __('Insert author name in bottom side','auxin-elements' ),
343
+ 'description' => '',
344
  'param_name' => 'show_author_footer',
345
  'type' => 'aux_switch',
346
  'value' => '1',
347
  'class' => '',
 
 
348
  'dependency' => array(
349
  'element' => 'show_readmore',
350
  'value' => '0'
356
  ),
357
 
358
  array(
359
+ 'heading' => __('Number of columns', 'auxin-elements'),
360
+ 'description' => '',
361
  'param_name' => 'desktop_cnum',
362
  'type' => 'dropdown',
363
  'def_value' => '4',
364
  'holder' => 'dropdown',
365
  'class' => 'num',
 
 
366
  'value' => array(
367
  '1' => '1' , '2' => '2' , '3' => '3' ,
368
  '4' => '4' , '5' => '5' , '6' => '6'
370
  'admin_label' => true,
371
  'dependency' => '',
372
  'weight' => '',
373
+ 'group' => 'Layout' ,
374
  'edit_field_class' => ''
375
  ),
376
 
377
  array(
378
+ 'heading' => __('Number of columns in tablet size', 'auxin-elements'),
379
+ 'description' => '',
380
  'param_name' => 'tablet_cnum',
381
  'type' => 'dropdown',
382
  'def_value' => 'inherit',
383
  'holder' => 'dropdown',
384
  'class' => 'num',
 
 
385
  'value' => array(
386
  'inherit' => 'Inherited from larger',
387
  '1' => '1' , '2' => '2' , '3' => '3' ,
390
  'admin_label' => true,
391
  'dependency' => '',
392
  'weight' => '',
393
+ 'group' => 'Layout' ,
394
  'edit_field_class' => ''
395
  ),
396
 
397
  array(
398
+ 'heading' => __('Number of columns in phone size', 'auxin-elements'),
399
+ 'description' => '',
400
  'param_name' => 'phone_cnum',
401
  'type' => 'dropdown',
402
  'def_value' => 'inherit',
403
  'holder' => 'dropdown',
404
  'class' => 'num',
 
 
405
  'value' => array(
406
  'inherit' => 'Inherited from larger',
407
  '1' => '1' , '2' => '2'
409
  'admin_label' => true,
410
  'dependency' => '',
411
  'weight' => '',
412
+ 'group' => 'Layout' ,
413
  'edit_field_class' => ''
414
  ),
415
 
533
 
534
 
535
  array(
536
+ 'heading' => __('Extra class name','auxin-elements' ),
537
+ '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' ),
538
  'param_name' => 'extra_classes',
539
  'type' => 'textfield',
540
  'value' => '',
541
  'def_value' => '',
542
  'holder' => 'textfield',
543
  'class' => 'extra_classes',
 
 
544
  'admin_label' => true,
545
  'dependency' => '',
546
  'weight' => '',
574
  $default_atts = array(
575
  'title' => '', // header title
576
  'cat' => '',
577
+ 'num' => '4', // max generated entry
578
  'exclude' => '',
579
  'include' => '',
580
+ 'posts_per_page' => -1,
581
  'offset' => '',
582
+ 'paged' => '',
583
+ 'order_by' => 'menu_order date',
584
  'order' => 'desc',
585
  'exclude_without_media' => 0,
586
  'exclude_custom_post_formats' => 0,
597
  'phone_cnum' => 'inherit',
598
  'preview_mode' => 'grid',
599
  'tag' => '',
600
+ 'reset_query' => true,
601
  'extra_classes' => '',
602
  'custom_el_id' => '',
603
  'carousel_space' => '30',
619
  'orderby' => $order_by,
620
  'order' => $order,
621
  'offset' => $offset,
622
+ 'paged' => $paged,
623
  'cat' => $cat,
624
  'post__not_in' => array_filter( explode( ',', $exclude ) ),
625
  'post__in' => array_filter( explode( ',', $include ) ),
626
  'post_status' => 'publish',
627
+ 'posts_per_page' => $posts_per_page,
628
  'ignore_sticky_posts' => 1
629
  );
630
 
631
+ global $wp_query;
632
+ $wp_query = new WP_Query( $args );
633
 
634
 
635
  // widget header ------------------------------
637
  echo $result['widget_title'];
638
 
639
 
640
+ $phone_break_point = 767;
641
  $tablet_break_point = 992;
642
 
643
+ $show_comments = true; // shows comments icon
644
+ $post_counter = 0;
645
+ $column_class = '';
646
+ $item_class = 'aux-col';
647
+ $carousel_attrs = '';
648
 
649
  if ( 'grid' == $preview_mode ) {
650
  // generate columns class
667
 
668
  }
669
 
670
+ $have_posts = $wp_query->have_posts();
671
+
672
+ if( $have_posts ){
673
  ?><div class="<?php echo $column_class ?>" <?php echo $carousel_attrs ?>> <?php
674
+ while ( $wp_query->have_posts() ) {
675
 
676
  // break the loop if it is reached to the limit
677
  if ( $post_counter < $num ) {
680
  break;
681
  }
682
 
683
+ $wp_query->the_post();
684
+ $post = $wp_query->post;
685
+
686
  $post_vars = auxin_get_post_format_media( $post , 'archive', $phone_break_point, true );
687
  extract( $post_vars );
688
 
706
  ?> </div> <?php
707
  }
708
 
709
+ if( $reset_query ){
710
+ wp_reset_query();
711
+ }
712
+
713
+ // return false if no result found
714
+ if( ! $have_posts ){
715
+ ob_get_clean();
716
+ return false;
717
+ }
718
 
719
  // widget footer ------------------------------
720
  echo $result['widget_footer'];
includes/elements/search.php CHANGED
@@ -38,14 +38,14 @@ function auxin_get_search_master_array( $master_array ) {
38
  'as_child' => '',
39
  'params' => array(
40
  array(
 
 
41
  'param_name' => 'title',
42
  'type' => 'textfield',
43
  'value' => '',
44
  'def_value' => '',
45
  'holder' => 'textfield',
46
  'class' => 'title',
47
- 'heading' => __('Title','auxin-elements'),
48
- 'description' => '',
49
  'admin_label' => true,
50
  'dependency' => '',
51
  'weight' => '',
@@ -53,14 +53,14 @@ function auxin_get_search_master_array( $master_array ) {
53
  'edit_field_class' => ''
54
  ),
55
  array(
 
 
56
  'param_name' => 'extra_classes',
57
  'type' => 'textfield',
58
  'value' => '',
59
  'def_value' => '',
60
  'holder' => 'textfield',
61
  'class' => 'extra_classes',
62
- 'heading' => __('Extra class name','auxin-elements'),
63
- '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'),
64
  'admin_label' => true,
65
  'dependency' => '',
66
  'weight' => '',
38
  'as_child' => '',
39
  'params' => array(
40
  array(
41
+ 'heading' => __('Title','auxin-elements'),
42
+ 'description' => __('Search title, leave it empty if you don`t need title.', 'auxin-elements'),
43
  'param_name' => 'title',
44
  'type' => 'textfield',
45
  'value' => '',
46
  'def_value' => '',
47
  'holder' => 'textfield',
48
  'class' => 'title',
 
 
49
  'admin_label' => true,
50
  'dependency' => '',
51
  'weight' => '',
53
  'edit_field_class' => ''
54
  ),
55
  array(
56
+ 'heading' => __('Extra class name','auxin-elements'),
57
+ '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'),
58
  'param_name' => 'extra_classes',
59
  'type' => 'textfield',
60
  'value' => '',
61
  'def_value' => '',
62
  'holder' => 'textfield',
63
  'class' => 'extra_classes',
 
 
64
  'admin_label' => true,
65
  'dependency' => '',
66
  'weight' => '',
includes/elements/socials-list.php CHANGED
@@ -39,34 +39,34 @@ function auxin_get_social_master_array( $master_array ) {
39
  'as_child' => '',
40
  'params' => array(
41
  array(
42
- 'param_name' => 'title',
43
- 'type' => 'textfield',
44
- 'value' => '',
45
- 'def_value' => '',
46
- 'holder' => 'textfield',
47
- 'class' => 'id',
48
- 'heading' => __('Title','auxin-elements'),
49
- 'description' => '',
50
- 'admin_label' => true,
51
- 'dependency' => '',
52
- 'weight' => '',
53
- 'group' => '' ,
54
- 'edit_field_class' => ''
55
  ),
56
  array(
 
 
57
  'param_name' => 'size',
58
  'type' => 'dropdown',
59
  'def_value' => 'medium',
60
  'value' => array(
61
- 'small' => __('Small' , 'auxin-elements'),
62
- 'medium' => __('Medium' , 'auxin-elements'),
63
- 'large' => __('Large' , 'auxin-elements'),
64
- 'extra-large' => __('Extra large' , 'auxin-elements')
65
  ),
66
  'holder' => 'dropdown',
67
  'class' => 'size',
68
- 'heading' => __('Size of social icons','auxin-elements'),
69
- 'description' => '',
70
  'admin_label' => true,
71
  'dependency' => '',
72
  'weight' => '',
@@ -74,6 +74,8 @@ function auxin_get_social_master_array( $master_array ) {
74
  'edit_field_class' => ''
75
  ),
76
  array(
 
 
77
  'param_name' => 'direction',
78
  'type' => 'dropdown',
79
  'def_value' => 'horizontal',
@@ -83,8 +85,6 @@ function auxin_get_social_master_array( $master_array ) {
83
  ),
84
  'holder' => 'dropdown',
85
  'class' => 'direction',
86
- 'heading' => __('Directon of socials list','auxin-elements'),
87
- 'description' => '',
88
  'admin_label' => true,
89
  'dependency' => '',
90
  'weight' => '',
39
  'as_child' => '',
40
  'params' => array(
41
  array(
42
+ 'heading' => __('Title','auxin-elements'),
43
+ 'description' => __('Socials title, leave it empty if you don`t need title.', 'auxin-elements'),
44
+ 'param_name' => 'title',
45
+ 'type' => 'textfield',
46
+ 'value' => '',
47
+ 'def_value' => '',
48
+ 'holder' => 'textfield',
49
+ 'class' => 'id',
50
+ 'admin_label' => true,
51
+ 'dependency' => '',
52
+ 'weight' => '',
53
+ 'group' => '' ,
54
+ 'edit_field_class' => ''
55
  ),
56
  array(
57
+ 'heading' => __('Size of social icons','auxin-elements'),
58
+ 'description' => '',
59
  'param_name' => 'size',
60
  'type' => 'dropdown',
61
  'def_value' => 'medium',
62
  'value' => array(
63
+ 'small' => __('Small' , 'auxin-elements'),
64
+ 'medium' => __('Medium' , 'auxin-elements'),
65
+ 'large' => __('Large' , 'auxin-elements'),
66
+ 'extra-large' => __('Extra large' , 'auxin-elements')
67
  ),
68
  'holder' => 'dropdown',
69
  'class' => 'size',
 
 
70
  'admin_label' => true,
71
  'dependency' => '',
72
  'weight' => '',
74
  'edit_field_class' => ''
75
  ),
76
  array(
77
+ 'heading' => __('Directon of socials list','auxin-elements'),
78
+ 'description' => '',
79
  'param_name' => 'direction',
80
  'type' => 'dropdown',
81
  'def_value' => 'horizontal',
85
  ),
86
  'holder' => 'dropdown',
87
  'class' => 'direction',
 
 
88
  'admin_label' => true,
89
  'dependency' => '',
90
  'weight' => '',
includes/elements/text.php CHANGED
@@ -39,13 +39,14 @@ function auxin_get_text_master_array( $master_array ) {
39
  'as_child' => '',
40
  'params' => array(
41
  array(
 
 
42
  'param_name' => 'title',
43
  'type' => 'textfield',
44
  'value' => '',
45
  'def_value' => '',
46
  'holder' => 'textfield',
47
  'class' => 'title',
48
- 'heading' => __('Title','auxin-elements'),
49
  'description' => '',
50
  'admin_label' => true,
51
  'dependency' => '',
@@ -54,14 +55,14 @@ function auxin_get_text_master_array( $master_array ) {
54
  'edit_field_class' => ''
55
  ),
56
  array(
 
 
57
  'param_name' => 'title_link',
58
  'type' => 'textfield',
59
  'value' => '',
60
  'def_value' => '',
61
  'holder' => 'textfield',
62
  'class' => 'title_link',
63
- 'heading' => __('Title Link','auxin-elements'),
64
- 'description' => '',
65
  'admin_label' => true,
66
  'dependency' => '',
67
  'weight' => '',
@@ -69,31 +70,31 @@ function auxin_get_text_master_array( $master_array ) {
69
  'edit_field_class' => ''
70
  ),
71
  array(
 
 
72
  'param_name' => 'text_align',
73
  'type' => 'aux_visual_select',
74
  'def_value' => 'top',
75
- 'choices' => array(
76
- '' => array(
77
  'label' => __('Theme Default', 'auxin-elements'),
78
  'css_class' => 'axiAdminIcon-default',
79
  ),
80
- 'left' => array(
81
  'label' => __('Left', 'auxin-elements'),
82
  'css_class' => 'axiAdminIcon-text-align-left',
83
  ),
84
- 'center' => array(
85
  'label' => __('Center', 'auxin-elements'),
86
  'css_class' => 'axiAdminIcon-text-align-center'
87
  ),
88
- 'right' => array(
89
  'label' => __('Center', 'auxin-elements'),
90
  'css_class' => 'axiAdminIcon-text-align-right'
91
  )
92
  ),
93
  'holder' => 'dropdown',
94
  'class' => 'text_align',
95
- 'heading' => __('Text Align','auxin-elements'),
96
- 'description' => '',
97
  'admin_label' => true,
98
  'dependency' => '',
99
  'weight' => '',
@@ -101,14 +102,14 @@ function auxin_get_text_master_array( $master_array ) {
101
  'edit_field_class' => ''
102
  ),
103
  array(
 
 
104
  'param_name' => 'icon',
105
  'type' => 'iconpicker',
106
  'value' => '',
107
  'def_value' => '',
108
  'holder' => 'textfield',
109
  'class' => 'iconpicker',
110
- 'heading' => __('Icon','auxin-elements'),
111
- 'description' => __('Please choose an icon from avaialable icons.', 'auxin-elements'),
112
  'admin_label' => true,
113
  'dependency' => '',
114
  'weight' => '',
@@ -116,14 +117,14 @@ function auxin_get_text_master_array( $master_array ) {
116
  'edit_field_class' => ''
117
  ),
118
  array(
 
 
119
  'param_name' => 'icon_color',
120
  'type' => 'colorpicker',
121
  'def_value' => '#888',
122
  'value' => '#888',
123
  'holder' => '',
124
  'class' => 'icon_color',
125
- 'heading' => __('Icon Color','auxin-elements'),
126
- 'description' => __('Choose a color for icon.','auxin-elements'),
127
  'admin_label' => true,
128
  'dependency' => '',
129
  'weight' => '',
@@ -131,14 +132,14 @@ function auxin_get_text_master_array( $master_array ) {
131
  'edit_field_class' => ''
132
  ),
133
  array(
 
 
134
  'param_name' => 'image',
135
  'type' => 'attach_image',
136
  'def_value' => '',
137
  'value' => '',
138
  'holder' => '',
139
  'class' => 'image',
140
- 'heading' => __('Image','auxin-elements'),
141
- 'description' => '',
142
  'admin_label' => true,
143
  'dependency' => '',
144
  'weight' => '',
@@ -146,27 +147,27 @@ function auxin_get_text_master_array( $master_array ) {
146
  'edit_field_class' => ''
147
  ),
148
  array(
 
 
149
  'param_name' => 'image_position',
150
  'type' => 'aux_visual_select',
151
  'def_value' => 'top',
152
- 'choices' => array(
153
- 'top' => array(
154
- 'label' => __('White Space', 'auxin-elements'),
155
- 'image' => AUX_URL . 'images/visual-select/column-icon-top.svg'
156
  ),
157
  'left' => array(
158
- 'label' => __('Solid', 'auxin-elements'),
159
- 'image' => AUX_URL . 'images/visual-select/column-icon-left.svg'
160
  ),
161
  'right' => array(
162
- 'label' => __('Dashed', 'auxin-elements'),
163
- 'image' => AUX_URL . 'images/visual-select/column-icon-right.svg'
164
  )
165
  ),
166
  'holder' => 'dropdown',
167
  'class' => 'image_position',
168
- 'heading' => __('Image or icon position','auxin-elements'),
169
- 'description' => '',
170
  'admin_label' => true,
171
  'dependency' => '',
172
  'weight' => '',
@@ -174,14 +175,14 @@ function auxin_get_text_master_array( $master_array ) {
174
  'edit_field_class' => ''
175
  ),
176
  array(
 
 
177
  'param_name' => 'content',
178
  'type' => 'textarea_html',
179
  'value' => '',
180
  'def_value' => '',
181
  'holder' => 'div',
182
  'class' => 'content',
183
- 'heading' => __('Content','auxin-elements'),
184
- 'description' => '',
185
  'admin_label' => true,
186
  'dependency' => '',
187
  'weight' => '',
@@ -189,14 +190,14 @@ function auxin_get_text_master_array( $master_array ) {
189
  'edit_field_class' => ''
190
  ),
191
  array(
 
 
192
  'param_name' => 'extra_classes',
193
  'type' => 'textfield',
194
  'value' => '',
195
  'def_value' => '',
196
  'holder' => 'textfield',
197
  'class' => 'extra_classes',
198
- 'heading' => __('Extra class name','auxin-elements'),
199
- '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'),
200
  'admin_label' => true,
201
  'dependency' => '',
202
  'weight' => '',
39
  'as_child' => '',
40
  'params' => array(
41
  array(
42
+ 'heading' => __('Title','auxin-elements'),
43
+ 'description' => __('Text title, leave it empty if you don`t need title.', 'auxin-elements'),
44
  'param_name' => 'title',
45
  'type' => 'textfield',
46
  'value' => '',
47
  'def_value' => '',
48
  'holder' => 'textfield',
49
  'class' => 'title',
 
50
  'description' => '',
51
  'admin_label' => true,
52
  'dependency' => '',
55
  'edit_field_class' => ''
56
  ),
57
  array(
58
+ 'heading' => __('Title Link','auxin-elements'),
59
+ 'description' => '',
60
  'param_name' => 'title_link',
61
  'type' => 'textfield',
62
  'value' => '',
63
  'def_value' => '',
64
  'holder' => 'textfield',
65
  'class' => 'title_link',
 
 
66
  'admin_label' => true,
67
  'dependency' => '',
68
  'weight' => '',
70
  'edit_field_class' => ''
71
  ),
72
  array(
73
+ 'heading' => __('Text Align','auxin-elements'),
74
+ 'description' => '',
75
  'param_name' => 'text_align',
76
  'type' => 'aux_visual_select',
77
  'def_value' => 'top',
78
+ 'choices' => array(
79
+ '' => array(
80
  'label' => __('Theme Default', 'auxin-elements'),
81
  'css_class' => 'axiAdminIcon-default',
82
  ),
83
+ 'left' => array(
84
  'label' => __('Left', 'auxin-elements'),
85
  'css_class' => 'axiAdminIcon-text-align-left',
86
  ),
87
+ 'center' => array(
88
  'label' => __('Center', 'auxin-elements'),
89
  'css_class' => 'axiAdminIcon-text-align-center'
90
  ),
91
+ 'right' => array(
92
  'label' => __('Center', 'auxin-elements'),
93
  'css_class' => 'axiAdminIcon-text-align-right'
94
  )
95
  ),
96
  'holder' => 'dropdown',
97
  'class' => 'text_align',
 
 
98
  'admin_label' => true,
99
  'dependency' => '',
100
  'weight' => '',
102
  'edit_field_class' => ''
103
  ),
104
  array(
105
+ 'heading' => __('Icon','auxin-elements'),
106
+ 'description' => __('Please choose an icon from avaialable icons.', 'auxin-elements'),
107
  'param_name' => 'icon',
108
  'type' => 'iconpicker',
109
  'value' => '',
110
  'def_value' => '',
111
  'holder' => 'textfield',
112
  'class' => 'iconpicker',
 
 
113
  'admin_label' => true,
114
  'dependency' => '',
115
  'weight' => '',
117
  'edit_field_class' => ''
118
  ),
119
  array(
120
+ 'heading' => __('Icon Color','auxin-elements'),
121
+ 'description' => __('Choose a color for icon.','auxin-elements'),
122
  'param_name' => 'icon_color',
123
  'type' => 'colorpicker',
124
  'def_value' => '#888',
125
  'value' => '#888',
126
  'holder' => '',
127
  'class' => 'icon_color',
 
 
128
  'admin_label' => true,
129
  'dependency' => '',
130
  'weight' => '',
132
  'edit_field_class' => ''
133
  ),
134
  array(
135
+ 'heading' => __('Image','auxin-elements'),
136
+ 'description' => '',
137
  'param_name' => 'image',
138
  'type' => 'attach_image',
139
  'def_value' => '',
140
  'value' => '',
141
  'holder' => '',
142
  'class' => 'image',
 
 
143
  'admin_label' => true,
144
  'dependency' => '',
145
  'weight' => '',
147
  'edit_field_class' => ''
148
  ),
149
  array(
150
+ 'heading' => __('Image or icon position','auxin-elements'),
151
+ 'description' => '',
152
  'param_name' => 'image_position',
153
  'type' => 'aux_visual_select',
154
  'def_value' => 'top',
155
+ 'choices' => array(
156
+ 'top' => array(
157
+ 'label' => __('White Space', 'auxin-elements'),
158
+ 'image' => AUX_URL . 'images/visual-select/column-icon-top.svg'
159
  ),
160
  'left' => array(
161
+ 'label' => __('Solid', 'auxin-elements'),
162
+ 'image' => AUX_URL . 'images/visual-select/column-icon-left.svg'
163
  ),
164
  'right' => array(
165
+ 'label' => __('Dashed', 'auxin-elements'),
166
+ 'image' => AUX_URL . 'images/visual-select/column-icon-right.svg'
167
  )
168
  ),
169
  'holder' => 'dropdown',
170
  'class' => 'image_position',
 
 
171
  'admin_label' => true,
172
  'dependency' => '',
173
  'weight' => '',
175
  'edit_field_class' => ''
176
  ),
177
  array(
178
+ 'heading' => __('Content','auxin-elements'),
179
+ 'description' => __('Enter a text as a text content.','auxin-elements'),
180
  'param_name' => 'content',
181
  'type' => 'textarea_html',
182
  'value' => '',
183
  'def_value' => '',
184
  'holder' => 'div',
185
  'class' => 'content',
 
 
186
  'admin_label' => true,
187
  'dependency' => '',
188
  'weight' => '',
190
  'edit_field_class' => ''
191
  ),
192
  array(
193
+ 'heading' => __('Extra class name','auxin-elements'),
194
+ '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'),
195
  'param_name' => 'extra_classes',
196
  'type' => 'textfield',
197
  'value' => '',
198
  'def_value' => '',
199
  'holder' => 'textfield',
200
  'class' => 'extra_classes',
 
 
201
  'admin_label' => true,
202
  'dependency' => '',
203
  'weight' => '',
includes/elements/video.php CHANGED
@@ -35,14 +35,14 @@ function auxin_get_video_master_array( $master_array ) {
35
  'as_child' => '',
36
  'params' => array(
37
  array(
 
 
38
  'param_name' => 'title',
39
  'type' => 'textfield',
40
  'value' => '',
41
  'def_value' => '',
42
  'holder' => 'textfield',
43
  'class' => 'title',
44
- 'heading' => __('Title','auxin-elements'),
45
- 'description' => __('The video title.', 'auxin-elements'),
46
  'admin_label' => true,
47
  'dependency' => '',
48
  'weight' => '',
@@ -50,13 +50,13 @@ function auxin_get_video_master_array( $master_array ) {
50
  'edit_field_class' => ''
51
  ),
52
  array(
 
 
53
  'param_name' => 'autoplay',
54
  'type' => 'aux_switch',
55
  'def_value' => '0',
56
  'value' => '0',
57
  'class' => 'autoplay',
58
- 'heading' => __('Autoplay? ','auxin-elements'),
59
- 'description' => __('Whether to start the video automatically or not','auxin-elements'),
60
  'admin_label' => true,
61
  'dependency' => '',
62
  'weight' => '',
@@ -64,28 +64,28 @@ function auxin_get_video_master_array( $master_array ) {
64
  'edit_field_class' => ''
65
  ),
66
  array(
 
 
67
  'param_name' => 'loop',
68
- 'type' => 'aux_switch',
69
- 'def_value' => '0',
70
- 'value' => '0',
71
  'class' => 'loop',
72
- 'heading' => __('Repeat video','auxin-elements'),
73
- 'description' => __('Repeat video again when it ends.','auxin-elements'),
74
  'admin_label' => true,
75
  'dependency' => '',
76
  'weight' => '',
77
- 'group' => '' ,
78
  'edit_field_class' => ''
79
  ),
80
  array(
 
 
81
  'param_name' => 'width',
82
  'type' => 'textfield',
83
  'value' => '',
84
  'def_value' => '',
85
  'holder' => 'textfield',
86
  'class' => '',
87
- 'heading' => __('Width','auxin-elements'),
88
- 'description' => __('The width of video in pixel','auxin-elements'),
89
  'admin_label' => true,
90
  'dependency' => '',
91
  'weight' => '',
@@ -93,14 +93,14 @@ function auxin_get_video_master_array( $master_array ) {
93
  'edit_field_class' => ''
94
  ),
95
  array(
 
 
96
  'param_name' => 'height',
97
  'type' => 'textfield',
98
  'value' => '',
99
  'def_value' => '',
100
  'holder' => 'textfield',
101
  'class' => '',
102
- 'heading' => __('Height','auxin-elements'),
103
- 'description' => __('The height of video in pixel','auxin-elements'),
104
  'admin_label' => true,
105
  'dependency' => '',
106
  'weight' => '',
@@ -108,14 +108,14 @@ function auxin_get_video_master_array( $master_array ) {
108
  'edit_field_class' => ''
109
  ),
110
  array(
 
 
111
  'param_name' => 'src',
112
  'type' => 'aux_select_video',
113
  'value' => '',
114
  'def_value' => '',
115
  'holder' => 'aux_select_video',
116
  'class' => '',
117
- 'heading' => __('Video file','auxin-elements'),
118
- 'description' => __('Please upload the video file','auxin-elements'),
119
  'admin_label' => true,
120
  'dependency' => '',
121
  'weight' => '',
@@ -123,14 +123,14 @@ function auxin_get_video_master_array( $master_array ) {
123
  'edit_field_class' => ''
124
  ),
125
  array(
 
 
126
  'param_name' => 'url',
127
  'type' => 'textfield',
128
  'value' => '',
129
  'def_value' => '',
130
  'holder' => 'textfield',
131
  'class' => '',
132
- 'heading' => __('Video Link','auxin-elements'),
133
- 'description' => __('The youtube, vimeo or any video embed link','auxin-elements'),
134
  'admin_label' => true,
135
  'dependency' => '',
136
  'weight' => '',
@@ -138,14 +138,14 @@ function auxin_get_video_master_array( $master_array ) {
138
  'edit_field_class' => ''
139
  ),
140
  array(
 
 
141
  'param_name' => 'poster',
142
  'type' => 'textfield',
143
  'value' => '',
144
  'def_value' => '',
145
  'holder' => 'textfield',
146
  'class' => '',
147
- 'heading' => __('Video poster','auxin-elements'),
148
- 'description' => __('An image that represents the video content','auxin-elements'),
149
  'admin_label' => true,
150
  'dependency' => '',
151
  'weight' => '',
@@ -153,42 +153,42 @@ function auxin_get_video_master_array( $master_array ) {
153
  'edit_field_class' => ''
154
  ),
155
  array(
 
 
156
  'param_name' => 'skin',
157
  'type' => 'aux_visual_select',
158
  'def_value' => 'dark',
159
- 'choices' => array(
160
- 'dark' => array(
161
- 'label' => __('Dark', 'auxin-elements'),
162
- 'image' => AUX_URL . 'images/visual-select/audio-player-dark.svg'
163
  ),
164
- 'light' => array(
165
- 'label' => __('Light', 'auxin-elements'),
166
- 'image' => AUX_URL . 'images/visual-select/audio-player-light.svg'
167
  )
168
  ),
169
  'holder' => 'dropdown',
170
  'class' => 'skin',
171
- 'heading' => __('Player skin ','auxin-elements'),
172
- 'description' => __('Specifies skin for the player','auxin-elements'),
173
  'admin_label' => true,
174
  'dependency' => '',
175
  'weight' => '',
176
- 'group' => '' ,
177
  'edit_field_class' => ''
178
  ),
179
  array(
 
 
180
  'param_name' => 'extra_classes',
181
  'type' => 'textfield',
182
  'value' => '',
183
  'def_value' => '',
184
  'holder' => 'textfield',
185
  'class' => 'extra_classes',
186
- 'heading' => __('Extra class name','auxin-elements'),
187
- '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'),
188
  'admin_label' => true,
189
  'dependency' => '',
190
  'weight' => '',
191
- 'group' => '' ,
192
  'edit_field_class' => ''
193
  )
194
 
35
  'as_child' => '',
36
  'params' => array(
37
  array(
38
+ 'heading' => __('Title','auxin-elements'),
39
+ 'description' => __('Video title, leave it empty if you don`t need title.', 'auxin-elements'),
40
  'param_name' => 'title',
41
  'type' => 'textfield',
42
  'value' => '',
43
  'def_value' => '',
44
  'holder' => 'textfield',
45
  'class' => 'title',
 
 
46
  'admin_label' => true,
47
  'dependency' => '',
48
  'weight' => '',
50
  'edit_field_class' => ''
51
  ),
52
  array(
53
+ 'heading' => __('Autoplay','auxin-elements'),
54
+ 'description' => __('Whether to start the video automatically or not.','auxin-elements'),
55
  'param_name' => 'autoplay',
56
  'type' => 'aux_switch',
57
  'def_value' => '0',
58
  'value' => '0',
59
  'class' => 'autoplay',
 
 
60
  'admin_label' => true,
61
  'dependency' => '',
62
  'weight' => '',
64
  'edit_field_class' => ''
65
  ),
66
  array(
67
+ 'heading' => __('Repeat video','auxin-elements'),
68
+ 'description' => __('Play video again when it ends.','auxin-elements'),
69
  'param_name' => 'loop',
70
+ 'type' => 'aux_switch',
71
+ 'def_value' => '0',
72
+ 'value' => '0',
73
  'class' => 'loop',
 
 
74
  'admin_label' => true,
75
  'dependency' => '',
76
  'weight' => '',
77
+ 'group' => 'Extras' ,
78
  'edit_field_class' => ''
79
  ),
80
  array(
81
+ 'heading' => __('Width','auxin-elements'),
82
+ 'description' => __('Width size of video in pixel.','auxin-elements'),
83
  'param_name' => 'width',
84
  'type' => 'textfield',
85
  'value' => '',
86
  'def_value' => '',
87
  'holder' => 'textfield',
88
  'class' => '',
 
 
89
  'admin_label' => true,
90
  'dependency' => '',
91
  'weight' => '',
93
  'edit_field_class' => ''
94
  ),
95
  array(
96
+ 'heading' => __('Height','auxin-elements'),
97
+ 'description' => __('Height size of video in pixel.','auxin-elements'),
98
  'param_name' => 'height',
99
  'type' => 'textfield',
100
  'value' => '',
101
  'def_value' => '',
102
  'holder' => 'textfield',
103
  'class' => '',
 
 
104
  'admin_label' => true,
105
  'dependency' => '',
106
  'weight' => '',
108
  'edit_field_class' => ''
109
  ),
110
  array(
111
+ 'heading' => __('Video file','auxin-elements'),
112
+ 'description' => __('Please upload the video file.','auxin-elements'),
113
  'param_name' => 'src',
114
  'type' => 'aux_select_video',
115
  'value' => '',
116
  'def_value' => '',
117
  'holder' => 'aux_select_video',
118
  'class' => '',
 
 
119
  'admin_label' => true,
120
  'dependency' => '',
121
  'weight' => '',
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',
130
  'value' => '',
131
  'def_value' => '',
132
  'holder' => 'textfield',
133
  'class' => '',
 
 
134
  'admin_label' => true,
135
  'dependency' => '',
136
  'weight' => '',
138
  'edit_field_class' => ''
139
  ),
140
  array(
141
+ 'heading' => __('Video poster','auxin-elements'),
142
+ 'description' => __('An image that represents the video content.','auxin-elements'),
143
  'param_name' => 'poster',
144
  'type' => 'textfield',
145
  'value' => '',
146
  'def_value' => '',
147
  'holder' => 'textfield',
148
  'class' => '',
 
 
149
  'admin_label' => true,
150
  'dependency' => '',
151
  'weight' => '',
153
  'edit_field_class' => ''
154
  ),
155
  array(
156
+ 'heading' => __('Player skin ','auxin-elements'),
157
+ 'description' => __('Specifies skin for the player.','auxin-elements'),
158
  'param_name' => 'skin',
159
  'type' => 'aux_visual_select',
160
  'def_value' => 'dark',
161
+ 'choices' => array(
162
+ 'dark' => array(
163
+ 'label' => __('Dark', 'auxin-elements'),
164
+ 'image' => AUX_URL . 'images/visual-select/audio-player-dark.svg'
165
  ),
166
+ 'light' => array(
167
+ 'label' => __('Light', 'auxin-elements'),
168
+ 'image' => AUX_URL . 'images/visual-select/audio-player-light.svg'
169
  )
170
  ),
171
  'holder' => 'dropdown',
172
  'class' => 'skin',
 
 
173
  'admin_label' => true,
174
  'dependency' => '',
175
  'weight' => '',
176
+ 'group' => 'Extras' ,
177
  'edit_field_class' => ''
178
  ),
179
  array(
180
+ 'heading' => __('Extra class name','auxin-elements'),
181
+ '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'),
182
  'param_name' => 'extra_classes',
183
  'type' => 'textfield',
184
  'value' => '',
185
  'def_value' => '',
186
  'holder' => 'textfield',
187
  'class' => 'extra_classes',
 
 
188
  'admin_label' => true,
189
  'dependency' => '',
190
  'weight' => '',
191
+ 'group' => 'Extras' ,
192
  'edit_field_class' => ''
193
  )
194
 
includes/general-hooks.php CHANGED
@@ -271,10 +271,10 @@ function auxin_add_vc_field_types(){
271
 
272
  if ( defined( 'WPB_VC_VERSION' ) ) {
273
 
274
- vc_map_update('vc_icon', $settings );
275
 
276
  // TODO: This is a sample we need to create an array for all the icons and also enque its css file
277
- add_filter( 'vc_iconpicker-type-auxin', 'vc_iconpicker_type_auxin' );
278
  function vc_iconpicker_type_auxin( $icons ) {
279
  $auxin_icons = array(
280
  "Test" => array(
@@ -287,10 +287,10 @@ function auxin_add_vc_field_types(){
287
  return array_merge( $icons, $auxin_icons );
288
  }
289
 
290
- add_action( 'vc_backend_editor_enqueue_js_css', 'auxin_vc_iconpicker_editor_jscss' );
291
  // @see Vc_Frontend_Editor::enqueueAdmin (wp-content/plugins/js_composer/include/classes/editors/class-vc-frontend-editor.php),
292
  // used to enqueue needed js/css files when frontend editor is rendering
293
- add_action( 'vc_frontend_editor_enqueue_js_css', 'auxin_vc_iconpicker_editor_jscss' );
294
  function auxin_vc_iconpicker_editor_jscss () {
295
  wp_enqueue_style( 'auxin_font' );
296
  }
@@ -342,8 +342,8 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
342
 
343
  $fields_sections_list['fields'][] = array(
344
  'title' => __('Custom Javascript', 'auxin-elements'),
345
- 'description' => sprintf( __('You can add your custom javascript code here.%s No need to use %s tag', 'auxin-elements'), '<br />' , '<code>&lt;script&gt;</code>' )."<br />".
346
- __('In order to save your custom javascript code, you are expected to execute the code prior to saving.', 'auxin-elements'),
347
  'id' => 'auxin_user_custom_js',
348
  'section' => 'general-setting-section-custom-js',
349
  'dependency' => array(),
@@ -366,8 +366,8 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
366
 
367
 
368
  $fields_sections_list['fields'][] = array(
369
- 'title' => __('Enable built in SEO?', 'auxin-elements'),
370
- 'description' => __('If you want to use SEO plugins like "WordPress SEO by Yoast" or "All in One SEO Pack" you can disable built-in SEO for maximum compatibility by checking this option',
371
  'auxin-elements'),
372
  'id' => 'enable_theme_seo',
373
  'section' => 'general-setting-section-seo',
@@ -378,7 +378,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
378
 
379
  $fields_sections_list['fields'][] = array(
380
  'title' => __('Google analytics code', 'auxin-elements'),
381
- 'description' => __('You can add your Google analytics code here. Do NOT use <code>&lt;script&gt;</code> tag', 'auxin-elements'),
382
  'id' => 'auxin_user_google_analytics',
383
  'section' => 'general-setting-section-seo',
384
  'dependency' => array(),
@@ -391,7 +391,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
391
 
392
  $fields_sections_list['fields'][] = array(
393
  'title' => __('Google marketing code', 'auxin-elements'),
394
- 'description' => __('You can add your Google marketing code here. Do NOT use <code>&lt;script&gt;</code> tag', 'auxin-elements'),
395
  'id' => 'auxin_user_google_marketing',
396
  'section' => 'general-setting-section-seo',
397
  'dependency' => array(),
@@ -452,7 +452,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
452
 
453
  $fields_sections_list['fields'][] = array(
454
  'title' => __('Login message', 'auxin-elements'),
455
- 'description' => __('If you enter a text, it displays above of login form.', 'auxin-elements'),
456
  'id' => 'auxin_login_message',
457
  'section' => 'tools-setting-section-login',
458
  'dependency' => array(),
@@ -465,7 +465,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
465
 
466
  $fields_sections_list['fields'][] = array(
467
  'title' => __('Login Page Logo', 'auxin-elements'),
468
- 'description' => __('Specifies a logo to display on login page.(the width of logo image could be up to 320px)', 'auxin-elements'),
469
  'id' => 'auxin_login_logo_image',
470
  'section' => 'tools-setting-section-login',
471
  'dependency' => array(),
@@ -477,7 +477,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
477
 
478
  $fields_sections_list['fields'][] = array(
479
  'title' => __('Logo Width', 'auxin-elements'),
480
- 'description' => __('Specifies the width of logo image in pixel.', 'auxin-elements'),
481
  'id' => 'auxin_login_logo_width',
482
  'section' => 'tools-setting-section-login',
483
  'dependency' => array(),
@@ -489,7 +489,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
489
 
490
  $fields_sections_list['fields'][] = array(
491
  'title' => __('Logo Height', 'auxin-elements'),
492
- 'description' => __('Specifies the height of logo image in pixel.', 'auxin-elements'),
493
  'id' => 'auxin_login_logo_height',
494
  'section' => 'tools-setting-section-login',
495
  'dependency' => array(),
@@ -501,7 +501,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
501
  //--------------------------------
502
 
503
  $fields_sections_list['fields'][] = array(
504
- 'title' => __('Enable Background?', 'auxin-elements'),
505
  'description' => __('Enable it to display custom background on login page.', 'auxin-elements'),
506
  'id' => 'auxin_login_bg_show',
507
  'section' => 'tools-setting-section-login',
@@ -514,8 +514,8 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
514
 
515
  $fields_sections_list['fields'][] = array(
516
  'title' => __( 'Background Color', 'auxin-elements'),
 
517
  'id' => 'auxin_login_bg_color',
518
- 'description' => __( 'Specifies the color of website background', 'auxin-elements'),
519
  'section' => 'tools-setting-section-login',
520
  'type' => 'color',
521
  'dependency' => array(
@@ -530,8 +530,8 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
530
 
531
  $fields_sections_list['fields'][] = array(
532
  'title' => __('Background Image', 'auxin-elements'),
 
533
  'id' => 'auxin_login_bg_image',
534
- 'description' => __('You can upload custom image for site background', 'auxin-elements').'<br/>'.__('Note: if you set custom image, default image backgrounds will be ignored', 'auxin-elements'),
535
  'section' => 'tools-setting-section-login',
536
  'type' => 'image',
537
  'dependency' => array(
@@ -546,7 +546,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
546
 
547
  $fields_sections_list['fields'][] = array(
548
  'title' => __('Background Size', 'auxin-elements'),
549
- 'description' => __('Specifies the background size.', 'auxin-elements'),
550
  'id' => 'auxin_login_bg_size',
551
  'section' => 'tools-setting-section-login',
552
  'type' => 'radio-image',
@@ -576,7 +576,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
576
 
577
  $fields_sections_list['fields'][] = array(
578
  'title' => __('Background Pattern', 'auxin-elements'),
579
- 'description' => __('Here you can select one of these patterns as site image background.', 'auxin-elements'),
580
  'id' => 'auxin_login_bg_pattern',
581
  'section' => 'tools-setting-section-login',
582
  'choices' => auxin_get_background_patterns( array( 'none' => array( 'label' =>__('None', 'auxin-elements'), 'image' => AUX_URL . 'images/visual-select/none-pattern.svg' ) ), 'before' ),
@@ -627,7 +627,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
627
 
628
  $fields_sections_list['fields'][] = array(
629
  'title' => __( 'Background Position', 'auxin-elements'),
630
- 'description' => __('Specifies background image alignment.', 'auxin-elements'),
631
  'id' => 'auxin_login_bg_position',
632
  'section' => 'tools-setting-section-login',
633
  'choices' => array(
@@ -683,7 +683,7 @@ function auxin_add_theme_options_in_plugin( $fields_sections_list ){
683
 
684
  $fields_sections_list['fields'][] = array(
685
  'title' => __('Background Attachment', 'auxin-elements'),
686
- 'description' => __('Specifies whether the background is fixed or scrollable as user scrolls the document.', 'auxin-elements'),
687
  'id' => 'auxin_login_bg_attach',
688
  'section' => 'tools-setting-section-login',
689
  'type' => 'radio-image',
271
 
272
  if ( defined( 'WPB_VC_VERSION' ) ) {
273
 
274
+ // vc_map_update('vc_icon', $settings );
275
 
276
  // TODO: This is a sample we need to create an array for all the icons and also enque its css file
277
+ // add_filter( 'vc_iconpicker-type-auxin', 'vc_iconpicker_type_auxin' );
278
  function vc_iconpicker_type_auxin( $icons ) {
279
  $auxin_icons = array(
280
  "Test" => array(
287
  return array_merge( $icons, $auxin_icons );
288
  }
289
 
290
+ // add_action( 'vc_backend_editor_enqueue_js_css', 'auxin_vc_iconpicker_editor_jscss' );
291
  // @see Vc_Frontend_Editor::enqueueAdmin (wp-content/plugins/js_composer/include/classes/editors/class-vc-frontend-editor.php),
292
  // used to enqueue needed js/css files when frontend editor is rendering
293
+ // add_action( 'vc_frontend_editor_enqueue_js_css', 'auxin_vc_iconpicker_editor_jscss' );
294
  function auxin_vc_iconpicker_editor_jscss () {
295
  wp_enqueue_style( 'auxin_font' );
296
  }
342
 
343
  $fields_sections_list['fields'][] = array(
344
  'title' => __('Custom Javascript', 'auxin-elements'),
345
+ 'description' => sprintf( __('You can add your custom javascript code here.%s DO NOT use %s tag.', 'auxin-elements'), '<br />' , '<code>&lt;script&gt;</code>' )."<br />".
346
+ __('In order to save your custom javascript code, you are expected to execute the code prior for saving.', 'auxin-elements'),
347
  'id' => 'auxin_user_custom_js',
348
  'section' => 'general-setting-section-custom-js',
349
  'dependency' => array(),
366
 
367
 
368
  $fields_sections_list['fields'][] = array(
369
+ 'title' => __('Built in SEO', 'auxin-elements'),
370
+ 'description' => __('In case of using SEO plugins like "WordPress SEO by Yoast" or "All in One SEO Pack" you can disable built-in SEO for maximum compatibility.',
371
  'auxin-elements'),
372
  'id' => 'enable_theme_seo',
373
  'section' => 'general-setting-section-seo',
378
 
379
  $fields_sections_list['fields'][] = array(
380
  'title' => __('Google analytics code', 'auxin-elements'),
381
+ 'description' => sprintf( __('You can add your Google analytics code here.%s DO NOT use %s tag.', 'auxin-elements'), '<br />' , '<code>&lt;script&gt;</code>' ),
382
  'id' => 'auxin_user_google_analytics',
383
  'section' => 'general-setting-section-seo',
384
  'dependency' => array(),
391
 
392
  $fields_sections_list['fields'][] = array(
393
  'title' => __('Google marketing code', 'auxin-elements'),
394
+ 'description' => sprintf( __('You can add your Google marketing code here.%s DO NOT use %s tag.', 'auxin-elements'), '<br />' , '<code>&lt;script&gt;</code>' ),
395
  'id' => 'auxin_user_google_marketing',
396
  'section' => 'general-setting-section-seo',
397
  'dependency' => array(),
452
 
453
  $fields_sections_list['fields'][] = array(
454
  'title' => __('Login message', 'auxin-elements'),
455
+ 'description' => __('Enter a text to display above of login form.', 'auxin-elements'),
456
  'id' => 'auxin_login_message',
457
  'section' => 'tools-setting-section-login',
458
  'dependency' => array(),
465
 
466
  $fields_sections_list['fields'][] = array(
467
  'title' => __('Login Page Logo', 'auxin-elements'),
468
+ 'description' => __('Specifies a logo to display on login page.(width of logo image could be up to 320px)', 'auxin-elements'),
469
  'id' => 'auxin_login_logo_image',
470
  'section' => 'tools-setting-section-login',
471
  'dependency' => array(),
477
 
478
  $fields_sections_list['fields'][] = array(
479
  'title' => __('Logo Width', 'auxin-elements'),
480
+ 'description' => __('Specifies width of logo image in pixel.', 'auxin-elements'),
481
  'id' => 'auxin_login_logo_width',
482
  'section' => 'tools-setting-section-login',
483
  'dependency' => array(),
489
 
490
  $fields_sections_list['fields'][] = array(
491
  'title' => __('Logo Height', 'auxin-elements'),
492
+ 'description' => __('Specifies height of logo image in pixel.', 'auxin-elements'),
493
  'id' => 'auxin_login_logo_height',
494
  'section' => 'tools-setting-section-login',
495
  'dependency' => array(),
501
  //--------------------------------
502
 
503
  $fields_sections_list['fields'][] = array(
504
+ 'title' => __('Enable Background', 'auxin-elements'),
505
  'description' => __('Enable it to display custom background on login page.', 'auxin-elements'),
506
  'id' => 'auxin_login_bg_show',
507
  'section' => 'tools-setting-section-login',
514
 
515
  $fields_sections_list['fields'][] = array(
516
  'title' => __( 'Background Color', 'auxin-elements'),
517
+ 'description' => __( 'Specifies background color of website.', 'auxin-elements'),
518
  'id' => 'auxin_login_bg_color',
 
519
  'section' => 'tools-setting-section-login',
520
  'type' => 'color',
521
  'dependency' => array(
530
 
531
  $fields_sections_list['fields'][] = array(
532
  'title' => __('Background Image', 'auxin-elements'),
533
+ 'description' => __('You can upload custom image for background of login page', 'auxin-elements'),
534
  'id' => 'auxin_login_bg_image',
 
535
  'section' => 'tools-setting-section-login',
536
  'type' => 'image',
537
  'dependency' => array(
546
 
547
  $fields_sections_list['fields'][] = array(
548
  'title' => __('Background Size', 'auxin-elements'),
549
+ 'description' => __('Specifies background size on login page.', 'auxin-elements'),
550
  'id' => 'auxin_login_bg_size',
551
  'section' => 'tools-setting-section-login',
552
  'type' => 'radio-image',
576
 
577
  $fields_sections_list['fields'][] = array(
578
  'title' => __('Background Pattern', 'auxin-elements'),
579
+ 'description' => sprintf(__('You can select one of these patterns as login background image. %s Some of these can be used as a pattern over your background image.', 'auxin-elements'), '<br>'),
580
  'id' => 'auxin_login_bg_pattern',
581
  'section' => 'tools-setting-section-login',
582
  'choices' => auxin_get_background_patterns( array( 'none' => array( 'label' =>__('None', 'auxin-elements'), 'image' => AUX_URL . 'images/visual-select/none-pattern.svg' ) ), 'before' ),
627
 
628
  $fields_sections_list['fields'][] = array(
629
  'title' => __( 'Background Position', 'auxin-elements'),
630
+ 'description' => __('Specifies background image position.', 'auxin-elements'),
631
  'id' => 'auxin_login_bg_position',
632
  'section' => 'tools-setting-section-login',
633
  'choices' => array(
683
 
684
  $fields_sections_list['fields'][] = array(
685
  'title' => __('Background Attachment', 'auxin-elements'),
686
+ 'description' => __('Specifies whether the background is fixed or scrollable as user scrolls the page.', 'auxin-elements'),
687
  'id' => 'auxin_login_bg_attach',
688
  'section' => 'tools-setting-section-login',
689
  'type' => 'radio-image',
includes/index.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
 
3
  // load class files
 
4
  include_once( 'classes/class-auxin-widget-shortcode-map.php' );
5
-
6
  // commeon functions
7
  include_once( 'general-functions.php' );
8
  include_once( 'general-hooks.php' );
@@ -15,7 +15,9 @@ include_once( 'general-shortcodes.php' );
15
  // load elements
16
  include_once( 'elements/about-widget.php' );
17
  include_once( 'elements/recent-posts-widget.php' );
 
18
  include_once( 'elements/recent-posts.php' );
 
19
  include_once( 'elements/accordion.php' );
20
  include_once( 'elements/attachment-url.php' );
21
  include_once( 'elements/audio.php' );
1
  <?php
2
 
3
  // load class files
4
+ include_once( 'classes/class-auxin-siteorigin-widget.php' );
5
  include_once( 'classes/class-auxin-widget-shortcode-map.php' );
 
6
  // commeon functions
7
  include_once( 'general-functions.php' );
8
  include_once( 'general-hooks.php' );
15
  // load elements
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' );
public/class-auxels.php CHANGED
@@ -77,7 +77,7 @@ class AUXELS {
77
 
78
  // Load AJAX spesific codes on demand
79
  if ( defined('DOING_AJAX') && DOING_AJAX ){
80
-
81
  }
82
 
83
  // Load admin spesific codes
@@ -87,7 +87,7 @@ class AUXELS {
87
 
88
  // Load Frontend Functionality
89
  } else {
90
- include 'includes/class-auxels-frontend-assets.php';
91
  }
92
 
93
  }
77
 
78
  // Load AJAX spesific codes on demand
79
  if ( defined('DOING_AJAX') && DOING_AJAX ){
80
+ include( AUXELS_ADMIN_DIR . '/includes/admin-ajax.php' );
81
  }
82
 
83
  // Load admin spesific codes
87
 
88
  // Load Frontend Functionality
89
  } else {
90
+ include 'includes/index.php';
91
  }
92
 
93
  }
public/includes/index.php CHANGED
@@ -1 +1,9 @@
1
- <?php // Silence is golden
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // If this file is called directly, abort.
4
+ if ( ! defined( 'WPINC' ) ) {
5
+ die('No Naughty Business Please !');
6
+ }
7
+
8
+ include 'class-auxels-frontend-assets.php';
9
+ include 'templates-post.php';
public/includes/templates-post.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+