public/wordpress/wp-content/plugins/wp-courseware/includes/controllers/units.php
/**
	 * Register Course Unit Comments Support.
	 *
	 * This will allow comments to be supported on units
	 * if the setting is set otherwise it will remove support.
	 *
	 * @since 4.3.0
	 */
Register Course Unit Comments Support.
This will allow comments to be supported on units
if the setting is set otherwise it will remove support.


Register Course Unit Comments Support . This will allow comments to be supported on units if the setting is set otherwise it will remove support .
public function post_type_comments_support() {
		$unit_comments_setting = wpcw_get_setting( 'enable_unit_comments' );
		if ( 'enable_comments' === $unit_comments_setting || 'yes' === $unit_comments_setting ) {
			add_post_type_support( 'course_unit', 'comments' );
		} else {
			remove_post_type_support( 'course_unit', 'comments' );
		}
	}
public function post_type_comments_support ( ) { $ unit_comments_setting = wpcw_get_setting ( 'enable_unit_comments' ) ; if ( 'enable_comments' === $ unit_comments_setting || 'yes' === $ unit_comments_setting ) { add_post_type_support ( 'course_unit' , 'comments' ) ; } else { remove_post_type_support ( 'course_unit' , 'comments' ) ; } }
Register Course Unit Comments Support.
Register Course Unit Comments Support .