Version Description
Download this release
Release Info
Developer | averta |
Plugin | ![]() |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.3.0
- README.txt +17 -3
- auxin-elements.php +17 -2
- includes/define.php +1 -1
- includes/elements/accordion.php +40 -21
- includes/elements/gallery.php +3 -3
- includes/elements/recent-posts-grid-carousel.php +198 -103
- includes/elements/recent-posts-land-style.php +70 -77
- includes/elements/recent-posts-masonry.php +671 -0
- includes/elements/recent-posts-tiles.php +5 -4
- includes/elements/recent-posts-timeline.php +51 -11
- includes/elements/tabs.php +63 -26
- includes/elements/text.php +14 -5
- includes/general-hooks.php +29 -1
- includes/index.php +3 -6
- languages/fa_IR.mo +0 -0
- languages/fa_IR.po +4977 -0
README.txt
CHANGED
@@ -6,7 +6,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
|
|
6 |
Tags: banner SEO, shortcode, page-builder, siteorigin, auxin, framework, widget, element, phlox, averta, fullwidth, masonry, timeline
|
7 |
Requires at least: 4.3
|
8 |
Tested up to: 4.6.1
|
9 |
-
Stable tag: 1.
|
10 |
License: GPLv3
|
11 |
License URI: http://www.gnu.org/licenses/gpl.html
|
12 |
|
@@ -140,6 +140,18 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
|
|
140 |
|
141 |
== Changelog ==
|
142 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
= Version 1.1.0 / (22.10.2016) =
|
144 |
- [New]: Introducing blog timeline view
|
145 |
|
@@ -159,5 +171,7 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/auxin-ele
|
|
159 |
|
160 |
== Upgrade Notice ==
|
161 |
|
162 |
-
= 1.
|
163 |
-
- [New]:
|
|
|
|
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.3.0
|
10 |
License: GPLv3
|
11 |
License URI: http://www.gnu.org/licenses/gpl.html
|
12 |
|
140 |
|
141 |
== Changelog ==
|
142 |
|
143 |
+
= Version 1.3.0 / (1.12.2016) =
|
144 |
+
- [Improvement]: Improved image sizes in recent posts elements
|
145 |
+
- [Improvement]: For responsiveness of grid table element
|
146 |
+
- [New]: adding hover effect option for grid table layout
|
147 |
+
- [New]: New options and styles for Text element added
|
148 |
+
- [New]: New options and layout for recent grid post element added
|
149 |
+
- [Improvement]: Improvement in title bar
|
150 |
+
- [New]: Persian translation added
|
151 |
+
|
152 |
+
= Version 1.2.0 / (9.11.2016) =
|
153 |
+
- [New]: Introducing masonry layout for blog
|
154 |
+
|
155 |
= Version 1.1.0 / (22.10.2016) =
|
156 |
- [New]: Introducing blog timeline view
|
157 |
|
171 |
|
172 |
== Upgrade Notice ==
|
173 |
|
174 |
+
= 1.3.0 =
|
175 |
+
- [New]: adding hover effect option for grid table layout
|
176 |
+
- [New]: New options and styles for Text element added
|
177 |
+
- [New]: New options and layout for recent grid post element added
|
auxin-elements.php
CHANGED
@@ -9,10 +9,10 @@
|
|
9 |
* @link https://bitbucket.org/averta/
|
10 |
* @copyright (c) 2010-2016
|
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.
|
16 |
* Author: averta
|
17 |
* Author URI: http://averta.net
|
18 |
* Text Domain: auxin-elements
|
@@ -40,6 +40,21 @@ if ( version_compare( PHP_VERSION, '5.3.0', '<' ) ) {
|
|
40 |
return;
|
41 |
}
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
/*----------------------------------------------------------------------------*/
|
44 |
|
45 |
require_once( plugin_dir_path( __FILE__ ) . 'includes/define.php' );
|
9 |
* @link https://bitbucket.org/averta/
|
10 |
* @copyright (c) 2010-2016
|
11 |
*
|
12 |
+
* Plugin Name: Auxin Essential Elements
|
13 |
* Plugin URI: https://wordpress.org/plugins/auxin-elements/
|
14 |
* Description: Powerful and comprehensive plugin that extends the functionality of Phlox theme by adding new shortcodes, widgets and options
|
15 |
+
* Version: 1.3.0
|
16 |
* Author: averta
|
17 |
* Author URI: http://averta.net
|
18 |
* Text Domain: auxin-elements
|
40 |
return;
|
41 |
}
|
42 |
|
43 |
+
// Check if the theme meets the plugin requirements
|
44 |
+
function auel_auxin_theme_requirement_notice() {
|
45 |
+
if ( defined('THEME_VERSION') && version_compare( THEME_VERSION, '1.5.8', '<' ) ) {
|
46 |
+
echo '<div class="error"><p>'.
|
47 |
+
sprintf(
|
48 |
+
__( 'You are using %1$s theme version %2$s. You need to update the %1$s theme to latest version in order to use %3$s plugin', 'auxin-elements' ),
|
49 |
+
'<em>'. THEME_NAME_I18N .'</em>',
|
50 |
+
'<em>'. THEME_VERSION . '</em>',
|
51 |
+
'<em>'. __('Auxin Elements', 'auxin-elements') . '</em>'
|
52 |
+
).
|
53 |
+
'</p></div>';
|
54 |
+
}
|
55 |
+
}
|
56 |
+
add_action( 'admin_notices', 'auel_auxin_theme_requirement_notice' );
|
57 |
+
|
58 |
/*----------------------------------------------------------------------------*/
|
59 |
|
60 |
require_once( plugin_dir_path( __FILE__ ) . 'includes/define.php' );
|
includes/define.php
CHANGED
@@ -12,7 +12,7 @@ if( ! defined( 'THEME_NAME' ) ){
|
|
12 |
}
|
13 |
|
14 |
|
15 |
-
define( 'AUXELS_VERSION' , '1.
|
16 |
|
17 |
define( 'AUXELS_SLUG' , 'auxin-elements' );
|
18 |
define( 'AUXELS_TEXT_DOMAIN' , 'auxin-elements' );
|
12 |
}
|
13 |
|
14 |
|
15 |
+
define( 'AUXELS_VERSION' , '1.3.0' );
|
16 |
|
17 |
define( 'AUXELS_SLUG' , 'auxin-elements' );
|
18 |
define( 'AUXELS_TEXT_DOMAIN' , 'auxin-elements' );
|
includes/elements/accordion.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Accordion element
|
4 |
*
|
5 |
*
|
6 |
* @package auxin-elements
|
@@ -22,6 +22,7 @@ function auxin_get_new_accordion_master_array( $master_array ) {
|
|
22 |
'weight' => 1,
|
23 |
'category' => THEME_NAME,
|
24 |
'group' => '',
|
|
|
25 |
'admin_enqueue_js' => '',
|
26 |
'admin_enqueue_css' => '',
|
27 |
'front_enqueue_js' => '',
|
@@ -68,8 +69,28 @@ function auxin_get_new_accordion_master_array( $master_array ) {
|
|
68 |
'edit_field_class' => ''
|
69 |
),
|
70 |
array(
|
71 |
-
'heading' => __('
|
72 |
-
'description' =>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
'param_name' => 'content',
|
74 |
'type' => 'textarea_html',
|
75 |
'value' => '',
|
@@ -118,35 +139,33 @@ function auxin_widget_accordion_callback( $atts, $shortcode_content = null ){
|
|
118 |
|
119 |
// Defining default attributes
|
120 |
$default_atts = array(
|
121 |
-
'title'
|
122 |
-
'
|
123 |
-
'
|
124 |
-
|
125 |
-
'
|
126 |
-
'
|
127 |
-
'base_class' => 'aux-widget-accordion widget-toggle' // base class name for container
|
128 |
);
|
129 |
|
130 |
$result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
|
131 |
extract( $result['parsed_atts'] );
|
132 |
|
133 |
-
|
134 |
// widget header ------------------------------
|
135 |
$output = $result['widget_header'];
|
136 |
$output .= $result['widget_title'];
|
137 |
$output .= '<div class="widget-inner ' .$extra_classes . '" data-toggle="' . $type . '">';
|
138 |
|
139 |
// widget custom output -----------------------
|
140 |
-
$
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
}
|
151 |
}
|
152 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Accordion element if site origin bundle plugin is activaited
|
4 |
*
|
5 |
*
|
6 |
* @package auxin-elements
|
22 |
'weight' => 1,
|
23 |
'category' => THEME_NAME,
|
24 |
'group' => '',
|
25 |
+
'so_api' => true,
|
26 |
'admin_enqueue_js' => '',
|
27 |
'admin_enqueue_css' => '',
|
28 |
'front_enqueue_js' => '',
|
69 |
'edit_field_class' => ''
|
70 |
),
|
71 |
array(
|
72 |
+
'heading' => __('Accordion label','auxin-elements'),
|
73 |
+
'description' => __('Enter your accordion item label.', 'auxin-elements'),
|
74 |
+
'repeater' => 'accordion',
|
75 |
+
'repeater-label' => __('Accordion', 'auxin-elements'),
|
76 |
+
'section-name' => __('Accordion Section', 'auxin-elements'),
|
77 |
+
'param_name' => 'accordion_label',
|
78 |
+
'type' => 'textfield',
|
79 |
+
'value' => '',
|
80 |
+
'holder' => 'textfield',
|
81 |
+
'class' => 'accordion_label',
|
82 |
+
'admin_label' => true,
|
83 |
+
'dependency' => '',
|
84 |
+
'weight' => '',
|
85 |
+
'group' => '' ,
|
86 |
+
'edit_field_class' => ''
|
87 |
+
),
|
88 |
+
array(
|
89 |
+
'heading' => __('Content', 'auxin-elements'),
|
90 |
+
'description' => __('Enter your accordion item content.', 'auxin-elements'),
|
91 |
+
'repeater' => 'accordion',
|
92 |
+
'repeater-label' => __('Accordion', 'auxin-elements'),
|
93 |
+
'section-name' => __('Accordion Section', 'auxin-elements'),
|
94 |
'param_name' => 'content',
|
95 |
'type' => 'textarea_html',
|
96 |
'value' => '',
|
139 |
|
140 |
// Defining default attributes
|
141 |
$default_atts = array(
|
142 |
+
'title' => '', // header title
|
143 |
+
'type' => 'true', // accordion/toggle
|
144 |
+
'accordion' => '', // accordion/toggle
|
145 |
+
'extra_classes' => '', // custom css class names for this element
|
146 |
+
'custom_el_id' => '', // custom id attribute for this element
|
147 |
+
'base_class' => 'aux-widget-accordion widget-toggle' // base class name for container
|
|
|
148 |
);
|
149 |
|
150 |
$result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
|
151 |
extract( $result['parsed_atts'] );
|
152 |
|
|
|
153 |
// widget header ------------------------------
|
154 |
$output = $result['widget_header'];
|
155 |
$output .= $result['widget_title'];
|
156 |
$output .= '<div class="widget-inner ' .$extra_classes . '" data-toggle="' . $type . '">';
|
157 |
|
158 |
// widget custom output -----------------------
|
159 |
+
if (is_array($accordion) || is_object($accordion)) {
|
160 |
+
foreach ( $accordion as $key => $value ) {
|
161 |
+
|
162 |
+
|
163 |
+
$output .= '<section>';
|
164 |
+
$section_title = $value['accordion_label'];
|
165 |
+
$section_content = $value['content'];
|
166 |
+
$output .= '<h6 class="toggle-header">' . $section_title . '</h6>';
|
167 |
+
$output .= '<div class="toggle-content"><p>' . $section_content . '</p></div>';
|
168 |
+
$output .= '</section>';
|
169 |
}
|
170 |
}
|
171 |
|
includes/elements/gallery.php
CHANGED
@@ -492,7 +492,7 @@ function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
|
|
492 |
$size_class = sanitize_html_class( $atts['size'] );
|
493 |
$gallery_div = "<div id='$selector' class='gallery aux-gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class} aux-lightbox-frame'>";
|
494 |
|
495 |
-
$gallery_div .= "<div class='aux-gallery-container $grid_wrapper_class aux-layout-{$atts['layout']}' data-pagination='{$atts['pagination']}' data-lazyload='{$atts['lazyload']}' data-perpage='{$atts['perpage']}' data-layout='$layoutAttr' $space_attr >";
|
496 |
|
497 |
/**
|
498 |
* Filter the default gallery shortcode CSS styles.
|
@@ -571,9 +571,9 @@ function auxin_widget_gallery_callback( $attr, $shortcode_content = null ){
|
|
571 |
}
|
572 |
|
573 |
if ( $atts['pagination'] && ++$index > $atts['perpage'] ) {
|
574 |
-
$item .= "<{$itemtag} class='gallery-item aux-iso-hidden $loading_class {$grid_col_class}' data-width='{$image_width}' data-height='{$image_height}'>$item_inner</{$itemtag}>";
|
575 |
} else {
|
576 |
-
$item .= "<{$itemtag} class='gallery-item {$grid_col_class} $loading_class' data-width='{$image_width}' data-height='{$image_height}'>$item_inner</{$itemtag}>";
|
577 |
}
|
578 |
|
579 |
|
492 |
$size_class = sanitize_html_class( $atts['size'] );
|
493 |
$gallery_div = "<div id='$selector' class='gallery aux-gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class} aux-lightbox-frame'>";
|
494 |
|
495 |
+
$gallery_div .= "<div class='aux-gallery-container aux-isotope-animated $grid_wrapper_class aux-layout-{$atts['layout']}' data-pagination='{$atts['pagination']}' data-lazyload='{$atts['lazyload']}' data-perpage='{$atts['perpage']}' data-layout='$layoutAttr' $space_attr >";
|
496 |
|
497 |
/**
|
498 |
* Filter the default gallery shortcode CSS styles.
|
571 |
}
|
572 |
|
573 |
if ( $atts['pagination'] && ++$index > $atts['perpage'] ) {
|
574 |
+
$item .= "<{$itemtag} class='gallery-item aux-iso-item aux-iso-hidden $loading_class {$grid_col_class}' data-width='{$image_width}' data-height='{$image_height}'>$item_inner</{$itemtag}>";
|
575 |
} else {
|
576 |
+
$item .= "<{$itemtag} class='gallery-item aux-iso-item {$grid_col_class} $loading_class' data-width='{$image_width}' data-height='{$image_height}'>$item_inner</{$itemtag}>";
|
577 |
}
|
578 |
|
579 |
|
includes/elements/recent-posts-grid-carousel.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
function auxin_get_recent_posts_master_array( $master_array ) {
|
14 |
|
15 |
$categories = get_terms( 'category', 'orderby=count&hide_empty=0' );
|
16 |
-
$categories_list = array( '' => __('All Categories', 'auxin-elements' ) ) ;
|
17 |
foreach ( $categories as $key => $value ) {
|
18 |
$categories_list[$value->term_id] = $value->name;
|
19 |
}
|
@@ -85,13 +85,12 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
85 |
// 'group' => '' ,
|
86 |
// 'edit_field_class' => ''
|
87 |
// ),
|
88 |
-
|
89 |
array(
|
90 |
'heading' => __('Categories', 'auxin-elements'),
|
91 |
'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
|
92 |
'param_name' => 'cat',
|
93 |
'type' => 'dropdown',
|
94 |
-
'def_value' => '',
|
95 |
'holder' => 'dropdown',
|
96 |
'class' => 'cat',
|
97 |
'value' => $categories_list,
|
@@ -101,7 +100,6 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
101 |
'group' => '' ,
|
102 |
'edit_field_class' => ''
|
103 |
),
|
104 |
-
|
105 |
array(
|
106 |
'heading' => __('Number of posts to show', 'auxin-elements'),
|
107 |
'description' => '',
|
@@ -116,7 +114,6 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
116 |
'group' => '' ,
|
117 |
'edit_field_class' => ''
|
118 |
),
|
119 |
-
|
120 |
array(
|
121 |
'heading' => __('Exclude posts without media','auxin-elements' ),
|
122 |
'description' => '',
|
@@ -130,7 +127,6 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
130 |
'group' => '' ,
|
131 |
'edit_field_class' => ''
|
132 |
),
|
133 |
-
|
134 |
array(
|
135 |
'heading' => __('Exclude custom post formats','auxin-elements' ),
|
136 |
'description' => '',
|
@@ -144,7 +140,6 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
144 |
'group' => '' ,
|
145 |
'edit_field_class' => ''
|
146 |
),
|
147 |
-
|
148 |
array(
|
149 |
'heading' => __('Exclude qoute and link post formats','auxin-elements' ),
|
150 |
'description' => '',
|
@@ -155,13 +150,12 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
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' ),
|
@@ -232,7 +226,6 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
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' ),
|
@@ -247,23 +240,7 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
247 |
'group' => '' ,
|
248 |
'edit_field_class' => ''
|
249 |
),
|
250 |
-
|
251 |
array(
|
252 |
-
'heading' => __('Display post media (image, video, etc)', 'auxin-elements' ),
|
253 |
-
'param_name' => 'show_media',
|
254 |
-
'type' => 'aux_switch',
|
255 |
-
'def_value' => '',
|
256 |
-
'value' => '1',
|
257 |
-
'holder' => 'dropdown',
|
258 |
-
'class' => 'show_media',
|
259 |
-
'admin_label' => true,
|
260 |
-
'dependency' => '',
|
261 |
-
'weight' => '',
|
262 |
-
'group' => '' ,
|
263 |
-
'edit_field_class' => ''
|
264 |
-
),
|
265 |
-
|
266 |
-
array(
|
267 |
'heading' => __('Image aspect ratio', 'auxin-elements'),
|
268 |
'description' => '',
|
269 |
'param_name' => 'image_aspect_ratio',
|
@@ -283,23 +260,35 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
283 |
'group' => '' ,
|
284 |
'edit_field_class' => ''
|
285 |
),
|
286 |
-
|
287 |
array(
|
288 |
-
'heading' => __('
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
'description' => '',
|
290 |
-
'param_name' => '
|
291 |
'type' => 'aux_switch',
|
292 |
'value' => '1',
|
293 |
-
'class' => '',
|
294 |
'admin_label' => true,
|
295 |
'dependency' => '',
|
296 |
'weight' => '',
|
297 |
'group' => '' ,
|
298 |
'edit_field_class' => ''
|
299 |
),
|
300 |
-
|
301 |
array(
|
302 |
-
'heading' => __('
|
303 |
'description' => '',
|
304 |
'param_name' => 'show_info',
|
305 |
'type' => 'aux_switch',
|
@@ -310,7 +299,44 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
310 |
'group' => '' ,
|
311 |
'edit_field_class' => ''
|
312 |
),
|
313 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
314 |
array(
|
315 |
'heading' => __('Display like button','auxin-elements' ),
|
316 |
'description' => sprintf(__('Enable it to display %s like button%s on gride template blog. Please note WP Ulike plugin needs to be activaited to use this option.', 'auxin-elements'), '<strong>', '</strong>'),
|
@@ -325,7 +351,6 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
325 |
'group' => '' ,
|
326 |
'edit_field_class' => ''
|
327 |
),
|
328 |
-
|
329 |
array(
|
330 |
'heading' => __('Content layout', 'auxin-elements'),
|
331 |
'description' => __('Specifies the style of content for each post column.', 'auxin-elements' ),
|
@@ -344,7 +369,6 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
344 |
'group' => '' ,
|
345 |
'edit_field_class' => ''
|
346 |
),
|
347 |
-
|
348 |
array(
|
349 |
'heading' => __('Excerpt length','auxin-elements' ),
|
350 |
'description' => __('Specify summary content in character.','auxin-elements' ),
|
@@ -359,37 +383,25 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
359 |
'group' => '' ,
|
360 |
'edit_field_class' => ''
|
361 |
),
|
362 |
-
|
363 |
-
array(
|
364 |
-
'heading' => __('Insert read more button','auxin-elements' ),
|
365 |
-
'description' => '',
|
366 |
-
'param_name' => 'show_readmore',
|
367 |
-
'type' => 'aux_switch',
|
368 |
-
'value' => '1',
|
369 |
-
'class' => '',
|
370 |
-
'admin_label' => true,
|
371 |
-
'weight' => '',
|
372 |
-
'group' => '' ,
|
373 |
-
'edit_field_class' => ''
|
374 |
-
),
|
375 |
-
|
376 |
array(
|
377 |
-
'heading' => __('
|
378 |
-
'description' => '',
|
379 |
-
'param_name' => '
|
380 |
-
'type' => '
|
381 |
-
'
|
382 |
-
'
|
383 |
-
'
|
384 |
-
|
385 |
-
'
|
|
|
|
|
386 |
),
|
387 |
-
'admin_label' =>
|
|
|
388 |
'weight' => '',
|
389 |
'group' => '' ,
|
390 |
'edit_field_class' => ''
|
391 |
),
|
392 |
-
|
393 |
array(
|
394 |
'heading' => __('Number of columns', 'auxin-elements'),
|
395 |
'description' => '',
|
@@ -408,7 +420,6 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
408 |
'group' => 'Layout' ,
|
409 |
'edit_field_class' => ''
|
410 |
),
|
411 |
-
|
412 |
array(
|
413 |
'heading' => __('Number of columns in tablet size', 'auxin-elements'),
|
414 |
'description' => '',
|
@@ -428,7 +439,6 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
428 |
'group' => 'Layout' ,
|
429 |
'edit_field_class' => ''
|
430 |
),
|
431 |
-
|
432 |
array(
|
433 |
'heading' => __('Number of columns in phone size', 'auxin-elements'),
|
434 |
'description' => '',
|
@@ -447,9 +457,8 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
447 |
'group' => 'Layout' ,
|
448 |
'edit_field_class' => ''
|
449 |
),
|
450 |
-
|
451 |
array(
|
452 |
-
'heading' => __('Display items
|
453 |
'description' => '',
|
454 |
'param_name' => 'preview_mode',
|
455 |
'type' => 'dropdown',
|
@@ -457,8 +466,9 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
457 |
'holder' => 'dropdown',
|
458 |
'class' => 'num',
|
459 |
'value' => array(
|
460 |
-
'grid'
|
461 |
-
'
|
|
|
462 |
),
|
463 |
'admin_label' => true,
|
464 |
'dependency' => '',
|
@@ -466,11 +476,33 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
466 |
'group' => '' ,
|
467 |
'edit_field_class' => ''
|
468 |
),
|
469 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
470 |
// Carousel Options
|
471 |
array(
|
472 |
-
'heading' => __('Column space','auxin-elements' ),
|
473 |
-
'description' => __('Specifies space between carousel columns in pixels.', 'auxin-elements' ),
|
474 |
'param_name' => 'carousel_space',
|
475 |
'type' => 'textfield',
|
476 |
'value' => '30',
|
@@ -479,13 +511,12 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
479 |
'admin_label' => 1,
|
480 |
'dependency' => array(
|
481 |
'element' => 'preview_mode',
|
482 |
-
'value' => '
|
483 |
),
|
484 |
'weight' => '',
|
485 |
'group' => '' ,
|
486 |
'edit_field_class' => ''
|
487 |
),
|
488 |
-
|
489 |
array(
|
490 |
'heading' => __('Navigation type', 'auxin-elements'),
|
491 |
'description' => '',
|
@@ -508,7 +539,6 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
508 |
'group' => '' ,
|
509 |
'edit_field_class' => ''
|
510 |
),
|
511 |
-
|
512 |
array(
|
513 |
'heading' => __('Navigation control', 'auxin-elements'),
|
514 |
'description' => '',
|
@@ -530,7 +560,6 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
530 |
'group' => '' ,
|
531 |
'edit_field_class' => ''
|
532 |
),
|
533 |
-
|
534 |
array(
|
535 |
'heading' => __('Loop navigation','auxin-elements' ),
|
536 |
'description' => '',
|
@@ -546,7 +575,6 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
546 |
'group' => '' ,
|
547 |
'edit_field_class' => ''
|
548 |
),
|
549 |
-
|
550 |
array(
|
551 |
'heading' => __('Autoplay carousel','auxin-elements' ),
|
552 |
'description' => '',
|
@@ -563,7 +591,6 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
563 |
'group' => '' ,
|
564 |
'edit_field_class' => ''
|
565 |
),
|
566 |
-
|
567 |
array(
|
568 |
'heading' => __('Autoplay delay','auxin-elements' ),
|
569 |
'description' => __('Specifies the delay between auto-forwarding in seconds.', 'auxin-elements' ),
|
@@ -577,18 +604,17 @@ function auxin_get_recent_posts_master_array( $master_array ) {
|
|
577 |
array(
|
578 |
'element' => 'preview_mode',
|
579 |
'value' => 'carousel'
|
580 |
-
)
|
|
|
581 |
array(
|
582 |
'element' => 'carousel_autoplay',
|
583 |
-
'value' => 1
|
584 |
-
)
|
585 |
),
|
586 |
'weight' => '',
|
587 |
'group' => '' ,
|
588 |
'edit_field_class' => ''
|
589 |
),
|
590 |
-
|
591 |
-
|
592 |
array(
|
593 |
'heading' => __('Extra class name','auxin-elements' ),
|
594 |
'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'auxin-elements' ),
|
@@ -629,9 +655,10 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
|
|
629 |
|
630 |
// Defining default attributes
|
631 |
$default_atts = array(
|
632 |
-
'title' => '',
|
633 |
-
'cat' => '',
|
634 |
-
'num' => '8',
|
|
|
635 |
'exclude' => '',
|
636 |
'include' => '',
|
637 |
'posts_per_page' => -1,
|
@@ -644,18 +671,20 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
|
|
644 |
'exclude_qoute_link' => 0,
|
645 |
'show_media' => true,
|
646 |
'display_like' => true,
|
|
|
647 |
'content_layout' => '', // entry-boxed
|
648 |
'excerpt_len' => '160',
|
649 |
-
'
|
650 |
'show_excerpt' => true,
|
651 |
'show_info' => true,
|
652 |
-
'
|
653 |
-
'
|
654 |
'image_aspect_ratio' => 0.75,
|
655 |
'desktop_cnum' => 4,
|
656 |
'tablet_cnum' => 'inherit',
|
657 |
'phone_cnum' => 'inherit',
|
658 |
'preview_mode' => 'grid',
|
|
|
659 |
'tag' => '',
|
660 |
'extra_classes' => '',
|
661 |
'custom_el_id' => '',
|
@@ -673,6 +702,18 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
|
|
673 |
$result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
|
674 |
extract( $result['parsed_atts'] );
|
675 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
676 |
ob_start();
|
677 |
|
678 |
global $wp_query;
|
@@ -702,20 +743,24 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
|
|
702 |
echo $result['widget_title'];
|
703 |
|
704 |
|
705 |
-
$phone_break_point
|
706 |
-
$tablet_break_point
|
|
|
|
|
|
|
|
|
|
|
|
|
707 |
|
708 |
-
$
|
709 |
-
$post_counter = 0;
|
710 |
-
$column_class = '';
|
711 |
-
$item_class = 'aux-col';
|
712 |
-
$carousel_attrs = '';
|
713 |
|
714 |
-
if ( 'grid'
|
715 |
// generate columns class
|
716 |
$column_class = 'aux-match-height aux-row aux-de-col' . $desktop_cnum;
|
717 |
-
|
718 |
-
$column_class .= 'inherit' != $
|
|
|
|
|
719 |
$column_class .= 'entry-boxed' == $content_layout ? ' aux-entry-boxed' : '';
|
720 |
|
721 |
} elseif ( 'carousel' == $preview_mode ) {
|
@@ -733,7 +778,7 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
|
|
733 |
$carousel_attrs .= ' data-bullets="' . ('bullets' == $carousel_navigation_control ? 'true' : 'false') . '"';
|
734 |
$carousel_attrs .= ' data-bullet-class="aux-bullets aux-small aux-mask"';
|
735 |
$carousel_attrs .= ' data-arrows="' . ('arrows' == $carousel_navigation_control ? 'true' : 'false') . '"';
|
736 |
-
$carousel_attrs .= ' data-
|
737 |
|
738 |
if ( 'inherit' != $tablet_cnum || 'inherit' != $phone_cnum ) {
|
739 |
$carousel_attrs .= ' data-responsive="'. ( 'inherit' != $tablet_cnum ? $tablet_break_point . ':' . $tablet_cnum . ',' : '' ).
|
@@ -742,6 +787,16 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
|
|
742 |
|
743 |
}
|
744 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
745 |
$column_media_width = auxin_get_content_column_width( $desktop_cnum, 15 );
|
746 |
|
747 |
$have_posts = $wp_query->have_posts();
|
@@ -763,12 +818,14 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
|
|
763 |
$post_vars = auxin_get_post_format_media(
|
764 |
$post,
|
765 |
array(
|
|
|
766 |
'request_from' => 'archive',
|
767 |
'media_width' => $phone_break_point,
|
768 |
'media_size' => 'large',//array( 'width' => $column_media_width, 'height' => $column_media_width * $image_aspect_ratio ),
|
769 |
'upscale_image' => true,
|
770 |
'image_from_content' => ! $exclude_without_media, // whether to try to get image from content or not
|
771 |
-
'no_gallery' => 'carousel'
|
|
|
772 |
'add_image_hw' => false, // whether add width and height attr or not
|
773 |
'image_sizes' => array(
|
774 |
array( 'min' => '', 'max' => '767px', 'width' => '80vw' ),
|
@@ -784,11 +841,10 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
|
|
784 |
);
|
785 |
|
786 |
extract( $post_vars );
|
787 |
-
|
788 |
$the_format = get_post_format( $post );
|
789 |
|
790 |
if(
|
791 |
-
( $exclude_custom_post_formats && !empty( $the_format ) ) ||
|
792 |
( $exclude_qoute_link && ( 'link' == $the_format || 'quote' == $the_format ) ) ||
|
793 |
( $exclude_without_media && ! $has_attach )
|
794 |
){
|
@@ -796,9 +852,47 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
|
|
796 |
continue;
|
797 |
}
|
798 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
799 |
?>
|
800 |
-
<div class="<?php echo $item_class ?>">
|
801 |
-
|
802 |
</div>
|
803 |
<?php
|
804 |
}
|
@@ -820,7 +914,8 @@ function auxin_widget_recent_posts_callback( $atts, $shortcode_content = null ){
|
|
820 |
|
821 |
// use it as data attribute on load more button
|
822 |
$ajax_nonce = wp_create_nonce( 'post-recent-grid-nonce' );
|
823 |
-
|
|
|
824 |
?>
|
825 |
</div>
|
826 |
<?php
|
13 |
function auxin_get_recent_posts_master_array( $master_array ) {
|
14 |
|
15 |
$categories = get_terms( 'category', 'orderby=count&hide_empty=0' );
|
16 |
+
$categories_list = array( ' ' => __('All Categories', 'auxin-elements' ) ) ;
|
17 |
foreach ( $categories as $key => $value ) {
|
18 |
$categories_list[$value->term_id] = $value->name;
|
19 |
}
|
85 |
// 'group' => '' ,
|
86 |
// 'edit_field_class' => ''
|
87 |
// ),
|
|
|
88 |
array(
|
89 |
'heading' => __('Categories', 'auxin-elements'),
|
90 |
'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
|
91 |
'param_name' => 'cat',
|
92 |
'type' => 'dropdown',
|
93 |
+
'def_value' => ' ',
|
94 |
'holder' => 'dropdown',
|
95 |
'class' => 'cat',
|
96 |
'value' => $categories_list,
|
100 |
'group' => '' ,
|
101 |
'edit_field_class' => ''
|
102 |
),
|
|
|
103 |
array(
|
104 |
'heading' => __('Number of posts to show', 'auxin-elements'),
|
105 |
'description' => '',
|
114 |
'group' => '' ,
|
115 |
'edit_field_class' => ''
|
116 |
),
|
|
|
117 |
array(
|
118 |
'heading' => __('Exclude posts without media','auxin-elements' ),
|
119 |
'description' => '',
|
127 |
'group' => '' ,
|
128 |
'edit_field_class' => ''
|
129 |
),
|
|
|
130 |
array(
|
131 |
'heading' => __('Exclude custom post formats','auxin-elements' ),
|
132 |
'description' => '',
|
140 |
'group' => '' ,
|
141 |
'edit_field_class' => ''
|
142 |
),
|
|
|
143 |
array(
|
144 |
'heading' => __('Exclude qoute and link post formats','auxin-elements' ),
|
145 |
'description' => '',
|
150 |
'admin_label' => true,
|
151 |
'dependency' => array(
|
152 |
'element' => 'exclude_custom_post_formats',
|
153 |
+
'value' => array('0', 'false')
|
154 |
),
|
155 |
'weight' => '',
|
156 |
'group' => '' ,
|
157 |
'edit_field_class' => ''
|
158 |
),
|
|
|
159 |
array(
|
160 |
'heading' => __('Exclude posts','auxin-elements' ),
|
161 |
'description' => __('Post IDs separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
|
226 |
'group' => '' ,
|
227 |
'edit_field_class' => ''
|
228 |
),
|
|
|
229 |
array(
|
230 |
'heading' => __('Start offset','auxin-elements' ),
|
231 |
'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
|
240 |
'group' => '' ,
|
241 |
'edit_field_class' => ''
|
242 |
),
|
|
|
243 |
array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
'heading' => __('Image aspect ratio', 'auxin-elements'),
|
245 |
'description' => '',
|
246 |
'param_name' => 'image_aspect_ratio',
|
260 |
'group' => '' ,
|
261 |
'edit_field_class' => ''
|
262 |
),
|
|
|
263 |
array(
|
264 |
+
'heading' => __('Display post media (image, video, etc)', 'auxin-elements' ),
|
265 |
+
'param_name' => 'show_media',
|
266 |
+
'type' => 'aux_switch',
|
267 |
+
'def_value' => '',
|
268 |
+
'value' => '1',
|
269 |
+
'holder' => 'dropdown',
|
270 |
+
'class' => 'show_media',
|
271 |
+
'admin_label' => true,
|
272 |
+
'dependency' => '',
|
273 |
+
'weight' => '',
|
274 |
+
'group' => '' ,
|
275 |
+
'edit_field_class' => ''
|
276 |
+
),
|
277 |
+
array(
|
278 |
+
'heading' => __('Display post title','auxin-elements' ),
|
279 |
'description' => '',
|
280 |
+
'param_name' => 'display_title',
|
281 |
'type' => 'aux_switch',
|
282 |
'value' => '1',
|
283 |
+
'class' => 'display_title',
|
284 |
'admin_label' => true,
|
285 |
'dependency' => '',
|
286 |
'weight' => '',
|
287 |
'group' => '' ,
|
288 |
'edit_field_class' => ''
|
289 |
),
|
|
|
290 |
array(
|
291 |
+
'heading' => __('Display post info','auxin-elements' ),
|
292 |
'description' => '',
|
293 |
'param_name' => 'show_info',
|
294 |
'type' => 'aux_switch',
|
299 |
'group' => '' ,
|
300 |
'edit_field_class' => ''
|
301 |
),
|
302 |
+
array(
|
303 |
+
'heading' => __('Post info position', 'auxin-elements' ),
|
304 |
+
'description' => '',
|
305 |
+
'param_name' => 'post_info_position',
|
306 |
+
'type' => 'dropdown',
|
307 |
+
'def_value' => 'after-title',
|
308 |
+
'holder' => 'dropdown',
|
309 |
+
'class' => 'post_info_position',
|
310 |
+
'value' => array (
|
311 |
+
'after-title' => __('After Title' , 'auxin-elements' ),
|
312 |
+
'before-title' => __('Before Title', 'auxin-elements' )
|
313 |
+
),
|
314 |
+
'admin_label' => true,
|
315 |
+
'dependency' => array(
|
316 |
+
'element' => 'show_info',
|
317 |
+
'value' => '1'
|
318 |
+
),
|
319 |
+
'weight' => '',
|
320 |
+
'group' => '' ,
|
321 |
+
'edit_field_class' => ''
|
322 |
+
),
|
323 |
+
array(
|
324 |
+
'heading' => __('Display Categories','auxin-elements' ),
|
325 |
+
'description' => '',
|
326 |
+
'param_name' => 'display_categories',
|
327 |
+
'type' => 'aux_switch',
|
328 |
+
'value' => '1',
|
329 |
+
'holder' => 'dropdown',
|
330 |
+
'class' => 'display_categories',
|
331 |
+
'admin_label' => 1,
|
332 |
+
'dependency' => array(
|
333 |
+
'element' => 'show_info',
|
334 |
+
'value' => '1'
|
335 |
+
),
|
336 |
+
'weight' => '',
|
337 |
+
'group' => '' ,
|
338 |
+
'edit_field_class' => ''
|
339 |
+
),
|
340 |
array(
|
341 |
'heading' => __('Display like button','auxin-elements' ),
|
342 |
'description' => sprintf(__('Enable it to display %s like button%s on gride template blog. Please note WP Ulike plugin needs to be activaited to use this option.', 'auxin-elements'), '<strong>', '</strong>'),
|
351 |
'group' => '' ,
|
352 |
'edit_field_class' => ''
|
353 |
),
|
|
|
354 |
array(
|
355 |
'heading' => __('Content layout', 'auxin-elements'),
|
356 |
'description' => __('Specifies the style of content for each post column.', 'auxin-elements' ),
|
369 |
'group' => '' ,
|
370 |
'edit_field_class' => ''
|
371 |
),
|
|
|
372 |
array(
|
373 |
'heading' => __('Excerpt length','auxin-elements' ),
|
374 |
'description' => __('Specify summary content in character.','auxin-elements' ),
|
383 |
'group' => '' ,
|
384 |
'edit_field_class' => ''
|
385 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
386 |
array(
|
387 |
+
'heading' => __('Display author or read more', 'auxin-elements'),
|
388 |
+
'description' => __('Specifies whether to show author or read more on each post.', 'auxin-elements'),
|
389 |
+
'param_name' => 'author_or_readmore',
|
390 |
+
'type' => 'dropdown',
|
391 |
+
'def_value' => 'readmore',
|
392 |
+
'holder' => 'dropdown',
|
393 |
+
'class' => 'author_or_readmore',
|
394 |
+
'value' =>array (
|
395 |
+
'readmore' => __( 'Read More' , 'auxin-elements' ),
|
396 |
+
'author' => __( 'Author Name', 'auxin-elements' ),
|
397 |
+
'none' => __( 'None' , 'auxin-elements' )
|
398 |
),
|
399 |
+
'admin_label' => true,
|
400 |
+
'dependency' => '',
|
401 |
'weight' => '',
|
402 |
'group' => '' ,
|
403 |
'edit_field_class' => ''
|
404 |
),
|
|
|
405 |
array(
|
406 |
'heading' => __('Number of columns', 'auxin-elements'),
|
407 |
'description' => '',
|
420 |
'group' => 'Layout' ,
|
421 |
'edit_field_class' => ''
|
422 |
),
|
|
|
423 |
array(
|
424 |
'heading' => __('Number of columns in tablet size', 'auxin-elements'),
|
425 |
'description' => '',
|
439 |
'group' => 'Layout' ,
|
440 |
'edit_field_class' => ''
|
441 |
),
|
|
|
442 |
array(
|
443 |
'heading' => __('Number of columns in phone size', 'auxin-elements'),
|
444 |
'description' => '',
|
457 |
'group' => 'Layout' ,
|
458 |
'edit_field_class' => ''
|
459 |
),
|
|
|
460 |
array(
|
461 |
+
'heading' => __('Display items as', 'auxin-elements'),
|
462 |
'description' => '',
|
463 |
'param_name' => 'preview_mode',
|
464 |
'type' => 'dropdown',
|
466 |
'holder' => 'dropdown',
|
467 |
'class' => 'num',
|
468 |
'value' => array(
|
469 |
+
'grid' => __( 'Grid', 'auxin-elements' ),
|
470 |
+
'grid-table' => __( 'Grid - Table Style', 'auxin-elements' ),
|
471 |
+
'carousel' => __( 'Carousel', 'auxin-elements' )
|
472 |
),
|
473 |
'admin_label' => true,
|
474 |
'dependency' => '',
|
476 |
'group' => '' ,
|
477 |
'edit_field_class' => ''
|
478 |
),
|
479 |
+
array(
|
480 |
+
'heading' => __('Mouse Over Effect', 'auxin-elements'),
|
481 |
+
'description' => '',
|
482 |
+
'param_name' => 'grid_table_hover',
|
483 |
+
'type' => 'dropdown',
|
484 |
+
'def_value' => 'bgimage-bgcolor',
|
485 |
+
'holder' => 'dropdown',
|
486 |
+
'class' => 'num',
|
487 |
+
'value' => array(
|
488 |
+
'bgcolor' => __( 'Background color', 'auxin-elements' ),
|
489 |
+
'bgimage' => __( 'Cover image', 'auxin-elements' ),
|
490 |
+
'bgimage-bgcolor' => __( 'Cover image or background color', 'auxin-elements' ),
|
491 |
+
'none' => __( 'Nothing', 'auxin-elements' )
|
492 |
+
),
|
493 |
+
'admin_label' => true,
|
494 |
+
'dependency' => array(
|
495 |
+
'element' => 'preview_mode',
|
496 |
+
'value' => 'grid-table'
|
497 |
+
),
|
498 |
+
'weight' => '',
|
499 |
+
'group' => '' ,
|
500 |
+
'edit_field_class' => ''
|
501 |
+
),
|
502 |
// Carousel Options
|
503 |
array(
|
504 |
+
'heading' => __( 'Column space', 'auxin-elements' ),
|
505 |
+
'description' => __( 'Specifies space between carousel columns in pixels.', 'auxin-elements' ),
|
506 |
'param_name' => 'carousel_space',
|
507 |
'type' => 'textfield',
|
508 |
'value' => '30',
|
511 |
'admin_label' => 1,
|
512 |
'dependency' => array(
|
513 |
'element' => 'preview_mode',
|
514 |
+
'value' => 'grid'
|
515 |
),
|
516 |
'weight' => '',
|
517 |
'group' => '' ,
|
518 |
'edit_field_class' => ''
|
519 |
),
|
|
|
520 |
array(
|
521 |
'heading' => __('Navigation type', 'auxin-elements'),
|
522 |
'description' => '',
|
539 |
'group' => '' ,
|
540 |
'edit_field_class' => ''
|
541 |
),
|
|
|
542 |
array(
|
543 |
'heading' => __('Navigation control', 'auxin-elements'),
|
544 |
'description' => '',
|
560 |
'group' => '' ,
|
561 |
'edit_field_class' => ''
|
562 |
),
|
|
|
563 |
array(
|
564 |
'heading' => __('Loop navigation','auxin-elements' ),
|
565 |
'description' => '',
|
575 |
'group' => '' ,
|
576 |
'edit_field_class' => ''
|
577 |
),
|
|
|
578 |
array(
|
579 |
'heading' => __('Autoplay carousel','auxin-elements' ),
|
580 |
'description' => '',
|
591 |
'group' => '' ,
|
592 |
'edit_field_class' => ''
|
593 |
),
|
|
|
594 |
array(
|
595 |
'heading' => __('Autoplay delay','auxin-elements' ),
|
596 |
'description' => __('Specifies the delay between auto-forwarding in seconds.', 'auxin-elements' ),
|
604 |
array(
|
605 |
'element' => 'preview_mode',
|
606 |
'value' => 'carousel'
|
607 |
+
)
|
608 |
+
/*,
|
609 |
array(
|
610 |
'element' => 'carousel_autoplay',
|
611 |
+
'value' => '1'
|
612 |
+
)*/
|
613 |
),
|
614 |
'weight' => '',
|
615 |
'group' => '' ,
|
616 |
'edit_field_class' => ''
|
617 |
),
|
|
|
|
|
618 |
array(
|
619 |
'heading' => __('Extra class name','auxin-elements' ),
|
620 |
'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' ),
|
655 |
|
656 |
// Defining default attributes
|
657 |
$default_atts = array(
|
658 |
+
'title' => '', // header title
|
659 |
+
'cat' => ' ',
|
660 |
+
'num' => '8', // max generated entry
|
661 |
+
'ignore_media' => false, // whether to ignore media for this
|
662 |
'exclude' => '',
|
663 |
'include' => '',
|
664 |
'posts_per_page' => -1,
|
671 |
'exclude_qoute_link' => 0,
|
672 |
'show_media' => true,
|
673 |
'display_like' => true,
|
674 |
+
'display_categories' => true,
|
675 |
'content_layout' => '', // entry-boxed
|
676 |
'excerpt_len' => '160',
|
677 |
+
'display_title' => true,
|
678 |
'show_excerpt' => true,
|
679 |
'show_info' => true,
|
680 |
+
'post_info_position' => 'after-title',
|
681 |
+
'author_or_readmore' => 'readmore', // readmore, author, none
|
682 |
'image_aspect_ratio' => 0.75,
|
683 |
'desktop_cnum' => 4,
|
684 |
'tablet_cnum' => 'inherit',
|
685 |
'phone_cnum' => 'inherit',
|
686 |
'preview_mode' => 'grid',
|
687 |
+
'grid_table_hover' => 'bgimage-bgcolor',
|
688 |
'tag' => '',
|
689 |
'extra_classes' => '',
|
690 |
'custom_el_id' => '',
|
702 |
$result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
|
703 |
extract( $result['parsed_atts'] );
|
704 |
|
705 |
+
// post-olumn needs to have below variables
|
706 |
+
if( $author_or_readmore == 'readmore') {
|
707 |
+
$show_readmore = true;
|
708 |
+
$show_author_footer = false;
|
709 |
+
} else if( $author_or_readmore == 'author') {
|
710 |
+
$show_readmore = false;
|
711 |
+
$show_author_footer = true;
|
712 |
+
} else {
|
713 |
+
$show_readmore = false;
|
714 |
+
$show_author_footer = false;
|
715 |
+
}
|
716 |
+
|
717 |
ob_start();
|
718 |
|
719 |
global $wp_query;
|
743 |
echo $result['widget_title'];
|
744 |
|
745 |
|
746 |
+
$phone_break_point = 767;
|
747 |
+
$tablet_break_point = 992;
|
748 |
+
|
749 |
+
$show_comments = true; // shows comments icon
|
750 |
+
$post_counter = 0;
|
751 |
+
$column_class = '';
|
752 |
+
$item_class = 'aux-col';
|
753 |
+
$carousel_attrs = '';
|
754 |
|
755 |
+
$columns_custom_styles = '';
|
|
|
|
|
|
|
|
|
756 |
|
757 |
+
if ( in_array( $preview_mode, array( 'grid', 'grid-table' ) ) ) {
|
758 |
// generate columns class
|
759 |
$column_class = 'aux-match-height aux-row aux-de-col' . $desktop_cnum;
|
760 |
+
|
761 |
+
$column_class .= 'inherit' != $tablet_cnum ? ' aux-tb-col'. $tablet_cnum : ' aux-tb-col' . $desktop_cnum;
|
762 |
+
$column_class .= 'inherit' != $phone_cnum ? ' aux-mb-col'. $phone_cnum : ' aux-mb-col1';
|
763 |
+
|
764 |
$column_class .= 'entry-boxed' == $content_layout ? ' aux-entry-boxed' : '';
|
765 |
|
766 |
} elseif ( 'carousel' == $preview_mode ) {
|
778 |
$carousel_attrs .= ' data-bullets="' . ('bullets' == $carousel_navigation_control ? 'true' : 'false') . '"';
|
779 |
$carousel_attrs .= ' data-bullet-class="aux-bullets aux-small aux-mask"';
|
780 |
$carousel_attrs .= ' data-arrows="' . ('arrows' == $carousel_navigation_control ? 'true' : 'false') . '"';
|
781 |
+
$carousel_attrs .= ' data-same-height="true"';
|
782 |
|
783 |
if ( 'inherit' != $tablet_cnum || 'inherit' != $phone_cnum ) {
|
784 |
$carousel_attrs .= ' data-responsive="'. ( 'inherit' != $tablet_cnum ? $tablet_break_point . ':' . $tablet_cnum . ',' : '' ).
|
787 |
|
788 |
}
|
789 |
|
790 |
+
if ( 'grid-table' == $preview_mode ) {
|
791 |
+
$column_class .= ' aux-grid-table-layout aux-border-collapse';
|
792 |
+
$column_class .= 'none' != $grid_table_hover ? ' aux-has-bghover' : '';
|
793 |
+
|
794 |
+
$ignore_media = true;
|
795 |
+
}
|
796 |
+
|
797 |
+
// Specifies whether the columns have footer meta or not
|
798 |
+
$column_class .= ! $show_author_footer && ! $show_readmore ? ' aux-no-meta' : '';
|
799 |
+
|
800 |
$column_media_width = auxin_get_content_column_width( $desktop_cnum, 15 );
|
801 |
|
802 |
$have_posts = $wp_query->have_posts();
|
818 |
$post_vars = auxin_get_post_format_media(
|
819 |
$post,
|
820 |
array(
|
821 |
+
'post_type' => 'post',
|
822 |
'request_from' => 'archive',
|
823 |
'media_width' => $phone_break_point,
|
824 |
'media_size' => 'large',//array( 'width' => $column_media_width, 'height' => $column_media_width * $image_aspect_ratio ),
|
825 |
'upscale_image' => true,
|
826 |
'image_from_content' => ! $exclude_without_media, // whether to try to get image from content or not
|
827 |
+
'no_gallery' => 'carousel' == $preview_mode,
|
828 |
+
'ignore_media' => 'grid-table' == $preview_mode,
|
829 |
'add_image_hw' => false, // whether add width and height attr or not
|
830 |
'image_sizes' => array(
|
831 |
array( 'min' => '', 'max' => '767px', 'width' => '80vw' ),
|
841 |
);
|
842 |
|
843 |
extract( $post_vars );
|
|
|
844 |
$the_format = get_post_format( $post );
|
845 |
|
846 |
if(
|
847 |
+
( $exclude_custom_post_formats && ! empty( $the_format ) ) ||
|
848 |
( $exclude_qoute_link && ( 'link' == $the_format || 'quote' == $the_format ) ) ||
|
849 |
( $exclude_without_media && ! $has_attach )
|
850 |
){
|
852 |
continue;
|
853 |
}
|
854 |
|
855 |
+
// dont show media tag if media is ignored
|
856 |
+
$show_media = ! $ignore_media;
|
857 |
+
|
858 |
+
// add specific class to current classes for each column
|
859 |
+
$post_classes = $has_attach && $show_media ? 'column-entry' : 'column-entry no-media';
|
860 |
+
|
861 |
+
// generate custom inline style base on feature colors for each post if the preview mode is table cell
|
862 |
+
if ( 'grid-table' == $preview_mode ) {
|
863 |
+
|
864 |
+
$featured_color = '';
|
865 |
+
$featured_image = '';
|
866 |
+
|
867 |
+
if( false !== strpos( $grid_table_hover, 'bgcolor' ) ){
|
868 |
+
$featured_color = get_post_meta( $post->ID, 'auxin_featured_color_enabled', true ) ? get_post_meta( $post->ID, 'auxin_featured_color', true ) :
|
869 |
+
auxin_get_option( 'post_single_featured_color' );
|
870 |
+
}
|
871 |
+
if( false !== strpos( $grid_table_hover, 'bgimage' ) ){
|
872 |
+
$featured_image = auxin_get_the_attachment_url( $post, 'medium' );
|
873 |
+
}
|
874 |
+
|
875 |
+
// if grid table hover effect was only bgcolor
|
876 |
+
if( 'bgcolor' == $grid_table_hover ){
|
877 |
+
$columns_custom_styles .= $featured_color ? "\n.$base_class .aux-grid-table-layout > .post-{$post->ID}:hover { background-color:$featured_color; }" : '';
|
878 |
+
|
879 |
+
// if grid table hover effect was only bgimage
|
880 |
+
} else if( 'bgimage' == $grid_table_hover ){
|
881 |
+
$columns_custom_styles .= $featured_image ? "\n.$base_class .aux-grid-table-layout > .post-{$post->ID}:hover { background-image:linear-gradient( rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4) ), url( $featured_image ); }" : '';
|
882 |
+
|
883 |
+
// if grid table hover effect was bgimage with bgcolor fallback
|
884 |
+
} else if( 'bgimage-bgcolor' == $grid_table_hover ){
|
885 |
+
if( $featured_image ){
|
886 |
+
$columns_custom_styles .= "\n.$base_class .aux-grid-table-layout > .post-{$post->ID}:hover { background-image:linear-gradient( rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4) ), url( $featured_image ); }" ;
|
887 |
+
} else if( $featured_color ){
|
888 |
+
$columns_custom_styles .= "\n.$base_class .aux-grid-table-layout > .post-{$post->ID}:hover { background-color:$featured_color; }";
|
889 |
+
}
|
890 |
+
}
|
891 |
+
|
892 |
+
}
|
893 |
?>
|
894 |
+
<div class="<?php echo $item_class . ' post-'.$post->ID ?>">
|
895 |
+
<?php include( locate_template( 'templates/theme-parts/entry/post-column.php' ) ); ?>
|
896 |
</div>
|
897 |
<?php
|
898 |
}
|
914 |
|
915 |
// use it as data attribute on load more button
|
916 |
$ajax_nonce = wp_create_nonce( 'post-recent-grid-nonce' );
|
917 |
+
// print the custom inline style if available
|
918 |
+
echo $columns_custom_styles ? "<style>$columns_custom_styles</style>" : '';
|
919 |
?>
|
920 |
</div>
|
921 |
<?php
|
includes/elements/recent-posts-land-style.php
CHANGED
@@ -67,6 +67,7 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
|
|
67 |
'group' => '' ,
|
68 |
'edit_field_class' => ''
|
69 |
),
|
|
|
70 |
// array(
|
71 |
// 'param_name' => 'post_type',
|
72 |
// 'type' => 'dropdown',
|
@@ -85,13 +86,12 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
|
|
85 |
// 'group' => '' ,
|
86 |
// 'edit_field_class' => ''
|
87 |
// ),
|
88 |
-
|
89 |
array(
|
90 |
'heading' => __('Categories', 'auxin-elements'),
|
91 |
'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
|
92 |
'param_name' => 'cat',
|
93 |
'type' => 'dropdown',
|
94 |
-
'def_value' => '',
|
95 |
'holder' => 'dropdown',
|
96 |
'class' => 'cat',
|
97 |
'value' => $categories_list,
|
@@ -101,7 +101,6 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
|
|
101 |
'group' => '' ,
|
102 |
'edit_field_class' => ''
|
103 |
),
|
104 |
-
|
105 |
array(
|
106 |
'heading' => __('Number of posts to show', 'auxin-elements'),
|
107 |
'description' => '',
|
@@ -116,7 +115,6 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
|
|
116 |
'group' => '' ,
|
117 |
'edit_field_class' => ''
|
118 |
),
|
119 |
-
|
120 |
array(
|
121 |
'heading' => __('Exclude posts without media','auxin-elements' ),
|
122 |
'description' => '',
|
@@ -130,7 +128,6 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
|
|
130 |
'group' => '' ,
|
131 |
'edit_field_class' => ''
|
132 |
),
|
133 |
-
|
134 |
array(
|
135 |
'heading' => __('Exclude custom post formats','auxin-elements' ),
|
136 |
'description' => '',
|
@@ -144,7 +141,6 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
|
|
144 |
'group' => '' ,
|
145 |
'edit_field_class' => ''
|
146 |
),
|
147 |
-
|
148 |
array(
|
149 |
'heading' => __('Exclude qoute and link post formats','auxin-elements' ),
|
150 |
'description' => '',
|
@@ -155,13 +151,12 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
|
|
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' ),
|
@@ -232,7 +227,6 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
|
|
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' ),
|
@@ -247,7 +241,26 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
|
|
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',
|
@@ -262,8 +275,7 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
|
|
262 |
'group' => '' ,
|
263 |
'edit_field_class' => ''
|
264 |
),
|
265 |
-
|
266 |
-
array(
|
267 |
'heading' => __('Image aspect ratio', 'auxin-elements'),
|
268 |
'description' => '',
|
269 |
'param_name' => 'image_aspect_ratio',
|
@@ -283,23 +295,21 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
|
|
283 |
'group' => '' ,
|
284 |
'edit_field_class' => ''
|
285 |
),
|
286 |
-
|
287 |
array(
|
288 |
-
'heading' => __('
|
289 |
'description' => '',
|
290 |
-
'param_name' => '
|
291 |
'type' => 'aux_switch',
|
292 |
'value' => '1',
|
293 |
-
'class' => '',
|
294 |
'admin_label' => true,
|
295 |
'dependency' => '',
|
296 |
'weight' => '',
|
297 |
'group' => '' ,
|
298 |
'edit_field_class' => ''
|
299 |
),
|
300 |
-
|
301 |
array(
|
302 |
-
'heading' => __('
|
303 |
'description' => '',
|
304 |
'param_name' => 'show_info',
|
305 |
'type' => 'aux_switch',
|
@@ -310,7 +320,6 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
|
|
310 |
'group' => '' ,
|
311 |
'edit_field_class' => ''
|
312 |
),
|
313 |
-
|
314 |
array(
|
315 |
'heading' => __('Display like button','auxin-elements' ),
|
316 |
'description' => sprintf(__('Enable it to display %s like button%s on gride template blog. Please note WP Ulike plugin needs to be activaited to use this option.', 'auxin-elements'), '<strong>', '</strong>'),
|
@@ -325,23 +334,6 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
|
|
325 |
'group' => '' ,
|
326 |
'edit_field_class' => ''
|
327 |
),
|
328 |
-
|
329 |
-
array(
|
330 |
-
'heading' => __('Display excerpt','auxin-elements' ),
|
331 |
-
'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
|
332 |
-
'param_name' => 'show_excerpt',
|
333 |
-
'type' => 'aux_switch',
|
334 |
-
'def_value' => '',
|
335 |
-
'value' => '1',
|
336 |
-
'holder' => 'dropdown',
|
337 |
-
'class' => 'show_excerpt',
|
338 |
-
'admin_label' => 1,
|
339 |
-
'dependency' => '',
|
340 |
-
'weight' => '',
|
341 |
-
'group' => '' ,
|
342 |
-
'edit_field_class' => ''
|
343 |
-
),
|
344 |
-
|
345 |
array(
|
346 |
'heading' => __('Excerpt length','auxin-elements' ),
|
347 |
'description' => __('Specify summary content in character.','auxin-elements' ),
|
@@ -359,37 +351,24 @@ function auxin_get_recent_posts_land_master_array( $master_array ) {
|
|
359 |
'group' => '' ,
|
360 |
'edit_field_class' => ''
|
361 |
),
|
362 |
-
|
363 |
array(
|
364 |
-
'heading' => __('
|
365 |
-
'description' => '',
|
366 |
-
'param_name' => '
|
367 |
-
'type' => '
|
368 |
-
'
|
369 |
-
'
|
370 |
-
'
|
371 |
-
'
|
372 |
-
|
373 |
-
|
374 |
-
),
|
375 |
-
|
376 |
-
array(
|
377 |
-
'heading' => __('Insert author name in bottom side','auxin-elements' ),
|
378 |
-
'description' => '',
|
379 |
-
'param_name' => 'show_author_footer',
|
380 |
-
'type' => 'aux_switch',
|
381 |
-
'value' => '1',
|
382 |
-
'class' => '',
|
383 |
-
'dependency' => array(
|
384 |
-
'element' => 'show_readmore',
|
385 |
-
'value' => '0'
|
386 |
),
|
387 |
-
'admin_label' =>
|
|
|
388 |
'weight' => '',
|
389 |
'group' => '' ,
|
390 |
'edit_field_class' => ''
|
391 |
),
|
392 |
-
|
393 |
array(
|
394 |
'heading' => __('Extra class name','auxin-elements' ),
|
395 |
'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'auxin-elements' ),
|
@@ -426,32 +405,30 @@ add_filter( 'auxin_master_array_shortcodes', 'auxin_get_recent_posts_land_master
|
|
426 |
*/
|
427 |
function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_content = null ){
|
428 |
|
429 |
-
|
430 |
|
431 |
// Defining default attributes
|
432 |
$default_atts = array(
|
433 |
'title' => '', // header title
|
434 |
-
'cat' => '',
|
435 |
-
'num' => '8',
|
436 |
'exclude' => '',
|
437 |
'include' => '',
|
438 |
'posts_per_page' => -1,
|
439 |
-
'offset' => '',
|
440 |
'paged' => '',
|
|
|
441 |
'order_by' => 'menu_order date',
|
442 |
'order' => 'desc',
|
443 |
-
'content_layout' => 'entry-boxed', // entry-boxed
|
444 |
'exclude_without_media' => 0,
|
445 |
'exclude_custom_post_formats' => 0,
|
446 |
'exclude_qoute_link' => 0,
|
447 |
'show_media' => true,
|
448 |
-
'
|
449 |
-
'show_excerpt' => true,
|
450 |
'excerpt_len' => '160',
|
451 |
-
'
|
|
|
452 |
'show_info' => true,
|
453 |
-
'
|
454 |
-
'show_author_footer' => false,
|
455 |
'image_aspect_ratio' => 0.75,
|
456 |
'tag' => '',
|
457 |
'extra_classes' => '',
|
@@ -464,7 +441,16 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
|
|
464 |
$result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
|
465 |
extract( $result['parsed_atts'] );
|
466 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
ob_start();
|
|
|
468 |
global $wp_query;
|
469 |
|
470 |
if( ! $use_wp_query ){
|
@@ -498,7 +484,10 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
|
|
498 |
$show_comments = true; // shows comments icon
|
499 |
$post_counter = 0;
|
500 |
$wrapper_class = 'aux-blog-land-style';
|
501 |
-
$
|
|
|
|
|
|
|
502 |
|
503 |
// whether any result was found or not
|
504 |
$have_posts = $wp_query->have_posts();
|
@@ -521,7 +510,12 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
|
|
521 |
array(
|
522 |
'request_from' => 'archive',
|
523 |
'media_width' => $phone_break_point,
|
524 |
-
'upscale_image' => true
|
|
|
|
|
|
|
|
|
|
|
525 |
)
|
526 |
);
|
527 |
|
@@ -537,10 +531,9 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
|
|
537 |
$post_counter --;
|
538 |
continue;
|
539 |
}
|
|
|
|
|
540 |
|
541 |
-
?>
|
542 |
-
<?php include( locate_template( 'templates/theme-parts/entry/post-land.php' ) ); ?>
|
543 |
-
<?php
|
544 |
}
|
545 |
?> </div> <?php
|
546 |
}
|
@@ -559,4 +552,4 @@ function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_conten
|
|
559 |
echo $result['widget_footer'];
|
560 |
|
561 |
return ob_get_clean();
|
562 |
-
}
|
67 |
'group' => '' ,
|
68 |
'edit_field_class' => ''
|
69 |
),
|
70 |
+
|
71 |
// array(
|
72 |
// 'param_name' => 'post_type',
|
73 |
// 'type' => 'dropdown',
|
86 |
// 'group' => '' ,
|
87 |
// 'edit_field_class' => ''
|
88 |
// ),
|
|
|
89 |
array(
|
90 |
'heading' => __('Categories', 'auxin-elements'),
|
91 |
'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
|
92 |
'param_name' => 'cat',
|
93 |
'type' => 'dropdown',
|
94 |
+
'def_value' => ' ',
|
95 |
'holder' => 'dropdown',
|
96 |
'class' => 'cat',
|
97 |
'value' => $categories_list,
|
101 |
'group' => '' ,
|
102 |
'edit_field_class' => ''
|
103 |
),
|
|
|
104 |
array(
|
105 |
'heading' => __('Number of posts to show', 'auxin-elements'),
|
106 |
'description' => '',
|
115 |
'group' => '' ,
|
116 |
'edit_field_class' => ''
|
117 |
),
|
|
|
118 |
array(
|
119 |
'heading' => __('Exclude posts without media','auxin-elements' ),
|
120 |
'description' => '',
|
128 |
'group' => '' ,
|
129 |
'edit_field_class' => ''
|
130 |
),
|
|
|
131 |
array(
|
132 |
'heading' => __('Exclude custom post formats','auxin-elements' ),
|
133 |
'description' => '',
|
141 |
'group' => '' ,
|
142 |
'edit_field_class' => ''
|
143 |
),
|
|
|
144 |
array(
|
145 |
'heading' => __('Exclude qoute and link post formats','auxin-elements' ),
|
146 |
'description' => '',
|
151 |
'admin_label' => true,
|
152 |
'dependency' => array(
|
153 |
'element' => 'exclude_custom_post_formats',
|
154 |
+
'value' => array('0', 'false')
|
155 |
),
|
156 |
'weight' => '',
|
157 |
'group' => '' ,
|
158 |
'edit_field_class' => ''
|
159 |
),
|
|
|
160 |
array(
|
161 |
'heading' => __('Exclude posts','auxin-elements' ),
|
162 |
'description' => __('Post IDs separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
|
227 |
'group' => '' ,
|
228 |
'edit_field_class' => ''
|
229 |
),
|
|
|
230 |
array(
|
231 |
'heading' => __('Start offset','auxin-elements' ),
|
232 |
'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
|
241 |
'group' => '' ,
|
242 |
'edit_field_class' => ''
|
243 |
),
|
244 |
+
array(
|
245 |
+
'heading' => __('Image aspect ratio', 'auxin-elements'),
|
246 |
+
'description' => '',
|
247 |
+
'param_name' => 'image_aspect_ratio',
|
248 |
+
'type' => 'dropdown',
|
249 |
+
'def_value' => '0.75',
|
250 |
+
'holder' => 'dropdown',
|
251 |
+
'class' => 'order',
|
252 |
+
'value' =>array (
|
253 |
+
'0.75' => __('Horizontal 4:3' , 'auxin-elements'),
|
254 |
+
'0.56' => __('Horizontal 16:9', 'auxin-elements'),
|
255 |
+
'1.00' => __('Square 1:1' , 'auxin-elements'),
|
256 |
+
'1.33' => __('Vertical 3:4' , 'auxin-elements')
|
257 |
+
),
|
258 |
+
'admin_label' => true,
|
259 |
+
'dependency' => '',
|
260 |
+
'weight' => '',
|
261 |
+
'group' => '' ,
|
262 |
+
'edit_field_class' => ''
|
263 |
+
),
|
264 |
array(
|
265 |
'heading' => __('Display post media (image, video, etc)', 'auxin-elements' ),
|
266 |
'param_name' => 'show_media',
|
275 |
'group' => '' ,
|
276 |
'edit_field_class' => ''
|
277 |
),
|
278 |
+
array(
|
|
|
279 |
'heading' => __('Image aspect ratio', 'auxin-elements'),
|
280 |
'description' => '',
|
281 |
'param_name' => 'image_aspect_ratio',
|
295 |
'group' => '' ,
|
296 |
'edit_field_class' => ''
|
297 |
),
|
|
|
298 |
array(
|
299 |
+
'heading' => __('Display post title','auxin-elements' ),
|
300 |
'description' => '',
|
301 |
+
'param_name' => 'display_title',
|
302 |
'type' => 'aux_switch',
|
303 |
'value' => '1',
|
304 |
+
'class' => 'display_title',
|
305 |
'admin_label' => true,
|
306 |
'dependency' => '',
|
307 |
'weight' => '',
|
308 |
'group' => '' ,
|
309 |
'edit_field_class' => ''
|
310 |
),
|
|
|
311 |
array(
|
312 |
+
'heading' => __('Display post meta','auxin-elements' ),
|
313 |
'description' => '',
|
314 |
'param_name' => 'show_info',
|
315 |
'type' => 'aux_switch',
|
320 |
'group' => '' ,
|
321 |
'edit_field_class' => ''
|
322 |
),
|
|
|
323 |
array(
|
324 |
'heading' => __('Display like button','auxin-elements' ),
|
325 |
'description' => sprintf(__('Enable it to display %s like button%s on gride template blog. Please note WP Ulike plugin needs to be activaited to use this option.', 'auxin-elements'), '<strong>', '</strong>'),
|
334 |
'group' => '' ,
|
335 |
'edit_field_class' => ''
|
336 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
337 |
array(
|
338 |
'heading' => __('Excerpt length','auxin-elements' ),
|
339 |
'description' => __('Specify summary content in character.','auxin-elements' ),
|
351 |
'group' => '' ,
|
352 |
'edit_field_class' => ''
|
353 |
),
|
|
|
354 |
array(
|
355 |
+
'heading' => __('Display author or read more', 'auxin-elements'),
|
356 |
+
'description' => __('Specifies whether to show author or read more on each post.', 'auxin-elements'),
|
357 |
+
'param_name' => 'author_or_readmore',
|
358 |
+
'type' => 'dropdown',
|
359 |
+
'def_value' => 'readmore',
|
360 |
+
'holder' => 'dropdown',
|
361 |
+
'class' => 'author_or_readmore',
|
362 |
+
'value' =>array (
|
363 |
+
'readmore' => __('Read More', 'auxin-elements'),
|
364 |
+
'author' => __('Author Name', 'auxin-elements'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
365 |
),
|
366 |
+
'admin_label' => true,
|
367 |
+
'dependency' => '',
|
368 |
'weight' => '',
|
369 |
'group' => '' ,
|
370 |
'edit_field_class' => ''
|
371 |
),
|
|
|
372 |
array(
|
373 |
'heading' => __('Extra class name','auxin-elements' ),
|
374 |
'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' ),
|
405 |
*/
|
406 |
function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_content = null ){
|
407 |
|
408 |
+
global $aux_content_width;
|
409 |
|
410 |
// Defining default attributes
|
411 |
$default_atts = array(
|
412 |
'title' => '', // header title
|
413 |
+
'cat' => ' ',
|
414 |
+
'num' => '8',
|
415 |
'exclude' => '',
|
416 |
'include' => '',
|
417 |
'posts_per_page' => -1,
|
|
|
418 |
'paged' => '',
|
419 |
+
'offset' => '',
|
420 |
'order_by' => 'menu_order date',
|
421 |
'order' => 'desc',
|
|
|
422 |
'exclude_without_media' => 0,
|
423 |
'exclude_custom_post_formats' => 0,
|
424 |
'exclude_qoute_link' => 0,
|
425 |
'show_media' => true,
|
426 |
+
'show_excerpt' => true,
|
|
|
427 |
'excerpt_len' => '160',
|
428 |
+
'display_title' => true,
|
429 |
+
'display_like' => true,
|
430 |
'show_info' => true,
|
431 |
+
'author_or_readmore' => 'readmore',
|
|
|
432 |
'image_aspect_ratio' => 0.75,
|
433 |
'tag' => '',
|
434 |
'extra_classes' => '',
|
441 |
$result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
|
442 |
extract( $result['parsed_atts'] );
|
443 |
|
444 |
+
if( $author_or_readmore == 'readmore') {
|
445 |
+
$show_readmore = true;
|
446 |
+
$show_author_footer = false;
|
447 |
+
} else {
|
448 |
+
$show_author_footer = true;
|
449 |
+
$show_readmore = false;
|
450 |
+
}
|
451 |
+
|
452 |
ob_start();
|
453 |
+
|
454 |
global $wp_query;
|
455 |
|
456 |
if( ! $use_wp_query ){
|
484 |
$show_comments = true; // shows comments icon
|
485 |
$post_counter = 0;
|
486 |
$wrapper_class = 'aux-blog-land-style';
|
487 |
+
$item_class = 'aux-block';
|
488 |
+
$post_classes = 'aux-column-post-entry land-post-style';
|
489 |
+
|
490 |
+
$column_media_width = auxin_get_content_column_width( 2, 15 );
|
491 |
|
492 |
// whether any result was found or not
|
493 |
$have_posts = $wp_query->have_posts();
|
510 |
array(
|
511 |
'request_from' => 'archive',
|
512 |
'media_width' => $phone_break_point,
|
513 |
+
'upscale_image' => true,
|
514 |
+
'srcset_sizes' => array(
|
515 |
+
array( 'width' => $column_media_width, 'height' => $column_media_width * $image_aspect_ratio ),
|
516 |
+
array( 'width' => 2 * $column_media_width, 'height' => 2 * $column_media_width * $image_aspect_ratio ),
|
517 |
+
array( 'width' => 4 * $column_media_width, 'height' => 4 * $column_media_width * $image_aspect_ratio )
|
518 |
+
)
|
519 |
)
|
520 |
);
|
521 |
|
531 |
$post_counter --;
|
532 |
continue;
|
533 |
}
|
534 |
+
|
535 |
+
include( locate_template( 'templates/theme-parts/entry/post-column.php' ) );
|
536 |
|
|
|
|
|
|
|
537 |
}
|
538 |
?> </div> <?php
|
539 |
}
|
552 |
echo $result['widget_footer'];
|
553 |
|
554 |
return ob_get_clean();
|
555 |
+
}
|
includes/elements/recent-posts-masonry.php
ADDED
@@ -0,0 +1,671 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_masonry_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 |