creating new ALC block and widget

This commit is contained in:
Amine Ben hammou
2018-05-23 07:37:34 +00:00
parent 4dd17e47ad
commit 0a298f5fad
11 changed files with 845 additions and 18 deletions

View File

@@ -64,16 +64,20 @@ class Renderer {
return $block_class::render($block, $column_count);
}
function processAutomatedLatestContent($args, $column_count) {
function automatedLatestContentTransformedPosts($args) {
$posts_to_exclude = $this->getPosts();
$ALC_posts = $this->ALC->getPosts($args, $posts_to_exclude);
foreach($ALC_posts as $post) {
$posts_to_exclude[] = $post->ID;
}
$transformed_posts = array(
'blocks' => $this->ALC->transformPosts($args, $ALC_posts)
);
$this->setPosts($posts_to_exclude);
return $this->ALC->transformPosts($args, $ALC_posts);
}
function processAutomatedLatestContent($args, $column_count) {
$transformed_posts = array(
'blocks' => $this->automatedLatestContentTransformedPosts($args)
);
$transformed_posts = StylesHelper::applyTextAlignment($transformed_posts);
$rendered_posts = $this->render($transformed_posts, $column_count);
return $rendered_posts;