Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #757260

    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
    }

    #757458

    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

    #757770

    Thanks.

    I used the frontend solution. It works great!

    • This reply was modified 7 years, 9 months ago by mbaumannusa.
    #758215

    Hey!

    No problem. Let us know if you need anything else. :)

    Regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Is there a hook or filter to determine if the post is built with the Avia editor’ is closed to new replies.