Version Description
- Fix category error in Post Grid block.
- Change asset loading for WordPress 5.0.
Download this release
Release Info
Developer | atomicblocks |
Plugin | Atomic Blocks – Gutenberg Blocks Collection |
Version | 1.4.2 |
Comparing to | |
See all releases |
Code changes from version 1.4.0 to 1.4.2
- README.md +236 -0
- README.txt +8 -1
- atomicblocks.php +1 -1
- dist/init.php +10 -65
- src/blocks/block-post-grid/index.php +4 -1
README.md
ADDED
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
## Page building blocks for the new WordPress editor.
|
2 |
+
|
3 |
+
Atomic Blocks is a collection of content blocks for the new [Gutenberg block editor](https://atomicblocks.com/beginners-guide-gutenberg/?utm_source=WP.org%20Description%20Gberg%20Link&utm_campaign=wporg_desc_gberg_link). Blocks are chunks of content such as paragraphs, images, galleries, columns, and more. Building blocks give you more control to quickly create and launch any kind of site you want!
|
4 |
+
|
5 |
+
Along with the content blocks you'll find in Atomic Blocks, we're also publishing helpful articles and tutorials to help you get started with Gutenberg. Visit the [Atomic Blocks blog](https://atomicblocks.com/blog/) to learn more today!
|
6 |
+
|
7 |
+
## Atomic Blocks currently includes the following blocks:
|
8 |
+
|
9 |
+
* Post Grid Block - [Block Demo](https://atomicblocks.com/blocks/post-grid-block/)
|
10 |
+
* Container Block - [Block Demo](https://atomicblocks.com/blocks/container-block/)
|
11 |
+
* Testimonial Block - [Block Demo](https://atomicblocks.com/blocks/testimonial-block/)
|
12 |
+
* Inline Notice Block - [Block Demo](https://atomicblocks.com/blocks/inline-notice-block/)
|
13 |
+
* Accordion Block - [Block Demo](https://atomicblocks.com/blocks/accordion-block/)
|
14 |
+
* Share Icons Block - [Block Demo](https://atomicblocks.com/blocks/sharing-icons-block/)
|
15 |
+
* Call-To-Action Block - [Block Demo](https://atomicblocks.com/blocks/call-to-action-block/)
|
16 |
+
* Customizable Button Block - [Block Demo](https://atomicblocks.com/blocks/customizable-button-block/)
|
17 |
+
* Spacer & Divider Block - [Block Demo](https://atomicblocks.com/blocks/spacer-and-divider-block/)
|
18 |
+
* Author Profile Block - [Block Demo](https://atomicblocks.com/blocks/author-profile-block/)
|
19 |
+
* Drop Cap Block - [Block Demo](https://atomicblocks.com/blocks/drop-cap-block/)
|
20 |
+
|
21 |
+
## Atomic Blocks Help File
|
22 |
+
|
23 |
+
We've created a handy help file that you can [check out here](https://atomicblocks.com/plugin-help-file/?utm_source=WP.org%20AB%20Help%20File&utm_campaign=wporg_ab_help_file). The help file covers how to setup the plugin and get started with the blocks.
|
24 |
+
|
25 |
+
The help file is also available in the plugin once activated. Click the Atomic Blocks admin menu item to visit the Getting Started page.
|
26 |
+
|
27 |
+
[View the plugin help file](https://atomicblocks.com/plugin-help-file/?utm_source=WP.org%20AB%20Help%20File&utm_campaign=wporg_ab_help_file)
|
28 |
+
|
29 |
+
## Atomic Blocks WordPress Theme
|
30 |
+
|
31 |
+
We've created a beautiful little WordPress theme to help you get started with the Atomic Blocks plugin and the new WordPress block editor. The theme integrates seamlessly with the blocks you'll find in the plugin!
|
32 |
+
|
33 |
+
* [Atomic Blocks Theme Demo](https://preview.arraythemes.com/atomicblocks/?utm_source=WP.org%20AB%20Theme%20Demo%20Link&utm_campaign=wporg_ab_theme_demo_link)
|
34 |
+
* [Download the Atomic Blocks Theme](https://atomicblocks.com/?utm_source=WP.org%20AB%20Page&utm_campaign=wporg_ab_page)
|
35 |
+
* [View the theme help file](https://atomicblocks.com/theme-help-file/?utm_source=WP.org%20AB%20Theme%20Help%20File%20Link&utm_campaign=wporg_ab_theme_help_link)
|
36 |
+
|
37 |
+
## Follow Along:
|
38 |
+
|
39 |
+
* [Visit the Atomic Blocks site](https://atomicblocks.com/?utm_source=WP.org%20AB%20Page&utm_campaign=wporg_ab_page)
|
40 |
+
* [Subscribe to the newsletter](https://atomicblocks.com/subscribe?utm_source=WP.org%20AB%20Subscribe&utm_campaign=wporg_ab_subscribe)
|
41 |
+
* [Follow on Twitter](https://twitter.com/atomicblocks)
|
42 |
+
* [Create-Guten-Block](https://github.com/ahmadawais/create-guten-block)
|
43 |
+
|
44 |
+
## Installation
|
45 |
+
|
46 |
+
This plugin can be installed directly from your site.
|
47 |
+
|
48 |
+
1. Log in and navigate to _Plugins → Add New_.
|
49 |
+
2. Type "Atomic Blocks" into the Search and hit Enter.
|
50 |
+
3. Locate the Atomic Blocks plugin in the list of search results and click **Install Now**.
|
51 |
+
4. Once installed, click the Activate link.
|
52 |
+
5. You will be redirected to the Atomic Blocks Getting Started page.
|
53 |
+
|
54 |
+
It can also be installed manually.
|
55 |
+
|
56 |
+
1. Download the Atomic Blocks plugin from WordPress.org.
|
57 |
+
2. Unzip the package and move to your plugins directory.
|
58 |
+
3. Log into WordPress and navigate to the Plugins screen.
|
59 |
+
4. Locate Atomic Blocks in the list and click the *Activate* link.
|
60 |
+
5. You will be redirected to the Atomic Blocks Getting Started page.
|
61 |
+
|
62 |
+
## Frequently Asked Questions
|
63 |
+
|
64 |
+
**Can Atomic Blocks be used with any theme?**
|
65 |
+
|
66 |
+
Yes, you can use Atomic Blocks with any theme, but we recommend using our [Atomic Blocks](https://atomicblocks.com/?utm_source=WP.org%20AB%20Page&utm_campaign=wporg_ab_page) theme for the best presentation. The Atomic Blocks theme has beautiful styles built in specifically for these blocks.
|
67 |
+
|
68 |
+
[Get the Atomic Blocks theme](https://atomicblocks.com/?utm_source=WP.org%20AB%20Theme%20Link&utm_campaign=wporg_ab_theme_link)
|
69 |
+
|
70 |
+
**Do I need Gutenberg to use Atomic Blocks?**
|
71 |
+
|
72 |
+
Yes, you will need to install the [Gutenberg plugin](https://wordpress.org/plugins/gutenberg/) to use Atomic Blocks. Eventually, Gutenberg (the block editor) will be merged into WordPress and you won't need the plugin.
|
73 |
+
|
74 |
+
## Changelog
|
75 |
+
|
76 |
+
**1.4.2**
|
77 |
+
* Fix category error in Post Grid block.
|
78 |
+
* Change asset loading for WordPress 5.0.
|
79 |
+
|
80 |
+
**1.4.1**
|
81 |
+
* Fix FontAwesome loading issue.
|
82 |
+
|
83 |
+
**1.4.0**
|
84 |
+
* Add block dependencies to wp_enqueue_script
|
85 |
+
|
86 |
+
**1.3.9**
|
87 |
+
* Fix behavior of attribute output
|
88 |
+
* Restrict media upload to images
|
89 |
+
* Update French translation strings
|
90 |
+
|
91 |
+
**1.3.8**
|
92 |
+
* Improved Getting Started page.
|
93 |
+
* Update translation strings.
|
94 |
+
|
95 |
+
**1.3.7**
|
96 |
+
* Update translation strings.
|
97 |
+
* Limit asset loading to GS page.
|
98 |
+
* Add conditional check to post grid.
|
99 |
+
* Add french translations.
|
100 |
+
|
101 |
+
**1.3.6**
|
102 |
+
* Update PanelColor component to PanelColorSettings.
|
103 |
+
|
104 |
+
**1.3.5**
|
105 |
+
* Fix button focus bug in Call To Action block.
|
106 |
+
* Fix button focus bug in Button block.
|
107 |
+
* Fix text focus bug in Author Profile block.
|
108 |
+
|
109 |
+
**1.3.4**
|
110 |
+
* Convert Accordion Block text area to InnerBlocks to allow for adding any block.
|
111 |
+
|
112 |
+
**1.3.3**
|
113 |
+
* Update FontAwesome to 5.2.0.
|
114 |
+
* Move dynamic block PHP to src folder.
|
115 |
+
* Add option to customize Read More link text in Post Grid block.
|
116 |
+
|
117 |
+
**1.3.2**
|
118 |
+
* Fix category drop down on Post Grid block.
|
119 |
+
* Fix path to fontawesome on Getting Started page.
|
120 |
+
|
121 |
+
**1.3.1**
|
122 |
+
* Fix bug in Post Grid block that prevented it from displaying in the editor.
|
123 |
+
* Fix window.userSettings is undefined error.
|
124 |
+
* Fix bug in dismissable notice.
|
125 |
+
|
126 |
+
**1.3.0**
|
127 |
+
* Fix padding increments on Container block.
|
128 |
+
* Improve color display on Call To Action block text.
|
129 |
+
|
130 |
+
**1.2.9**
|
131 |
+
* Convert saved RichText to RichText.Content.
|
132 |
+
* Prepare blocks for toolbar formatting.
|
133 |
+
|
134 |
+
**1.2.8**
|
135 |
+
* Fix focus bug on Testimonial block title.
|
136 |
+
|
137 |
+
**1.2.7**
|
138 |
+
* Fix the URLInput on the Button block.
|
139 |
+
|
140 |
+
**1.2.6**
|
141 |
+
* Remove unnecessary state from blocks.
|
142 |
+
* Improve call to decodeEntities.
|
143 |
+
* Update URLInput.
|
144 |
+
|
145 |
+
**1.2.5**
|
146 |
+
* Fix links in readme.txt.
|
147 |
+
* Fix update notice CSS bug.
|
148 |
+
|
149 |
+
**1.2.4**
|
150 |
+
* Add max width setting to Container block.
|
151 |
+
|
152 |
+
**1.2.3**
|
153 |
+
* Add Container Block.
|
154 |
+
* Fix toolbar focus bug on Accordion Block.
|
155 |
+
|
156 |
+
**1.2.2**
|
157 |
+
* Add blocks to a custom Atomic Blocks category in the block inserter.
|
158 |
+
* Clean up markup and remove unnecessary code.
|
159 |
+
* Add inline toolbar to text area on relevant blocks.
|
160 |
+
|
161 |
+
**1.2.1**
|
162 |
+
* Update blocks to work with Gutenberg 3.1.0.
|
163 |
+
|
164 |
+
**1.2.0**
|
165 |
+
* Fix fatal error in last update.
|
166 |
+
|
167 |
+
**1.1.9**
|
168 |
+
* Add Post Grid Block.
|
169 |
+
* Add improvements for Gutenberg 3.0.
|
170 |
+
* Clean up existing blocks.
|
171 |
+
|
172 |
+
**1.1.8**
|
173 |
+
* Improve margins for blocks in editor.
|
174 |
+
* Fix quirks in the drop cap block.
|
175 |
+
|
176 |
+
**1.1.7**
|
177 |
+
* Remove unnecessary isSelected from controls.
|
178 |
+
* Fix undefined post bug.
|
179 |
+
* Move components to wp.editor.
|
180 |
+
* Improve styles for URL input on button block.
|
181 |
+
|
182 |
+
**1.1.6**
|
183 |
+
* Rename array_social_icon_footer_script() to atomic_blocks_social_icon_footer_script().
|
184 |
+
|
185 |
+
**1.1.5**
|
186 |
+
* Improved the color palettes for changes that happened in Gutenberg 2.8.
|
187 |
+
|
188 |
+
**1.1.4**
|
189 |
+
* Add the sharing icons block.
|
190 |
+
|
191 |
+
**1.1.3**
|
192 |
+
* Replace props.focus with isSelected for Gutenberg 2.8.0.
|
193 |
+
|
194 |
+
**1.1.2**
|
195 |
+
* Refactor the CTA block.
|
196 |
+
* Refactor the Author Profile block.
|
197 |
+
|
198 |
+
**1.1.1**
|
199 |
+
* Improve Author Profile block to fix text focus and spacing.
|
200 |
+
|
201 |
+
**1.1.0**
|
202 |
+
* Add Call-To-Action Block.
|
203 |
+
* Improve wide and full-width styles.
|
204 |
+
|
205 |
+
**1.0.9**
|
206 |
+
* Define PanelBody to fix Drop Cap block error.
|
207 |
+
|
208 |
+
**1.0.8**
|
209 |
+
* Add FontAwesome font library back to Getting Started page.
|
210 |
+
* Add prefixes to Getting Started page styles to prevent conflicts.
|
211 |
+
|
212 |
+
**1.0.7**
|
213 |
+
* Improve Quick Start box on the Getting Started page.
|
214 |
+
* Fix issue with FontAwesome not loading on Getting Started page.
|
215 |
+
|
216 |
+
**1.0.6**
|
217 |
+
* Add PanelBody to inspector controls.
|
218 |
+
* Group social links together in Profile block.
|
219 |
+
|
220 |
+
**1.0.5**
|
221 |
+
* Fix the Button block to remove formatting issue.
|
222 |
+
|
223 |
+
**1.0.4**
|
224 |
+
* Fix the Accordion block bug where outputs don't match.
|
225 |
+
|
226 |
+
**1.0.3**
|
227 |
+
* Add the Accordion block.
|
228 |
+
|
229 |
+
**1.0.2**
|
230 |
+
* Add the Spacer & Divider block.
|
231 |
+
|
232 |
+
**1.0.1**
|
233 |
+
* Add the Customizable Button block.
|
234 |
+
|
235 |
+
**1.0**
|
236 |
+
* Initial release.
|
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://atomicblocks.com
|
|
4 |
Tags: gutenberg, blocks, page builder, gutenberg blocks, editor, atomicblocks, builder, wordpress 5.0, options
|
5 |
Requires at least: 4.7
|
6 |
Tested up to: 4.9.5
|
7 |
-
Stable tag: 1.4.
|
8 |
Requires PHP: 5.2.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -95,6 +95,13 @@ Yes, you will need to install the [Gutenberg plugin](https://wordpress.org/plugi
|
|
95 |
|
96 |
== Changelog ==
|
97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
= 1.4.0 =
|
99 |
* Add block dependencies to wp_enqueue_script
|
100 |
|
4 |
Tags: gutenberg, blocks, page builder, gutenberg blocks, editor, atomicblocks, builder, wordpress 5.0, options
|
5 |
Requires at least: 4.7
|
6 |
Tested up to: 4.9.5
|
7 |
+
Stable tag: 1.4.2
|
8 |
Requires PHP: 5.2.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
95 |
|
96 |
== Changelog ==
|
97 |
|
98 |
+
= 1.4.2 =
|
99 |
+
* Fix category error in Post Grid block.
|
100 |
+
* Change asset loading for WordPress 5.0.
|
101 |
+
|
102 |
+
= 1.4.1 =
|
103 |
+
* Fix FontAwesome loading issue.
|
104 |
+
|
105 |
= 1.4.0 =
|
106 |
* Add block dependencies to wp_enqueue_script
|
107 |
|
atomicblocks.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: A beautiful collection of handy Gutenberg blocks to help you get started with the new WordPress editor.
|
6 |
* Author: atomicblocks
|
7 |
* Author URI: http://arraythemes.com
|
8 |
-
* Version: 1.4.
|
9 |
* License: GPL2+
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
11 |
*
|
5 |
* Description: A beautiful collection of handy Gutenberg blocks to help you get started with the new WordPress editor.
|
6 |
* Author: atomicblocks
|
7 |
* Author URI: http://arraythemes.com
|
8 |
+
* Version: 1.4.2
|
9 |
* License: GPL2+
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
11 |
*
|
dist/init.php
CHANGED
@@ -23,22 +23,22 @@ function atomic_blocks_block_assets() {
|
|
23 |
$postfix = ( SCRIPT_DEBUG == true ) ? '' : '.min';
|
24 |
|
25 |
// Load the compiled styles
|
26 |
-
|
27 |
'atomic-blocks-style-css',
|
28 |
plugins_url( 'dist/blocks.style.build.css', dirname( __FILE__ ) ),
|
29 |
-
array(
|
30 |
filemtime( plugin_dir_path( __FILE__ ) . 'blocks.style.build.css' )
|
31 |
);
|
32 |
|
33 |
// Load the FontAwesome icon library
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
}
|
41 |
-
add_action( '
|
42 |
|
43 |
|
44 |
/**
|
@@ -104,59 +104,4 @@ add_filter( 'block_categories', function( $categories, $post ) {
|
|
104 |
),
|
105 |
)
|
106 |
);
|
107 |
-
}, 10, 2 );
|
108 |
-
|
109 |
-
|
110 |
-
// Add template to testimonial post type
|
111 |
-
function atomic_blocks_testimonial_templates( $args, $post_type ) {
|
112 |
-
|
113 |
-
if ( 'atomic-testimonial' == $post_type ) {
|
114 |
-
// Lock the template
|
115 |
-
$args['template_lock'] = true;
|
116 |
-
|
117 |
-
// Setup the template
|
118 |
-
$args['template'] = array(
|
119 |
-
array(
|
120 |
-
'atomic/atomic-testimonial'
|
121 |
-
)
|
122 |
-
);
|
123 |
-
}
|
124 |
-
return $args;
|
125 |
-
}
|
126 |
-
//add_filter( 'register_post_type_args', 'atomic_blocks_testimonial_templates', 20, 2 );
|
127 |
-
|
128 |
-
|
129 |
-
// Render the testimonial posts for the frontend
|
130 |
-
function atomic_blocks_testimonial_list_render( $attributes ) {
|
131 |
-
|
132 |
-
$posts = (array) wp_get_recent_posts( array(
|
133 |
-
'numberposts' => 5,
|
134 |
-
'post_status' => 'publish',
|
135 |
-
) );
|
136 |
-
|
137 |
-
if ( count( $posts ) === 0 ) {
|
138 |
-
return __( 'No posts', 'atomic-blocks' );
|
139 |
-
}
|
140 |
-
|
141 |
-
$markup = '<ul>';
|
142 |
-
foreach( $posts as $post ) {
|
143 |
-
|
144 |
-
$markup .= sprintf(
|
145 |
-
'<li><a class="atomic-blocks-latest-post" href="%1$s">%2$s</a></li>',
|
146 |
-
esc_url( get_permalink( $post['ID'] ) ),
|
147 |
-
esc_html( get_the_title( $post['ID'] ) )
|
148 |
-
);
|
149 |
-
|
150 |
-
}
|
151 |
-
|
152 |
-
return $markup;
|
153 |
-
}
|
154 |
-
|
155 |
-
|
156 |
-
// Hook the post rendering to the block
|
157 |
-
if ( function_exists( 'register_block_type' ) ) :
|
158 |
-
// Hook a render function to the testimonial block
|
159 |
-
register_block_type( 'atomic/atomic-testimonial-list', array(
|
160 |
-
'render_callback' => 'atomic_blocks_testimonial_list_render',
|
161 |
-
) );
|
162 |
-
endif;
|
23 |
$postfix = ( SCRIPT_DEBUG == true ) ? '' : '.min';
|
24 |
|
25 |
// Load the compiled styles
|
26 |
+
wp_register_style(
|
27 |
'atomic-blocks-style-css',
|
28 |
plugins_url( 'dist/blocks.style.build.css', dirname( __FILE__ ) ),
|
29 |
+
array(),
|
30 |
filemtime( plugin_dir_path( __FILE__ ) . 'blocks.style.build.css' )
|
31 |
);
|
32 |
|
33 |
// Load the FontAwesome icon library
|
34 |
+
wp_enqueue_style(
|
35 |
+
'atomic-blocks-fontawesome',
|
36 |
+
plugins_url( 'dist/assets/fontawesome/css/all' . $postfix . '.css', dirname( __FILE__ ) ),
|
37 |
+
array(),
|
38 |
+
filemtime( plugin_dir_path( __FILE__ ) . 'assets/fontawesome/css/all.css' )
|
39 |
+
);
|
40 |
}
|
41 |
+
add_action( 'init', 'atomic_blocks_block_assets' );
|
42 |
|
43 |
|
44 |
/**
|
104 |
),
|
105 |
)
|
106 |
);
|
107 |
+
}, 10, 2 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/blocks/block-post-grid/index.php
CHANGED
@@ -10,12 +10,15 @@
|
|
10 |
* Renders the post grid block on server.
|
11 |
*/
|
12 |
function atomic_blocks_render_block_core_latest_posts( $attributes ) {
|
|
|
|
|
|
|
13 |
$recent_posts = wp_get_recent_posts( array(
|
14 |
'numberposts' => $attributes['postsToShow'],
|
15 |
'post_status' => 'publish',
|
16 |
'order' => $attributes['order'],
|
17 |
'orderby' => $attributes['orderBy'],
|
18 |
-
'category' => $
|
19 |
), 'OBJECT' );
|
20 |
|
21 |
$list_items_markup = '';
|
10 |
* Renders the post grid block on server.
|
11 |
*/
|
12 |
function atomic_blocks_render_block_core_latest_posts( $attributes ) {
|
13 |
+
|
14 |
+
$categories = isset( $attributes['categories'] ) ? $attributes['categories'] : '';
|
15 |
+
|
16 |
$recent_posts = wp_get_recent_posts( array(
|
17 |
'numberposts' => $attributes['postsToShow'],
|
18 |
'post_status' => 'publish',
|
19 |
'order' => $attributes['order'],
|
20 |
'orderby' => $attributes['orderBy'],
|
21 |
+
'category' => $categories,
|
22 |
), 'OBJECT' );
|
23 |
|
24 |
$list_items_markup = '';
|