Code Duplication    Length = 16-16 lines in 2 locations

includes/class-sensei-lesson.php 1 location

@@ 3657-3672 (lines=16) @@
3654
     *
3655
     * @param $post_id
3656
     */
3657
    public static function flush_rewrite_rules( $post_id ){
3658
3659
        if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE){
3660
3661
            return;
3662
3663
        }
3664
3665
3666
        if( 'lesson' == get_post_type( $post_id )  ){
3667
3668
            Sensei()->initiate_rewrite_rules_flush();
3669
3670
        }
3671
3672
    }
3673
3674
    /**
3675
     * Output the quiz specific buttons and messaging on the single lesson page

includes/class-sensei-course.php 1 location

@@ 2642-2657 (lines=16) @@
2639
     *
2640
     * @param $post_id
2641
     */
2642
    public static function flush_rewrite_rules( $post_id ){
2643
2644
        if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE){
2645
2646
            return;
2647
2648
        }
2649
2650
2651
        if( 'course' == get_post_type( $post_id )  ){
2652
2653
            Sensei()->initiate_rewrite_rules_flush();
2654
2655
        }
2656
2657
    }
2658
2659
    /**
2660
     * Optionally return the full content on the single course pages