<?php
namespace SabaiApps\Directories\Component\Entity\WordPressBlock;

use SabaiApps\Directories\Component\WordPress\Block\AbstractBlock;

class EntityWordPressBlock extends AbstractBlock {

	protected function _wordpressBlockInfo() {
		return array(
			'title'            => _x( 'Detailed Display', 'WordPress block name', 'directories-pro' ),
			'description'      => __( 'Displays the Detailed display of current content item.', 'directories-pro' ),
			'package'          => 'directories-pro',
			'icon'             => 'media-document',
			'single_only'      => true,
			'site_editor_only' => true,
		);
	}

	public function wordpressBlockRender( array $attributes, $content, $isBlockEditorRequest ) {
		return $isBlockEditorRequest ? null : do_shortcode( '[drts-entity]' );
	}
}
