Code Duplication    Length = 20-20 lines in 2 locations

includes/shortcodes/class-sensei-shortcode-courses.php 1 location

@@ 199-218 (lines=20) @@
196
     *
197
     * @return string $content
198
     */
199
    public function render(){
200
201
        global $wp_query;
202
203
        // keep a reference to old query
204
        $current_global_query = $wp_query;
205
206
        // assign the query setup in $this-> setup_course_query
207
        $wp_query = $this->query;
208
209
        ob_start();
210
        Sensei_Templates::get_template('loop-course.php');
211
        $shortcode_output =  ob_get_clean();
212
213
        //restore old query
214
        $wp_query = $current_global_query;
215
216
        return $shortcode_output;
217
218
    }// end render
219
220
}

includes/shortcodes/class-sensei-shortcode-featured-courses.php 1 location

@@ 108-127 (lines=20) @@
105
    /**
106
     * Rendering the shortcode this class is responsible for.
107
     */
108
    public function render(){
109
110
        global $wp_query;
111
112
        // keep a reference to old query
113
        $current_global_query = $wp_query;
114
115
        // assign the query setup in $this-> setup_course_query
116
        $wp_query = $this->query;
117
118
        ob_start();
119
        Sensei_Templates::get_template('loop-course.php');
120
        $shortcode_output =  ob_get_clean();
121
122
        //restore old query
123
        $wp_query = $current_global_query;
124
125
        return $shortcode_output;
126
127
    }// end render
128
129
}