<?php

    namespace Pixebuilder\Element;
    
    // prevent direct file access
	if( !defined( 'ABSPATH' ) ) exit;

    class Post_Content extends Item{

        static function get_type(){
            return 'post';
        }
        
        static function get_name(){
            return 'post-content';
        }

        static function get_title(){
            return esc_html__('Post Content', 'pixebuilder');
        }

        static function get_icon(){
            return 'content';
        }
        
        static function render_content($settings){

            if( have_posts() ){ the_post(); }

            ob_start();
            the_content();
            $ret = ob_get_clean();
            
            return $ret;
        }

    }

    \Pixe_Builder::register_element('Pixebuilder\Element\Post_Content');
    