LLMS_Admin_Menus::builder_page_actions()
Handle init actions on the course builder page
Description Description
Used for post-locking redirects when taking over from another user on the course builder page.
Return Return
(void)
Source Source
File: includes/admin/class.llms.admin.menus.php
*/
public function builder_page_actions() {
if ( ! isset( $_GET['page'] ) || 'llms-course-builder' !== $_GET['page'] ) {
return;
}
if ( ! empty( $_GET['get-post-lock'] ) && ! empty( $_GET['course_id'] ) ) {
$post_id = absint( $_GET['course_id'] );
check_admin_referer( 'lock-post_' . $post_id );
wp_set_post_lock( $post_id );
wp_safe_redirect(
add_query_arg(
array(
'page' => 'llms-course-builder',
'course_id' => $post_id,
),
admin_url( 'admin.php' )
)
);
exit();
}
add_action( 'admin_bar_menu', array( 'LLMS_Admin_Builder', 'admin_bar_menu' ), 100, 1 );
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.16.7 | Unknown. |
| 3.13.0 | Introduced. |