Hello
I am trying to create a custom featured block but it's not working here is my code:
<?php
if(!class_exists('WPLMS_Customizer_Plugin_Class'))
{
class WPLMS_Customizer_Plugin_Class // We'll use this just to avoid function name conflicts
{
public function __construct(){
add_filter('vibe_builder_thumb_styles',array($this,'custom_vibe_builder_thumb_styles'));
add_filter('vibe_featured_thumbnail_style',array($this,'custom_vibe_featured_thumbnail_style'),10,3);
} // END public function __construct
public function activate(){
// ADD Custom Code which you want to run when the plugin is activated
}
public function deactivate(){
// ADD Custom Code which you want to run when the plugin is de-activated
}
function custom_vibe_builder_thumb_styles($thumb_array){
$thumb_array['custom_block'] = 'http://xyz/gxrPvvJ.jpg';
return $thumb_array;
}
function custom_vibe_featured_thumbnail_style($thumbnail_html,$post,$style){
if($style == 'custom_block'){ //Custom block is the same name as added for the thumbnail in pagebuilder
$thumbnail_html ='';
$thumbnail_html .= '';
$thumbnail_html .= '';
$thumbnail_html .= $post->post_content;
$thumbnail_html .= '';
$thumbnail_html .= '';
$thumbnail_html .= '
ID).'" title="'.$post->post_title.'">'.$post->post_title.'demo';
$thumbnail_html .= '';
}
return $thumbnail_html;
}
// ADD custom Code in clas
} // END class WPLMS_Customizer_Class
} // END if(!class_exists('WPLMS_Customizer_Class'))
?>