@@ 271-277 (lines=7) @@ | ||
268 | $title = sprintf( '<a href="%s">%s</a>', esc_url(add_query_arg( array( 'page' => $this->page_slug ), admin_url( 'admin.php' ) ) ), esc_html( $this->name ) ); |
|
269 | if ( isset( $_GET['course_id'] ) ) { |
|
270 | $course_id = intval( $_GET['course_id'] ); |
|
271 | if ( version_compare($wp_version, '4.1', '>=') ) { |
|
272 | $url = add_query_arg( array( 'page' => $this->page_slug, 'course_id' => $course_id ), admin_url( 'admin.php' ) ); |
|
273 | $title .= sprintf( ' <span class="course-title">> <a href="%s">%s</a></span>', esc_url( $url ), get_the_title( $course_id ) ); |
|
274 | } |
|
275 | else { |
|
276 | $title .= sprintf( ' <span class="course-title">> %s</span>', get_the_title( $course_id ) ); |
|
277 | } |
|
278 | } |
|
279 | if ( isset( $_GET['lesson_id'] ) ) { |
|
280 | $lesson_id = intval( $_GET['lesson_id'] ); |
|
@@ 307-313 (lines=7) @@ | ||
304 | $quiz_id = intval( $_GET['quiz_id'] ); |
|
305 | $lesson_id = get_post_meta( $quiz_id, '_quiz_lesson', true ); |
|
306 | $course_id = get_post_meta( $lesson_id, '_lesson_course', true ); |
|
307 | if ( version_compare($wp_version, '4.1', '>=') ) { |
|
308 | $url = add_query_arg( array( 'page' => $this->page_slug, 'course_id' => $course_id ), admin_url( 'admin.php' ) ); |
|
309 | $title .= sprintf( ' <span class="course-title">> <a href="%s">%s</a></span>', esc_url( $url ), get_the_title( $course_id ) ); |
|
310 | } |
|
311 | else { |
|
312 | $title .= sprintf( ' <span class="course-title">> %s</span>', get_the_title( $course_id ) ); |
|
313 | } |
|
314 | $url = add_query_arg( array( 'page' => $this->page_slug, 'lesson_id' => $lesson_id ), admin_url( 'admin.php' ) ); |
|
315 | $title .= sprintf( ' <span class="lesson-title">> <a href="%s">%s</a></span>', esc_url( $url ), get_the_title( $lesson_id ) ); |
|
316 | } |