Version Description
- Add responsive layouts for masonry and grid layout for terms shortcode
- Fixed bugs
Download this release
Release Info
Developer | TemplateMonster 2002 |
Plugin | Cherry Projects |
Version | 1.2.4 |
Comparing to | |
See all releases |
Code changes from version 1.2.3 to 1.2.4
- admin/includes/class-projects-admin.php +81 -1
- cherry-projects.php +2 -2
- public/assets/js/cherry-projects-scripts.js +15 -10
- public/includes/class-projects-term-data.php +23 -15
- readme.txt +7 -2
admin/includes/class-projects-admin.php
CHANGED
@@ -699,15 +699,95 @@ class Cherry_Projects_Admin {
|
|
699 |
),
|
700 |
),
|
701 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
702 |
'column_number' => array(
|
703 |
'type' => 'slider',
|
|
|
704 |
'title' => esc_html__( 'Column number', 'cherry-projects' ),
|
705 |
'description' => esc_html__( 'Select number of columns for masonry and grid projects layouts. (Min 2, max 6)', 'cherry-projects' ),
|
706 |
'max_value' => 6,
|
707 |
-
'min_value' =>
|
708 |
'value' => 3,
|
709 |
),
|
710 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
711 |
'post_per_page' => array(
|
712 |
'type' => 'slider',
|
713 |
'title' => esc_html__( 'Posts per page', 'cherry-projects' ),
|
699 |
),
|
700 |
),
|
701 |
|
702 |
+
'device_layout_column_number' => array(
|
703 |
+
'type' => 'component-tab-horizontal',
|
704 |
+
),
|
705 |
+
|
706 |
+
'column_number_desktop_layout' => array(
|
707 |
+
'type' => 'settings',
|
708 |
+
'parent' => 'device_layout_column_number',
|
709 |
+
'title' => esc_html__( 'Desktop', 'cherry-projects' ),
|
710 |
+
'description' => esc_html__( 'Define column number for desktop layout', 'cherry-projects' ),
|
711 |
+
),
|
712 |
+
|
713 |
+
'column_number_laptop_layout' => array(
|
714 |
+
'type' => 'settings',
|
715 |
+
'parent' => 'device_layout_column_number',
|
716 |
+
'title' => esc_html__( 'Laptop', 'cherry-projects' ),
|
717 |
+
'description' => esc_html__( 'Define column number for laptop layout', 'cherry-projects' ),
|
718 |
+
),
|
719 |
+
|
720 |
+
'column_number_album_tablet_layout' => array(
|
721 |
+
'type' => 'settings',
|
722 |
+
'parent' => 'device_layout_column_number',
|
723 |
+
'title' => esc_html__( 'Album Tablet', 'cherry-projects' ),
|
724 |
+
'description' => esc_html__( 'Define column number for tablet layout', 'cherry-projects' ),
|
725 |
+
),
|
726 |
+
|
727 |
+
'column_number_portrait_tablet_layout' => array(
|
728 |
+
'type' => 'settings',
|
729 |
+
'parent' => 'device_layout_column_number',
|
730 |
+
'title' => esc_html__( 'Portrait Tablet', 'cherry-projects' ),
|
731 |
+
'description' => esc_html__( 'Define column number for tablet layout', 'cherry-projects' ),
|
732 |
+
),
|
733 |
+
|
734 |
+
'column_number_mobile_layout' => array(
|
735 |
+
'type' => 'settings',
|
736 |
+
'parent' => 'device_layout_column_number',
|
737 |
+
'title' => esc_html__( 'Mobile', 'cherry-projects' ),
|
738 |
+
'description' => esc_html__( 'Define column number for mobile layout', 'cherry-projects' ),
|
739 |
+
),
|
740 |
+
|
741 |
'column_number' => array(
|
742 |
'type' => 'slider',
|
743 |
+
'parent' => 'column_number_desktop_layout',
|
744 |
'title' => esc_html__( 'Column number', 'cherry-projects' ),
|
745 |
'description' => esc_html__( 'Select number of columns for masonry and grid projects layouts. (Min 2, max 6)', 'cherry-projects' ),
|
746 |
'max_value' => 6,
|
747 |
+
'min_value' => 1,
|
748 |
'value' => 3,
|
749 |
),
|
750 |
|
751 |
+
'column_number_laptop' => array(
|
752 |
+
'type' => 'slider',
|
753 |
+
'parent' => 'column_number_laptop_layout',
|
754 |
+
'title' => esc_html__( 'Labtop column number', 'cherry-projects' ),
|
755 |
+
'description' => esc_html__( 'Select laptop number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
|
756 |
+
'max_value' => 6,
|
757 |
+
'min_value' => 1,
|
758 |
+
'value' => 3,
|
759 |
+
),
|
760 |
+
|
761 |
+
'column_number_album_tablet' => array(
|
762 |
+
'type' => 'slider',
|
763 |
+
'parent' => 'column_number_album_tablet_layout',
|
764 |
+
'title' => esc_html__( 'Album Tablet column number', 'cherry-projects' ),
|
765 |
+
'description' => esc_html__( 'Select album tablet number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
|
766 |
+
'max_value' => 6,
|
767 |
+
'min_value' => 1,
|
768 |
+
'value' => 2,
|
769 |
+
),
|
770 |
+
|
771 |
+
'column_number_portrait_tablet' => array(
|
772 |
+
'type' => 'slider',
|
773 |
+
'parent' => 'column_number_portrait_tablet_layout',
|
774 |
+
'title' => esc_html__( 'Portrait Tablet column number', 'cherry-projects' ),
|
775 |
+
'description' => esc_html__( 'Select portrait tablet number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
|
776 |
+
'max_value' => 6,
|
777 |
+
'min_value' => 1,
|
778 |
+
'value' => 2,
|
779 |
+
),
|
780 |
+
|
781 |
+
'column_number_mobile' => array(
|
782 |
+
'type' => 'slider',
|
783 |
+
'parent' => 'column_number_mobile_layout',
|
784 |
+
'title' => esc_html__( 'Tablet column number', 'cherry-projects' ),
|
785 |
+
'description' => esc_html__( 'Select mobile number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
|
786 |
+
'max_value' => 6,
|
787 |
+
'min_value' => 1,
|
788 |
+
'value' => 1,
|
789 |
+
),
|
790 |
+
|
791 |
'post_per_page' => array(
|
792 |
'type' => 'slider',
|
793 |
'title' => esc_html__( 'Posts per page', 'cherry-projects' ),
|
cherry-projects.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Cherry Projects
|
4 |
* Plugin URI: http://www.cherryframework.com/
|
5 |
* Description: A projects plugin for WordPress.
|
6 |
-
* Version: 1.2.
|
7 |
* Author: Cherry Team
|
8 |
* Author URI: http://www.cherryframework.com/
|
9 |
* Text Domain: cherry-projects
|
@@ -138,7 +138,7 @@ if ( ! class_exists( 'Cherry_Projects' ) ) {
|
|
138 |
*
|
139 |
* @since 1.0.0
|
140 |
*/
|
141 |
-
define( 'CHERRY_PROJECTS_VERSION', '1.2.
|
142 |
|
143 |
/**
|
144 |
* Set the slug of the plugin.
|
3 |
* Plugin Name: Cherry Projects
|
4 |
* Plugin URI: http://www.cherryframework.com/
|
5 |
* Description: A projects plugin for WordPress.
|
6 |
+
* Version: 1.2.4
|
7 |
* Author: Cherry Team
|
8 |
* Author URI: http://www.cherryframework.com/
|
9 |
* Text Domain: cherry-projects
|
138 |
*
|
139 |
* @since 1.0.0
|
140 |
*/
|
141 |
+
define( 'CHERRY_PROJECTS_VERSION', '1.2.4' );
|
142 |
|
143 |
/**
|
144 |
* Set the slug of the plugin.
|
public/assets/js/cherry-projects-scripts.js
CHANGED
@@ -55,7 +55,7 @@
|
|
55 |
$projectsTermInstance.each( function( index ) {
|
56 |
var $instance = $( this ),
|
57 |
instanceSettings = $instance.data( 'settings' ),
|
58 |
-
columnNumber = self.getResponsiveColumn(
|
59 |
|
60 |
$instance.imagesLoaded( function() {
|
61 |
$loader.fadeTo( 500, 0, function() { $( this ).css( { 'display': 'none' } ); } );
|
@@ -75,7 +75,7 @@
|
|
75 |
}
|
76 |
|
77 |
jQuery( window ).on( 'resize.projects_layout_resize', function() {
|
78 |
-
var columnNumber = self.getResponsiveColumn(
|
79 |
|
80 |
switch ( instanceSettings['list-layout'] ) {
|
81 |
case 'grid-layout':
|
@@ -202,27 +202,32 @@
|
|
202 |
|
203 |
},
|
204 |
|
205 |
-
getResponsiveColumn: function(
|
206 |
-
var columnPerView
|
207 |
-
widthLayout
|
|
|
|
|
|
|
|
|
208 |
|
209 |
switch ( widthLayout ) {
|
210 |
case 'xl':
|
211 |
-
columnPerView = +
|
212 |
break
|
213 |
case 'lg':
|
214 |
-
columnPerView =
|
215 |
break
|
216 |
case 'md':
|
217 |
-
columnPerView =
|
218 |
break
|
219 |
case 'sm':
|
220 |
-
columnPerView =
|
221 |
break
|
222 |
case 'xs':
|
223 |
-
columnPerView =
|
224 |
break
|
225 |
}
|
|
|
226 |
return columnPerView;
|
227 |
},
|
228 |
|
55 |
$projectsTermInstance.each( function( index ) {
|
56 |
var $instance = $( this ),
|
57 |
instanceSettings = $instance.data( 'settings' ),
|
58 |
+
columnNumber = self.getResponsiveColumn( instanceSettings );
|
59 |
|
60 |
$instance.imagesLoaded( function() {
|
61 |
$loader.fadeTo( 500, 0, function() { $( this ).css( { 'display': 'none' } ); } );
|
75 |
}
|
76 |
|
77 |
jQuery( window ).on( 'resize.projects_layout_resize', function() {
|
78 |
+
var columnNumber = self.getResponsiveColumn( instanceSettings );
|
79 |
|
80 |
switch ( instanceSettings['list-layout'] ) {
|
81 |
case 'grid-layout':
|
202 |
|
203 |
},
|
204 |
|
205 |
+
getResponsiveColumn: function( settings ) {
|
206 |
+
var columnPerView = +settings['column-number'] || 4,
|
207 |
+
widthLayout = this.getResponsiveLayout(),
|
208 |
+
columnNumberLaptop = +settings['column-number-laptop'] || 3,
|
209 |
+
columnNumberAlbumTablet = +settings['column-number-album-tablet'] || 3,
|
210 |
+
columnNumberPortraitTablet = +settings['column-number-portrait-tablet'] || 2,
|
211 |
+
columnNumberMobile = +settings['column-number-mobile'] || 1;
|
212 |
|
213 |
switch ( widthLayout ) {
|
214 |
case 'xl':
|
215 |
+
columnPerView = +columnPerView;
|
216 |
break
|
217 |
case 'lg':
|
218 |
+
columnPerView = columnNumberLaptop;
|
219 |
break
|
220 |
case 'md':
|
221 |
+
columnPerView = columnNumberAlbumTablet;
|
222 |
break
|
223 |
case 'sm':
|
224 |
+
columnPerView = columnNumberPortraitTablet;
|
225 |
break
|
226 |
case 'xs':
|
227 |
+
columnPerView = columnNumberMobile;
|
228 |
break
|
229 |
}
|
230 |
+
|
231 |
return columnPerView;
|
232 |
},
|
233 |
|
public/includes/class-projects-term-data.php
CHANGED
@@ -53,17 +53,21 @@ class Cherry_Project_Term_Data extends Cherry_Project_Data {
|
|
53 |
*/
|
54 |
public function set_default_options() {
|
55 |
$this->default_options = array(
|
56 |
-
'term-type'
|
57 |
-
'listing-layout'
|
58 |
-
'loading-animation'
|
59 |
-
'column-number'
|
60 |
-
'
|
61 |
-
'
|
62 |
-
'
|
63 |
-
'
|
64 |
-
'
|
65 |
-
'
|
66 |
-
'
|
|
|
|
|
|
|
|
|
67 |
);
|
68 |
|
69 |
/**
|
@@ -103,10 +107,14 @@ class Cherry_Project_Term_Data extends Cherry_Project_Data {
|
|
103 |
}
|
104 |
|
105 |
$settings = array(
|
106 |
-
'list-layout'
|
107 |
-
'post-per-page'
|
108 |
-
'column-number'
|
109 |
-
'
|
|
|
|
|
|
|
|
|
110 |
);
|
111 |
|
112 |
$settings = json_encode( $settings );
|
53 |
*/
|
54 |
public function set_default_options() {
|
55 |
$this->default_options = array(
|
56 |
+
'term-type' => 'category',
|
57 |
+
'listing-layout' => 'grid-layout',
|
58 |
+
'loading-animation' => 'loading-animation-fade',
|
59 |
+
'column-number' => 3,
|
60 |
+
'column-number-laptop' => 3,
|
61 |
+
'column-number-album-tablet' => 2,
|
62 |
+
'column-number-portrait-tablet' => 2,
|
63 |
+
'column-number-mobile' => 1,
|
64 |
+
'post-per-page' => 6,
|
65 |
+
'item-margin' => 10,
|
66 |
+
'grid-template' => 'terms-grid-default.tmpl',
|
67 |
+
'masonry-template' => 'terms-masonry-default.tmpl',
|
68 |
+
'list-template' => 'terms-list-default.tmpl',
|
69 |
+
'cascading-grid-template' => 'terms-cascading-grid-default.tmpl',
|
70 |
+
'echo' => true,
|
71 |
);
|
72 |
|
73 |
/**
|
107 |
}
|
108 |
|
109 |
$settings = array(
|
110 |
+
'list-layout' => $this->options['listing-layout'],
|
111 |
+
'post-per-page' => $this->options['post-per-page'],
|
112 |
+
'column-number' => $this->options['column-number'],
|
113 |
+
'column-number-laptop' => $this->options['column-number-laptop'],
|
114 |
+
'column-number-album-tablet' => $this->options['column-number-album-tablet'],
|
115 |
+
'column-number-portrait-tablet' => $this->options['column-number-portrait-tablet'],
|
116 |
+
'column-number-mobile' => $this->options['column-number-mobile'],
|
117 |
+
'item-margin' => $this->options['item-margin'],
|
118 |
);
|
119 |
|
120 |
$settings = json_encode( $settings );
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
Contributors: TemplateMonster 2002
|
4 |
Tags: custom post type, projects, portfolio, cherry framework
|
5 |
Requires at least: 4.5
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.2.
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -154,3 +154,8 @@ Standard templates can be rewritten in the theme. For that you need to create ch
|
|
154 |
|
155 |
* Add responsive layouts for masonry and grid layout
|
156 |
* Fixed bugs
|
|
|
|
|
|
|
|
|
|
3 |
Contributors: TemplateMonster 2002
|
4 |
Tags: custom post type, projects, portfolio, cherry framework
|
5 |
Requires at least: 4.5
|
6 |
+
Tested up to: 4.8.0
|
7 |
+
Stable tag: 1.2.4
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
154 |
|
155 |
* Add responsive layouts for masonry and grid layout
|
156 |
* Fixed bugs
|
157 |
+
|
158 |
+
= 1.2.4 =
|
159 |
+
|
160 |
+
* Add responsive layouts for masonry and grid layout for terms shortcode
|
161 |
+
* Fixed bugs
|