array( 'quiz' => array( 'type' => 'string', ), ), 'editor_script' => 'qsm-quiz-block', 'render_callback' => 'qsm_block_render', ) ); } add_action( 'init', 'qsm_block_init' ); /** * The block renderer. * * This simply calls our main shortcode renderer. * * @param array $attributes The attributes that were set on the block. */ function qsm_block_render( $attributes ) { global $qmnQuizManager; return $qmnQuizManager->display_shortcode( $attributes ); }