| 1 |
<?php |
| 2 |
|
| 3 |
// Exit if accessed directly. |
| 4 |
defined( 'ABSPATH' ) || exit; |
| 5 |
|
| 6 |
if ( ! class_exists( 'Qi_Blocks_Faq_Block' ) ) { |
| 7 |
class Qi_Blocks_Faq_Block extends Qi_Blocks_Blocks { |
| 8 |
private static $instance; |
| 9 |
|
| 10 |
public function __construct() { |
| 11 |
// Set block data |
| 12 |
$this->set_block_name( 'faq' ); |
| 13 |
$this->set_block_title( esc_html__( 'FAQs', 'qi-blocks' ) ); |
| 14 |
$this->set_block_subcategory( esc_html__( 'SEO', 'qi-blocks' ) ); |
| 15 |
$this->set_block_demo_url( 'https://qodeinteractive.com/qi-blocks-for-gutenberg/faqs/' ); |
| 16 |
$this->set_block_documentation( 'https://qodeinteractive.com/qi-blocks-for-gutenberg/documentation/#faq' ); |
| 17 |
|
| 18 |
// Set block 3rd party scripts |
| 19 |
$this->set_block_3rd_party_scripts( |
| 20 |
array( |
| 21 |
'jquery-ui-accordion' => array( |
| 22 |
'block_name' => 'faq', |
| 23 |
'url' => 'core', |
| 24 |
), |
| 25 |
) |
| 26 |
); |
| 27 |
|
| 28 |
parent::__construct(); |
| 29 |
} |
| 30 |
|
| 31 |
/** |
| 32 |
* @return Qi_Blocks_Faq_Block |
| 33 |
*/ |
| 34 |
public static function get_instance() { |
| 35 |
if ( is_null( self::$instance ) ) { |
| 36 |
self::$instance = new self(); |
| 37 |
} |
| 38 |
|
| 39 |
return self::$instance; |
| 40 |
} |
| 41 |
} |
| 42 |
|
| 43 |
Qi_Blocks_Faq_Block::get_instance(); |
| 44 |
} |
| 45 |
|