Code Duplication    Length = 16-16 lines in 2 locations

includes/class-sensei-course.php 1 location

@@ 2683-2698 (lines=16) @@
2680
     *
2681
     * @param $post_id
2682
     */
2683
    public static function flush_rewrite_rules( $post_id ){
2684
2685
        if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE){
2686
2687
            return;
2688
2689
        }
2690
2691
2692
        if( 'course' == get_post_type( $post_id )  ){
2693
2694
            Sensei()->initiate_rewrite_rules_flush();
2695
2696
        }
2697
2698
    }
2699
2700
    /**
2701
     * Optionally return the full content on the single course pages

includes/class-sensei-lesson.php 1 location

@@ 3672-3687 (lines=16) @@
3669
     *
3670
     * @param $post_id
3671
     */
3672
    public static function flush_rewrite_rules( $post_id ){
3673
3674
        if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE){
3675
3676
            return;
3677
3678
        }
3679
3680
3681
        if( 'lesson' == get_post_type( $post_id )  ){
3682
3683
            Sensei()->initiate_rewrite_rules_flush();
3684
3685
        }
3686
3687
    }
3688
3689
    /**
3690
     * Output the quiz specific buttons and messaging on the single lesson page