Additional PRO Hooks

Actions

  1. stm_lms_admin_after_wrapper_start

Description: Allows loading a custom template after the admin LMS wrapper start.

Parameters:

  • $current_user (array) — Current logged-in user data.

Example:

add_action( 'stm_lms_admin_after_wrapper_start', 'stm_lms_admin_after_wrapper_start_function', 10, 1 );

function stm_lms_admin_after_wrapper_start_function( $current_user ) {
	if ( $current_user ) {
		ob_start();
		include plugin_dir_path( __FILE__ ) . '/admin/template/custom-template.php';
		$content = ob_get_clean();
		echo $content;	
	}
}
  1. stm_lms_before_button_mixed

Description: Allows loading a custom template before the mixed button.

Parameters:

  • $course_id (integer) — The course ID.

  1. stm_lms_after_mixed_button_list

Description: Allows loading a custom template after the mixed button list.

Parameters:

  • $course_id (integer)

  1. stm_lms_pro_instead_buttons

Description: The hook allows for loading a custom template in stm_lms_pro_instead_buttons

Parameters:

  • $course_id (integer)

  1. stm_lms_buy_button_end

Description: The hook allows loading a custom template in stm_lms_buy_button_end

Parameters:

  • $course_id (integer)

Filters

  1. stm_lms_allowed_html

Description: Extends the list of allowed HTML tags and attributes.

Parameters:

  • $allowed_html (array)


  1. ms_plugin_get_youtube_idx

Description: Returns the YouTube video URL for lessons.

Parameters:

  • $url (String)


  1. stm_lms_bundle_image_url

Description: Returns the bundle image URL.

Parameters:

  • $image (string)


  1. stm_lms_course_tabs

Description: Loads tabs in courses.

Parameters:

  • $tabs (array)

  • $id (integer)


  1. stm_lms_before_button_stop

Description: Controls whether the Buy button is removed.

Parameters:

  • $stop (boolean)

  • $course_id (integer)


  1. stm_lms_pro_show_button

Description: Determines whether to show the Buy button.

Parameters:

  • $show (boolean)

  • $course_id (integer)


  1. stm_lms_buy_button_auth

Description: Attributes of the purchase button for authorization, used to load the modal.

Parameters:

  • $attributes (array)

  • $post_id (integer)


  1. stm_lms_co_instructor_avatar

Description: Returns the instructor’s avatar.

Parameters:

  • $author_avatar (string)


  1. stm_lms_co_instructor_login

Description: Returns the instructor’s full name.

Parameters:

  • $author_login (string)


Addons Settings

Available filters:

  • stm_lms_course_bundle_settings

  • stm_lms_google_classrooms_settings

  • stm_lms_multi_instructor_settings

  • stm_lms_scorm_settings

  • stm_lms_shareware_settings

  • stm_lms_email_manager_settings

  • stm_lms_enterprise_courses_settings

  • stm_lms_media_library_settings

  • stm_lms_point_system_settings

  • stm_lms_sequential_drip_content_settings

  • stm_lms_udemy_settings

Hooks for configuring addons. Example:

Course Completion Messages

Available filters:

  • masterstudy_lms_course_completed_message

  • masterstudy_lms_course_not_completed_message

Examples:

Last updated

Was this helpful?