Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Admin_Builder::handle_post_locking( int $course_id )

Do post locking stuff on the builder


Description Description

Locking the course edit main screen will lock the builder and vice versa… probably need to find a way to fix that but for now this’ll work just fine and if you’re unhappy about it, well, sorry…


Top ↑

Parameters Parameters

$course_id

(int) (Required) WP Post ID.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/admin/class.llms.admin.builder.php

404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
private static function handle_post_locking( $course_id ) {
 
    if ( ! wp_check_post_lock( $course_id ) ) {
        $active_post_lock = wp_set_post_lock( $course_id );
    }
 
    ?><input type="hidden" id="post_ID" value="<?php echo absint( $course_id ); ?>">
    <?php
 
    if ( ! empty( $active_post_lock ) ) {
        ?>
<input type="hidden" id="active_post_lock" value="<?php echo esc_attr( implode( ':', $active_post_lock ) ); ?>" />
        <?php
    }
 
    add_filter( 'get_edit_post_link', array( __CLASS__, 'modify_take_over_link' ), 10, 3 );
    add_action( 'admin_footer', '_admin_notice_post_locked' );
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
3.13.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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