1.9 Developers take note

Updated on November 28, 2015

Most of the items in this post have been mentioned in the beta release post, but I would like to go into further detail. Version 1.0 comes with a lot of under the hood improvements which paves the way for an even stabler learning platform.

These changes may likely affect extensions or themes that you have written although we have tried our utmost to ensure backwards compatibility in all instances.

This post touches on the following issues:

Template Files

For 1.9 we have revamped all template files except for the email system templates. Every single file has been completely changed. With this complete change it is even easier to modify the templates or to add more functionality into them. The files themselves are more readable and include more context.

Removed

  • content-no-permissions.php – Moved into no-permissions.php with new hooks
  • content-single-course.php –  Moved into single-course.php
  • content-single-lesson.php – Moved into single-lesson.php
  • content-single-quiz.php – Moved into into single-quiz.php
  • content-single-message.php – Moved into single-message.php
  • course-results/ course-info.php – Move to function and added via a hook
  • single-course / course-meta.php – Move into a function that is now added via a hook
  • woocommerce / add-to-cart.php – Move into a function that is now added via a hook
  • single-quiz/  quiz-questions.php – Moved into single-quiz.php
  • learner-profile /  learner-info.php – Move into a function that is now added via a hook
  • single-lesson/  lesson-meta.php – Move into a function that is now added via a hook
  • taxonomy-course-category.php – Removed, the taxonomy archive now uses archive-course.php
  • taxonomy-lesson-tag.php – Removed, the taxonomy archive now uses archive-lesson.php

Moved

  • wrappers/*  – moved to  globals/* 
  • single-course/course-lessons.php – moved to single-course/lessons.php
  • single-course/course-modules.php – moved to single-modules.php/modules.php

New

  • content-course.php – used with the loop-course.php ( not used in single course )
  • content-lesson.php – used with the loop-lesson.php ( not used in single lesson )
  • content-message.php – used with the loop-message.php ( not used in single message )
  • teacher-archive.php – used as a base for the teacher archive with all their courses. Similar to the `author.php` template in WordPress core, but for teachers specifically.

Plugins structure

If you’ve been around the Sensei internals you will have noticed that classes were always `class-woothemes-sensei-name.php`. This has now been renamed  with class-sensei-name.php. The same has been applied within the class name for consistency sake.

All classes have been moved from the /classes/ directory to the /includes/ directory which is now the place where all php functionality will reside.

We also had an `inc` directory in the root folder which held external libraries and company wide scripts. This is now moved into includes/lib/.

Global Sensei Object

Going forward the recommended way to access Sensei from a plugin or theme will be to use Sensei(). Most of the functionality will also be using a static function approach. Deprecated in 2.1 $woothemes_sensei, It will still work but using it will throw errors.

Deprecated Hooks

Hooks have been removed and newer more generic hooks put in their place.

Deprecated

Alternative

sensei_after_user_course_content

sensei_my_courses_content_inside_after

sensei_archive_title

sensei_archive_before_course_loop

sensei_before_user_course_content

sensei_my_courses_content_inside_before

sensei_breadcrumb

sensei_after_main_content

sensei_comments

sensei_after_main_content

sensei_complete_quiz

  sensei_single_quiz_content_inside_before

sensei_course_archive_header

sensei_course_content_inside_before

sensei_course_archive_main_content

sensei_loop_course_before

sensei_course_image

sensei_single_course_content_inside_before array( )

sensei_course_meta

sensei_single_course_content_inside_before

sensei_course_meta_video

sensei_single_course_content_inside_before

sensei_course_results_bottom

sensei_course_results_content_inside_after

sensei_course_results_content

sensei_course_results_content_before

sensei_course_results_info

sensei_course_results_content_inside_before

sensei_course_results_lessons

sensei_course_results_content_inside_after

sensei_course_results_top

sensei_course_results_content_inside_before

sensei_course_single_lessons

sensei_single_course_content_inside_after

sensei_course_single_meta

sensei_single_course_content_inside_before

sensei_course_single_title

sensei_single_course_content_inside_before

sensei_course_start

sensei_single_course_content_inside_before

sensei_learner_profile_content

sensei_learner_profile_content_before

sensei_lesson_archive_header

sensei_loop_lesson_inside_before

sensei_lesson_course_signup

sensei_single_lesson_content_inside_after

sensei_lesson_image

sensei_single_lesson_content_inside_before

sensei_lesson_quiz_meta

sensei_single_lesson_content_inside_before

sensei_lesson_single_meta

sensei_single_lesson_content_inside_after

sensei_lesson_single_title

sensei_single_lesson_content_inside_before

sensei_login_form

sensei_login_form_before

OR

sensei_login_form_after

sensei_message_archive_header

  sensei_archive_before_message_loop

sensei_message_archive_main_content

sensei_archive_before_message_loop

OR

sensei_archive_after_message_loop

sensei_message_single_title

sensei_single_message_content_inside_before

sensei_modules_page_after

sensei_single_course_modules_after

sensei_modules_page_before

sensei_single_course_modules_after

sensei_quiz_action_buttons

sensei_single_quiz_questions_after

sensei_quiz_question_type

sensei_quiz_question_inside_after $question_type

sensei_quiz_single_title

sensei_single_quiz_content_inside_before

sensei_single_course_modules_content

sensei_single_course_modules_before

OR

sensei_single_course_modules_after

sensei_single_main_content (Single Lesson)

sensei_single_lesson_content_inside_before

sensei_single_main_content  (Single Quiz)

sensei_single_quiz_content_inside_before

OR

sensei_single_quiz_content_inside_after

sensei_single_main_content ( Single Course)

sensei_single_course_content_inside_before

OR

sensei_single_course_content_inside_after

sensei_single_main_content  ( Single Message )

sensei_single_message_content_inside_before

OR

sensei_single_message_content_inside_after

sensei_woocommerce_in_cart_message

sensei_single_course_content_inside_before


Keep the conversation going…

Join the community
Sensei P2

Follow us on Twitter
@senseilms

Stay up to date
Join our mailing List

Choose Your WordPress LMS

We know you’re a genius. Now let us help you share your brilliance with the world.

Host Anywhere

Download our free plugin to use on any WordPress site, and upgrade to Sensei Pro at any time.

  • Open-source and extendable
  • Works with any WordPress theme
  • Integrates with 100s of WordPress plugins
  • Choose any web host

Host With Us

Get blazing-fast hosting, Sensei Pro, backups, and security all in one discounted package.

  • Sensei Pro courses, and quizzes
  • WooCommerce payments
  • Jetpack security and marketing
  • WordPress.com scalable hosting