Tagged: avia editor
Hi,
This is developer specific question. I’m adding custom functions via My Custom functions plugin. I need to determine if a post is built with the Avia editor or default WordPress editor. How can I do this? Is there any hook or filter?
Ex: I need to do something like this
if(is_post_built_with_avia_editor) {
// my custom code
}
Hi mbaumannusa!
Thank you for using Enfold.
For the frontend, please use this:
global $post;
$builder = get_post_meta($post->ID, '_avia_builder_shortcode_tree', true);
if($builder != '')
{
// do something
}
In the actual advance layout builder panel:
$helper = new AviaHelper;
$status = $helper::builder_status($post_ID);
if(!empty($post_ID) && $status == 'active')
{
// do something
}
Regards,
Ismael
Thanks.
I used the frontend solution. It works great!