Version Description
- 2022/11/23 =
- Prevent potential conflict in the block editor
Download this release
Release Info
Developer | PT Guy |
Plugin | Content Views – Post Grid & List for WordPress |
Version | 2.5.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.5.0 to 2.5.0.1
- README.txt +7 -4
- blocks/index.js +0 -90
- blocks/index.min.js +1 -0
- blocks/main.php +1 -1
- content-views.php +2 -2
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.contentviewspro.com/?utm_source=wordpress&utm_medium=pl
|
|
4 |
Tags: post grid, grid plugin, grid, latest post, display post, post list, post, page, category, responsive, list, thumbnail
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 6.1
|
7 |
-
Stable tag: 2.5.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -35,7 +35,7 @@ Content Views requires no time to learn, no coding skill to create the beautiful
|
|
35 |
There are 3 simple steps to design your post grid by Content Views:
|
36 |
* Step 1: Filter any posts you want to show (with many possible options: ID, category, tag, author, keyword, status).
|
37 |
* Step 2: Select a beautiful grid or list layout to display your posts. You can customize the layout in your way with many useful settings.
|
38 |
-
* Step 3:
|
39 |
|
40 |
[youtube https://www.youtube.com/watch?v=drxqtCiaw4I]
|
41 |
|
@@ -47,7 +47,7 @@ We have all the settings you need to filter and display any WordPress posts, pag
|
|
47 |
* 100% Responsive and Mobile Friendly
|
48 |
* SEO friendly and optimized for speed
|
49 |
* Pagination support
|
50 |
-
* Display grid of posts on WordPress page, widget, theme template easily
|
51 |
* Display recent posts
|
52 |
* Display posts from a specific category, tag, author, ID
|
53 |
* Display posts that contain a specific keyword
|
@@ -146,7 +146,7 @@ You will be forwarded to View page.
|
|
146 |
|
147 |
= How to use View on my home page? =
|
148 |
|
149 |
-
If you are using a static page as home page, you should
|
150 |
If you are using "Your latest posts" as home page, you should paste this code `<?php echo do_shortcode("[pt_view id=VIEW_ID]"); ?>` to a theme file: `front-page.php` or `home.php` or `index.php`.
|
151 |
|
152 |
= Does it support custom post type, custom taxonomy, custom field? =
|
@@ -166,6 +166,9 @@ Yes, they are supported in [our Pro version](https://www.contentviewspro.com/?ut
|
|
166 |
|
167 |
== Changelog ==
|
168 |
|
|
|
|
|
|
|
169 |
= 2.5.0 - 2022/11/08 =
|
170 |
- Create "Content Views" block in the Block editor. Now you can add a view as block or shortcode.
|
171 |
- Prevent a compatible issue caused by another plugin
|
4 |
Tags: post grid, grid plugin, grid, latest post, display post, post list, post, page, category, responsive, list, thumbnail
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 6.1
|
7 |
+
Stable tag: 2.5.0.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
35 |
There are 3 simple steps to design your post grid by Content Views:
|
36 |
* Step 1: Filter any posts you want to show (with many possible options: ID, category, tag, author, keyword, status).
|
37 |
* Step 2: Select a beautiful grid or list layout to display your posts. You can customize the layout in your way with many useful settings.
|
38 |
+
* Step 3: Add the created grid as block or shortcode to anywhere you want to display your post grid.
|
39 |
|
40 |
[youtube https://www.youtube.com/watch?v=drxqtCiaw4I]
|
41 |
|
47 |
* 100% Responsive and Mobile Friendly
|
48 |
* SEO friendly and optimized for speed
|
49 |
* Pagination support
|
50 |
+
* Display grid of posts on WordPress page, widget, theme template easily
|
51 |
* Display recent posts
|
52 |
* Display posts from a specific category, tag, author, ID
|
53 |
* Display posts that contain a specific keyword
|
146 |
|
147 |
= How to use View on my home page? =
|
148 |
|
149 |
+
If you are using a static page as home page, you should add Content Views block or shortcode to editor of that page.
|
150 |
If you are using "Your latest posts" as home page, you should paste this code `<?php echo do_shortcode("[pt_view id=VIEW_ID]"); ?>` to a theme file: `front-page.php` or `home.php` or `index.php`.
|
151 |
|
152 |
= Does it support custom post type, custom taxonomy, custom field? =
|
166 |
|
167 |
== Changelog ==
|
168 |
|
169 |
+
= 2.5.0.1 - 2022/11/23 =
|
170 |
+
* Prevent potential conflict in the block editor
|
171 |
+
|
172 |
= 2.5.0 - 2022/11/08 =
|
173 |
- Create "Content Views" block in the Block editor. Now you can add a view as block or shortcode.
|
174 |
- Prevent a compatible issue caused by another plugin
|
blocks/index.js
DELETED
@@ -1,90 +0,0 @@
|
|
1 |
-
|
2 |
-
const { createElement } = wp.element;
|
3 |
-
const { registerBlockType } = wp.blocks;
|
4 |
-
const { serverSideRender: ServerSideRender } = wp;
|
5 |
-
const { InspectorControls } = wp.blockEditor || wp.editor;
|
6 |
-
const { SelectControl, PanelBody } = wp.components;
|
7 |
-
|
8 |
-
registerBlockType( 'content-views/block', {
|
9 |
-
title: ContentViewsBlock.texts.title,
|
10 |
-
description: ContentViewsBlock.texts.description,
|
11 |
-
icon: createElement( 'svg', { xmlms: 'http://www.w3.org/2000/svg', width: 24, height: 24 }, createElement( 'image', { href: ContentViewsBlock.block_icon } ) ),
|
12 |
-
category: 'widgets',
|
13 |
-
keywords: ContentViewsBlock.texts.keywords,
|
14 |
-
|
15 |
-
attributes: {
|
16 |
-
viewId: {
|
17 |
-
type: 'string'
|
18 |
-
}
|
19 |
-
},
|
20 |
-
supports: {
|
21 |
-
// Removes support for an HTML mode.
|
22 |
-
// html: false,
|
23 |
-
},
|
24 |
-
edit: function ( props ) {
|
25 |
-
const attributes = props.attributes;
|
26 |
-
|
27 |
-
var elements = [], inspect_elements = [];
|
28 |
-
|
29 |
-
var select_view = createElement(
|
30 |
-
SelectControl,
|
31 |
-
{
|
32 |
-
key: 'cvblock_select',
|
33 |
-
label: ContentViewsBlock.texts.title,
|
34 |
-
value: attributes.viewId,
|
35 |
-
onChange: function ( value ) {
|
36 |
-
props.setAttributes( { viewId: value } );
|
37 |
-
},
|
38 |
-
options: ContentViewsBlock.views_list
|
39 |
-
}
|
40 |
-
);
|
41 |
-
|
42 |
-
// Inspect Controls
|
43 |
-
inspect_elements.push( select_view );
|
44 |
-
|
45 |
-
if ( attributes.viewId ) {
|
46 |
-
inspect_elements.push( createElement(
|
47 |
-
'a',
|
48 |
-
{
|
49 |
-
key: 'cvblock_edit',
|
50 |
-
href: ContentViewsBlock.edit_link.replace( 'VIEWID', attributes.viewId ),
|
51 |
-
target: '_blank'
|
52 |
-
},
|
53 |
-
ContentViewsBlock.texts.edit
|
54 |
-
) );
|
55 |
-
}
|
56 |
-
|
57 |
-
elements.push( createElement(
|
58 |
-
InspectorControls,
|
59 |
-
{ key: 'cvblock_controls' },
|
60 |
-
createElement(
|
61 |
-
PanelBody,
|
62 |
-
{
|
63 |
-
key: 'cvblock_controls_body'
|
64 |
-
},
|
65 |
-
inspect_elements
|
66 |
-
)
|
67 |
-
) );
|
68 |
-
|
69 |
-
// Editor
|
70 |
-
if ( attributes.viewId ) {
|
71 |
-
elements.push( createElement(
|
72 |
-
ServerSideRender,
|
73 |
-
{
|
74 |
-
key: 'cvblock_preview',
|
75 |
-
block: 'content-views/block',
|
76 |
-
attributes: attributes
|
77 |
-
}
|
78 |
-
) );
|
79 |
-
} else {
|
80 |
-
elements.push( select_view );
|
81 |
-
}
|
82 |
-
|
83 |
-
return createElement(
|
84 |
-
'div', { className: 'content-views-block' }, elements
|
85 |
-
);
|
86 |
-
},
|
87 |
-
save: function () {
|
88 |
-
return null;
|
89 |
-
}
|
90 |
-
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
blocks/index.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(){const{createElement:s}=wp.element,{registerBlockType:e}=wp.blocks;var{serverSideRender:c}=wp,{InspectorControls:l}=wp.blockEditor||wp.editor,{SelectControl:r,PanelBody:w}=wp.components;e("content-views/block",{title:ContentViewsBlock.texts.title,description:ContentViewsBlock.texts.description,icon:s("svg",{xmlms:"http://www.w3.org/2000/svg",width:24,height:24},s("image",{href:ContentViewsBlock.block_icon})),category:"widgets",keywords:ContentViewsBlock.texts.keywords,attributes:{viewId:{type:"string"}},supports:{},edit:function(t){var e=t.attributes,o=[],n=[],i=s(r,{key:"cvblock_select",label:ContentViewsBlock.texts.title,value:e.viewId,onChange:function(e){t.setAttributes({viewId:e})},options:ContentViewsBlock.views_list});return n.push(i),e.viewId&&n.push(s("a",{key:"cvblock_edit",href:ContentViewsBlock.edit_link.replace("VIEWID",e.viewId),target:"_blank"},ContentViewsBlock.texts.edit)),o.push(s(l,{key:"cvblock_controls"},s(w,{key:"cvblock_controls_body"},n))),e.viewId?o.push(s(c,{key:"cvblock_preview",block:"content-views/block",attributes:e})):o.push(i),s("div",{className:"content-views-block"},o)},save:function(){return null}})}();
|
blocks/main.php
CHANGED
@@ -26,7 +26,7 @@ function contentviews_block_init() {
|
|
26 |
|
27 |
wp_register_script(
|
28 |
'contentviews-block-script',
|
29 |
-
plugins_url( 'index.js', __FILE__ ),
|
30 |
array(
|
31 |
'wp-blocks',
|
32 |
'wp-i18n',
|
26 |
|
27 |
wp_register_script(
|
28 |
'contentviews-block-script',
|
29 |
+
plugins_url( 'index.min.js', __FILE__ ),
|
30 |
array(
|
31 |
'wp-blocks',
|
32 |
'wp-i18n',
|
content-views.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Plugin Name: Content Views
|
11 |
* Plugin URI: http://wordpress.org/plugins/content-views-query-and-display-post-page/
|
12 |
* Description: Query and display <strong>posts, pages</strong> in awesome layouts (<strong>grid, scrollable list, collapsible list</strong>) easier than ever, without coding!
|
13 |
-
* Version: 2.5.0
|
14 |
* Author: Content Views
|
15 |
* Author URI: http://profiles.wordpress.org/pt-guy
|
16 |
* Text Domain: content-views-query-and-display-post-page
|
@@ -24,7 +24,7 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
24 |
}
|
25 |
|
26 |
// Define Constant
|
27 |
-
define( 'PT_CV_VERSION', '2.5.0' );
|
28 |
define( 'PT_CV_FILE', __FILE__ );
|
29 |
define( 'PT_CV_PATH', plugin_dir_path( __FILE__ ) );
|
30 |
include_once( PT_CV_PATH . 'includes/defines.php' );
|
10 |
* Plugin Name: Content Views
|
11 |
* Plugin URI: http://wordpress.org/plugins/content-views-query-and-display-post-page/
|
12 |
* Description: Query and display <strong>posts, pages</strong> in awesome layouts (<strong>grid, scrollable list, collapsible list</strong>) easier than ever, without coding!
|
13 |
+
* Version: 2.5.0.1
|
14 |
* Author: Content Views
|
15 |
* Author URI: http://profiles.wordpress.org/pt-guy
|
16 |
* Text Domain: content-views-query-and-display-post-page
|
24 |
}
|
25 |
|
26 |
// Define Constant
|
27 |
+
define( 'PT_CV_VERSION', '2.5.0.1' );
|
28 |
define( 'PT_CV_FILE', __FILE__ );
|
29 |
define( 'PT_CV_PATH', plugin_dir_path( __FILE__ ) );
|
30 |
include_once( PT_CV_PATH . 'includes/defines.php' );
|