LLMS_Blocks_Course_Syllabus_Block

Course syllabus block class.


Source Source

File: libraries/lifterlms-blocks/includes/blocks/class-llms-blocks-course-syllabus-block.php

	/**
	 * Block ID.
	 *
	 * @var string
	 */
	protected $id = 'course-syllabus';

	/**
	 * Is block dynamic (rendered in PHP).
	 *
	 * @since 2.5.0 Changed to `false` to prevent the block from being registered.
	 *
	 * @var bool
	 */
	protected $is_dynamic = false;

	/**
	 * Add actions attached to the render function action.
	 *
	 * @since 1.0.0
	 * @deprecated 2.5.0
	 *
	 * @param array  $attributes Optional. Block attributes. Default empty array.
	 * @param string $content    Optional. Block content. Default empty string.
	 * @return void
	 */
	public function add_hooks( $attributes = array(), $content = '' ) {
		llms_deprecated_function( __METHOD__, '2.5.0' );

		add_action( $this->get_render_hook(), 'lifterlms_template_single_syllabus', 10 );
	}

	/**
	 * Retrieve custom block attributes.
	 * Necessary to override when creating ServerSideRender blocks.
	 *
	 * @since 1.0.0
	 * @deprecated 2.5.0
	 *
	 * @return array
	 */
	public function get_attributes() {
		llms_deprecated_function( __METHOD__, '2.5.0' );

		return array_merge(
			parent::get_attributes(),
			array(
				'course_id' => array(
					'type'    => 'int',
					'default' => 0,
				),


Top ↑

Methods Methods


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.