@@ -14,10 +14,10 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | class Sensei_Course_Results { |
| 16 | 16 | |
| 17 | - /** |
|
| 18 | - * @var string |
|
| 19 | - */ |
|
| 20 | - public $courses_url_base; |
|
| 17 | + /** |
|
| 18 | + * @var string |
|
| 19 | + */ |
|
| 20 | + public $courses_url_base; |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * Constructor. |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | global $wp_query, $current_user; |
| 99 | 99 | |
| 100 | 100 | if( isset( $wp_query->query_vars['course_results'] ) ) { |
| 101 | - Sensei_Templates::get_template( 'course-results/course-info.php' ); |
|
| 101 | + Sensei_Templates::get_template( 'course-results/course-info.php' ); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | } |
@@ -117,20 +117,20 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | sensei_do_deprecated_action( 'sensei_course_results_lessons','1.9.','sensei_course_results_content_inside_after', $course ); |
| 119 | 119 | |
| 120 | - sensei_do_deprecated_action( 'sensei_course_results_bottom','1.9.','sensei_course_results_content_inside_after', $course->ID ); |
|
| 120 | + sensei_do_deprecated_action( 'sensei_course_results_bottom','1.9.','sensei_course_results_content_inside_after', $course->ID ); |
|
| 121 | 121 | |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | /** |
| 125 | 125 | * Load template for displaying course lessons |
| 126 | - * |
|
| 126 | + * |
|
| 127 | 127 | * @since 1.4.0 |
| 128 | 128 | * @return void |
| 129 | 129 | */ |
| 130 | 130 | public function course_lessons() { |
| 131 | 131 | |
| 132 | 132 | global $course; |
| 133 | - _deprecated_function( 'Sensei_modules course_lessons ', '1.9.0' ); |
|
| 133 | + _deprecated_function( 'Sensei_modules course_lessons ', '1.9.0' ); |
|
| 134 | 134 | |
| 135 | 135 | } |
| 136 | 136 | |
@@ -147,62 +147,62 @@ discard block |
||
| 147 | 147 | return $classes; |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | - /** |
|
| 151 | - * Deprecate the sensei_course_results_content hook |
|
| 152 | - * |
|
| 153 | - * @deprecated since 1.9.0 |
|
| 154 | - */ |
|
| 155 | - public static function deprecate_sensei_course_results_content_hook(){ |
|
| 150 | + /** |
|
| 151 | + * Deprecate the sensei_course_results_content hook |
|
| 152 | + * |
|
| 153 | + * @deprecated since 1.9.0 |
|
| 154 | + */ |
|
| 155 | + public static function deprecate_sensei_course_results_content_hook(){ |
|
| 156 | 156 | |
| 157 | - sensei_do_deprecated_action('sensei_course_results_content', '1.9.0','sensei_course_results_content_before'); |
|
| 157 | + sensei_do_deprecated_action('sensei_course_results_content', '1.9.0','sensei_course_results_content_before'); |
|
| 158 | 158 | |
| 159 | - } |
|
| 159 | + } |
|
| 160 | 160 | |
| 161 | - /** |
|
| 162 | - * Fire the sensei frontend message hook |
|
| 163 | - * |
|
| 164 | - * @since 1.9.0 |
|
| 165 | - */ |
|
| 166 | - public static function fire_sensei_message_hook(){ |
|
| 161 | + /** |
|
| 162 | + * Fire the sensei frontend message hook |
|
| 163 | + * |
|
| 164 | + * @since 1.9.0 |
|
| 165 | + */ |
|
| 166 | + public static function fire_sensei_message_hook(){ |
|
| 167 | 167 | |
| 168 | - do_action( 'sensei_frontend_messages' ); |
|
| 168 | + do_action( 'sensei_frontend_messages' ); |
|
| 169 | 169 | |
| 170 | - } |
|
| 170 | + } |
|
| 171 | 171 | |
| 172 | - /** |
|
| 173 | - * Deprecate the course_results info hook |
|
| 174 | - * |
|
| 175 | - * @since 1.9.0 |
|
| 176 | - */ |
|
| 177 | - public static function deprecate_course_result_info_hook(){ |
|
| 172 | + /** |
|
| 173 | + * Deprecate the course_results info hook |
|
| 174 | + * |
|
| 175 | + * @since 1.9.0 |
|
| 176 | + */ |
|
| 177 | + public static function deprecate_course_result_info_hook(){ |
|
| 178 | 178 | |
| 179 | - sensei_do_deprecated_action( 'sensei_course_results_info', '1.9.0', 'sensei_course_results_content_inside_before' ); |
|
| 179 | + sensei_do_deprecated_action( 'sensei_course_results_info', '1.9.0', 'sensei_course_results_content_inside_before' ); |
|
| 180 | 180 | |
| 181 | - } |
|
| 181 | + } |
|
| 182 | 182 | |
| 183 | - /** |
|
| 184 | - * Deprecate the sensei_course_results_top hook |
|
| 185 | - * |
|
| 186 | - * @deprecate since 1.9.0 |
|
| 187 | - */ |
|
| 188 | - public static function deprecate_course_results_top_hook(){ |
|
| 183 | + /** |
|
| 184 | + * Deprecate the sensei_course_results_top hook |
|
| 185 | + * |
|
| 186 | + * @deprecate since 1.9.0 |
|
| 187 | + */ |
|
| 188 | + public static function deprecate_course_results_top_hook(){ |
|
| 189 | 189 | |
| 190 | - global $course; |
|
| 191 | - sensei_do_deprecated_action( 'sensei_course_results_top', '1.9.0' ,'sensei_course_results_content_inside_before',$course->ID ); |
|
| 190 | + global $course; |
|
| 191 | + sensei_do_deprecated_action( 'sensei_course_results_top', '1.9.0' ,'sensei_course_results_content_inside_before',$course->ID ); |
|
| 192 | 192 | |
| 193 | - } |
|
| 193 | + } |
|
| 194 | 194 | |
| 195 | - /** |
|
| 196 | - * Fire the course image hook |
|
| 197 | - * |
|
| 198 | - * @since 1.8.0 |
|
| 199 | - */ |
|
| 200 | - public static function fire_course_image_hook(){ |
|
| 195 | + /** |
|
| 196 | + * Fire the course image hook |
|
| 197 | + * |
|
| 198 | + * @since 1.8.0 |
|
| 199 | + */ |
|
| 200 | + public static function fire_course_image_hook(){ |
|
| 201 | 201 | |
| 202 | - global $course; |
|
| 203 | - sensei_do_deprecated_action('sensei_course_image','1.9.0', 'sensei_single_course_content_inside_before', array( get_the_ID()) ); |
|
| 202 | + global $course; |
|
| 203 | + sensei_do_deprecated_action('sensei_course_image','1.9.0', 'sensei_single_course_content_inside_before', array( get_the_ID()) ); |
|
| 204 | 204 | |
| 205 | - } |
|
| 205 | + } |
|
| 206 | 206 | |
| 207 | 207 | } // End Class |
| 208 | 208 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | public static function has_language_pack_available( $locale = null ) { |
| 93 | 93 | |
| 94 | - if ( is_null( $locale ) ) { |
|
| 94 | + if ( is_null( $locale ) ) { |
|
| 95 | 95 | |
| 96 | 96 | $locale = get_locale(); |
| 97 | 97 | |
@@ -109,11 +109,11 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | - if( isset( $_GET['translation_updated'] ) && 5 == $_GET['translation_updated'] ){ |
|
| 112 | + if( isset( $_GET['translation_updated'] ) && 5 == $_GET['translation_updated'] ){ |
|
| 113 | 113 | |
| 114 | - return false; |
|
| 114 | + return false; |
|
| 115 | 115 | |
| 116 | - } |
|
| 116 | + } |
|
| 117 | 117 | |
| 118 | 118 | $version = get_option( 'woothemes_sensei_language_pack_version', array( '0', $locale ) ); |
| 119 | 119 | |
@@ -11,681 +11,681 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | class Sensei_Templates { |
| 13 | 13 | |
| 14 | - /** |
|
| 15 | - * Load the template files from within sensei/templates/ or the the theme if overrided within the theme. |
|
| 16 | - * |
|
| 17 | - * @since 1.9.0 |
|
| 18 | - * @param string $slug |
|
| 19 | - * @param string $name default: '' |
|
| 20 | - * |
|
| 21 | - * @return void |
|
| 22 | - */ |
|
| 23 | - public static function get_part( $slug, $name = '' ){ |
|
| 14 | + /** |
|
| 15 | + * Load the template files from within sensei/templates/ or the the theme if overrided within the theme. |
|
| 16 | + * |
|
| 17 | + * @since 1.9.0 |
|
| 18 | + * @param string $slug |
|
| 19 | + * @param string $name default: '' |
|
| 20 | + * |
|
| 21 | + * @return void |
|
| 22 | + */ |
|
| 23 | + public static function get_part( $slug, $name = '' ){ |
|
| 24 | 24 | |
| 25 | - $template = ''; |
|
| 26 | - $plugin_template_url = Sensei()->template_url; |
|
| 27 | - $plugin_template_path = Sensei()->plugin_path() . "/templates/"; |
|
| 25 | + $template = ''; |
|
| 26 | + $plugin_template_url = Sensei()->template_url; |
|
| 27 | + $plugin_template_path = Sensei()->plugin_path() . "/templates/"; |
|
| 28 | 28 | |
| 29 | - // Look in yourtheme/slug-name.php and yourtheme/sensei/slug-name.php |
|
| 30 | - if ( $name ){ |
|
| 29 | + // Look in yourtheme/slug-name.php and yourtheme/sensei/slug-name.php |
|
| 30 | + if ( $name ){ |
|
| 31 | 31 | |
| 32 | - $template = locate_template( array ( "{$slug}-{$name}.php", "{$plugin_template_url}{$slug}-{$name}.php" ) ); |
|
| 32 | + $template = locate_template( array ( "{$slug}-{$name}.php", "{$plugin_template_url}{$slug}-{$name}.php" ) ); |
|
| 33 | 33 | |
| 34 | - } |
|
| 34 | + } |
|
| 35 | 35 | |
| 36 | - // Get default slug-name.php |
|
| 37 | - if ( ! $template && $name && file_exists( $plugin_template_path . "{$slug}-{$name}.php" ) ){ |
|
| 36 | + // Get default slug-name.php |
|
| 37 | + if ( ! $template && $name && file_exists( $plugin_template_path . "{$slug}-{$name}.php" ) ){ |
|
| 38 | 38 | |
| 39 | - $template = $plugin_template_path . "{$slug}-{$name}.php"; |
|
| 39 | + $template = $plugin_template_path . "{$slug}-{$name}.php"; |
|
| 40 | 40 | |
| 41 | - } |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | 43 | |
| 44 | - // If template file doesn't exist, look in yourtheme/slug.php and yourtheme/sensei/slug.php |
|
| 45 | - if ( !$template ){ |
|
| 44 | + // If template file doesn't exist, look in yourtheme/slug.php and yourtheme/sensei/slug.php |
|
| 45 | + if ( !$template ){ |
|
| 46 | 46 | |
| 47 | - $template = locate_template( array ( "{$slug}.php", "{$plugin_template_url}{$slug}.php" ) ); |
|
| 47 | + $template = locate_template( array ( "{$slug}.php", "{$plugin_template_url}{$slug}.php" ) ); |
|
| 48 | 48 | |
| 49 | - } |
|
| 49 | + } |
|
| 50 | 50 | |
| 51 | 51 | |
| 52 | - if ( $template ){ |
|
| 52 | + if ( $template ){ |
|
| 53 | 53 | |
| 54 | - load_template( $template, false ); |
|
| 54 | + load_template( $template, false ); |
|
| 55 | 55 | |
| 56 | - } |
|
| 56 | + } |
|
| 57 | 57 | |
| 58 | - } // end get part |
|
| 58 | + } // end get part |
|
| 59 | 59 | |
| 60 | - /** |
|
| 61 | - * Get the template. |
|
| 62 | - * |
|
| 63 | - * @since 1.9.0 |
|
| 64 | - * |
|
| 65 | - * @param $template_name |
|
| 66 | - * @param array $args |
|
| 67 | - * @param string $template_path |
|
| 68 | - * @param string $default_path |
|
| 69 | - */ |
|
| 70 | - public static function get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) { |
|
| 60 | + /** |
|
| 61 | + * Get the template. |
|
| 62 | + * |
|
| 63 | + * @since 1.9.0 |
|
| 64 | + * |
|
| 65 | + * @param $template_name |
|
| 66 | + * @param array $args |
|
| 67 | + * @param string $template_path |
|
| 68 | + * @param string $default_path |
|
| 69 | + */ |
|
| 70 | + public static function get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) { |
|
| 71 | 71 | |
| 72 | - if ( $args && is_array($args) ) |
|
| 73 | - extract( $args ); |
|
| 72 | + if ( $args && is_array($args) ) |
|
| 73 | + extract( $args ); |
|
| 74 | 74 | |
| 75 | - $located = self::locate_template( $template_name, $template_path, $default_path ); |
|
| 75 | + $located = self::locate_template( $template_name, $template_path, $default_path ); |
|
| 76 | 76 | |
| 77 | - if( ! empty( $located ) ){ |
|
| 77 | + if( ! empty( $located ) ){ |
|
| 78 | 78 | |
| 79 | - do_action( 'sensei_before_template_part', $template_name, $template_path, $located ); |
|
| 79 | + do_action( 'sensei_before_template_part', $template_name, $template_path, $located ); |
|
| 80 | 80 | |
| 81 | - include( $located ); |
|
| 81 | + include( $located ); |
|
| 82 | 82 | |
| 83 | - do_action( 'sensei_after_template_part', $template_name, $template_path, $located ); |
|
| 83 | + do_action( 'sensei_after_template_part', $template_name, $template_path, $located ); |
|
| 84 | 84 | |
| 85 | - } |
|
| 85 | + } |
|
| 86 | 86 | |
| 87 | - } // end get template |
|
| 87 | + } // end get template |
|
| 88 | 88 | |
| 89 | - /** |
|
| 90 | - * Check if the template file exists. A wrapper for WP locate_template. |
|
| 91 | - * |
|
| 92 | - * @since 1.9.0 |
|
| 93 | - * |
|
| 94 | - * @param $template_name |
|
| 95 | - * @param string $template_path |
|
| 96 | - * @param string $default_path |
|
| 97 | - * |
|
| 98 | - * @return mixed|void |
|
| 99 | - */ |
|
| 100 | - public static function locate_template( $template_name, $template_path = '', $default_path = '' ) { |
|
| 89 | + /** |
|
| 90 | + * Check if the template file exists. A wrapper for WP locate_template. |
|
| 91 | + * |
|
| 92 | + * @since 1.9.0 |
|
| 93 | + * |
|
| 94 | + * @param $template_name |
|
| 95 | + * @param string $template_path |
|
| 96 | + * @param string $default_path |
|
| 97 | + * |
|
| 98 | + * @return mixed|void |
|
| 99 | + */ |
|
| 100 | + public static function locate_template( $template_name, $template_path = '', $default_path = '' ) { |
|
| 101 | 101 | |
| 102 | - if ( ! $template_path ) $template_path = Sensei()->template_url; |
|
| 103 | - if ( ! $default_path ) $default_path = Sensei()->plugin_path() . '/templates/'; |
|
| 102 | + if ( ! $template_path ) $template_path = Sensei()->template_url; |
|
| 103 | + if ( ! $default_path ) $default_path = Sensei()->plugin_path() . '/templates/'; |
|
| 104 | 104 | |
| 105 | - // Look within passed path within the theme - this is priority |
|
| 106 | - $template = locate_template( |
|
| 107 | - array( |
|
| 108 | - $template_path . $template_name, |
|
| 109 | - $template_name |
|
| 110 | - ) |
|
| 111 | - ); |
|
| 105 | + // Look within passed path within the theme - this is priority |
|
| 106 | + $template = locate_template( |
|
| 107 | + array( |
|
| 108 | + $template_path . $template_name, |
|
| 109 | + $template_name |
|
| 110 | + ) |
|
| 111 | + ); |
|
| 112 | 112 | |
| 113 | - // Get default template |
|
| 114 | - if ( ! $template ){ |
|
| 113 | + // Get default template |
|
| 114 | + if ( ! $template ){ |
|
| 115 | 115 | |
| 116 | - $template = $default_path . $template_name; |
|
| 116 | + $template = $default_path . $template_name; |
|
| 117 | 117 | |
| 118 | - } |
|
| 119 | - // return nothing for file that do not exist |
|
| 120 | - if( !file_exists( $template ) ){ |
|
| 121 | - $template = ''; |
|
| 122 | - } |
|
| 118 | + } |
|
| 119 | + // return nothing for file that do not exist |
|
| 120 | + if( !file_exists( $template ) ){ |
|
| 121 | + $template = ''; |
|
| 122 | + } |
|
| 123 | 123 | |
| 124 | - // Return what we found |
|
| 125 | - return apply_filters( 'sensei_locate_template', $template, $template_name, $template_path ); |
|
| 124 | + // Return what we found |
|
| 125 | + return apply_filters( 'sensei_locate_template', $template, $template_name, $template_path ); |
|
| 126 | 126 | |
| 127 | - } // end locate |
|
| 127 | + } // end locate |
|
| 128 | 128 | |
| 129 | - /** |
|
| 130 | - * Determine which Sensei template to load based on the |
|
| 131 | - * current page context. |
|
| 132 | - * |
|
| 133 | - * @since 1.0 |
|
| 134 | - * |
|
| 135 | - * @param string $template |
|
| 136 | - * @return string $template |
|
| 137 | - */ |
|
| 138 | - public static function template_loader ( $template = '' ) { |
|
| 129 | + /** |
|
| 130 | + * Determine which Sensei template to load based on the |
|
| 131 | + * current page context. |
|
| 132 | + * |
|
| 133 | + * @since 1.0 |
|
| 134 | + * |
|
| 135 | + * @param string $template |
|
| 136 | + * @return string $template |
|
| 137 | + */ |
|
| 138 | + public static function template_loader ( $template = '' ) { |
|
| 139 | 139 | |
| 140 | - global $wp_query, $email_template; |
|
| 140 | + global $wp_query, $email_template; |
|
| 141 | 141 | |
| 142 | - $find = array( 'woothemes-sensei.php' ); |
|
| 143 | - $file = ''; |
|
| 142 | + $find = array( 'woothemes-sensei.php' ); |
|
| 143 | + $file = ''; |
|
| 144 | 144 | |
| 145 | - if ( isset( $email_template ) && $email_template ) { |
|
| 145 | + if ( isset( $email_template ) && $email_template ) { |
|
| 146 | 146 | |
| 147 | - $file = 'emails/' . $email_template; |
|
| 148 | - $find[] = $file; |
|
| 149 | - $find[] = Sensei()->template_url . $file; |
|
| 147 | + $file = 'emails/' . $email_template; |
|
| 148 | + $find[] = $file; |
|
| 149 | + $find[] = Sensei()->template_url . $file; |
|
| 150 | 150 | |
| 151 | - } elseif ( is_single() && get_post_type() == 'course' ) { |
|
| 151 | + } elseif ( is_single() && get_post_type() == 'course' ) { |
|
| 152 | 152 | |
| 153 | - if ( Sensei()->check_user_permissions( 'course-single' ) ) { |
|
| 153 | + if ( Sensei()->check_user_permissions( 'course-single' ) ) { |
|
| 154 | 154 | |
| 155 | - // possible backward compatible template include if theme overrides content-single-course.php |
|
| 156 | - // this template was removed in 1.9.0 and code all moved into the main single-course.php file |
|
| 157 | - self::locate_and_load_template_overrides( Sensei()->template_url . 'content-single-course.php', true ); |
|
| 155 | + // possible backward compatible template include if theme overrides content-single-course.php |
|
| 156 | + // this template was removed in 1.9.0 and code all moved into the main single-course.php file |
|
| 157 | + self::locate_and_load_template_overrides( Sensei()->template_url . 'content-single-course.php', true ); |
|
| 158 | 158 | |
| 159 | - $file = 'single-course.php'; |
|
| 160 | - $find[] = $file; |
|
| 161 | - $find[] = Sensei()->template_url . $file; |
|
| 159 | + $file = 'single-course.php'; |
|
| 160 | + $find[] = $file; |
|
| 161 | + $find[] = Sensei()->template_url . $file; |
|
| 162 | 162 | |
| 163 | - } else { |
|
| 163 | + } else { |
|
| 164 | 164 | |
| 165 | - // No Permissions Page |
|
| 166 | - return self::get_no_permission_template(); |
|
| 165 | + // No Permissions Page |
|
| 166 | + return self::get_no_permission_template(); |
|
| 167 | 167 | |
| 168 | - } // End If Statement |
|
| 168 | + } // End If Statement |
|
| 169 | 169 | |
| 170 | - } elseif ( is_single() && get_post_type() == 'lesson' ) { |
|
| 170 | + } elseif ( is_single() && get_post_type() == 'lesson' ) { |
|
| 171 | 171 | |
| 172 | - if ( Sensei()->check_user_permissions( 'lesson-single' ) ) { |
|
| 172 | + if ( Sensei()->check_user_permissions( 'lesson-single' ) ) { |
|
| 173 | 173 | |
| 174 | - // possible backward compatible template include if theme overrides content-single-lesson.php |
|
| 175 | - // this template was removed in 1.9.0 and code all moved into the main single-lesson.php file |
|
| 176 | - self::locate_and_load_template_overrides( Sensei()->template_url . 'content-single-lesson.php', true ); |
|
| 174 | + // possible backward compatible template include if theme overrides content-single-lesson.php |
|
| 175 | + // this template was removed in 1.9.0 and code all moved into the main single-lesson.php file |
|
| 176 | + self::locate_and_load_template_overrides( Sensei()->template_url . 'content-single-lesson.php', true ); |
|
| 177 | 177 | |
| 178 | - $file = 'single-lesson.php'; |
|
| 179 | - $find[] = $file; |
|
| 180 | - $find[] = Sensei()->template_url . $file; |
|
| 178 | + $file = 'single-lesson.php'; |
|
| 179 | + $find[] = $file; |
|
| 180 | + $find[] = Sensei()->template_url . $file; |
|
| 181 | 181 | |
| 182 | - } else { |
|
| 182 | + } else { |
|
| 183 | 183 | |
| 184 | - // No Permissions Page |
|
| 185 | - return self::get_no_permission_template(); |
|
| 184 | + // No Permissions Page |
|
| 185 | + return self::get_no_permission_template(); |
|
| 186 | 186 | |
| 187 | - } // End If Statement |
|
| 187 | + } // End If Statement |
|
| 188 | 188 | |
| 189 | - } elseif ( is_single() && get_post_type() == 'quiz' ) { |
|
| 189 | + } elseif ( is_single() && get_post_type() == 'quiz' ) { |
|
| 190 | 190 | |
| 191 | - if ( Sensei()->check_user_permissions( 'quiz-single' ) ) { |
|
| 191 | + if ( Sensei()->check_user_permissions( 'quiz-single' ) ) { |
|
| 192 | 192 | |
| 193 | - // possible backward compatible template include if theme overrides content-single-quiz.php |
|
| 194 | - // this template was removed in 1.9.0 and code all moved into the main single-quiz.php file |
|
| 195 | - self::locate_and_load_template_overrides( Sensei()->template_url . 'content-single-quiz.php' , true); |
|
| 193 | + // possible backward compatible template include if theme overrides content-single-quiz.php |
|
| 194 | + // this template was removed in 1.9.0 and code all moved into the main single-quiz.php file |
|
| 195 | + self::locate_and_load_template_overrides( Sensei()->template_url . 'content-single-quiz.php' , true); |
|
| 196 | 196 | |
| 197 | - $file = 'single-quiz.php'; |
|
| 198 | - $find[] = $file; |
|
| 199 | - $find[] = Sensei()->template_url . $file; |
|
| 197 | + $file = 'single-quiz.php'; |
|
| 198 | + $find[] = $file; |
|
| 199 | + $find[] = Sensei()->template_url . $file; |
|
| 200 | 200 | |
| 201 | - } else { |
|
| 201 | + } else { |
|
| 202 | 202 | |
| 203 | - // No Permissions Page |
|
| 204 | - return self::get_no_permission_template(); |
|
| 203 | + // No Permissions Page |
|
| 204 | + return self::get_no_permission_template(); |
|
| 205 | 205 | |
| 206 | - } // End If Statement |
|
| 206 | + } // End If Statement |
|
| 207 | 207 | |
| 208 | - } elseif ( is_single() && get_post_type() == 'sensei_message' ) { |
|
| 208 | + } elseif ( is_single() && get_post_type() == 'sensei_message' ) { |
|
| 209 | 209 | |
| 210 | - // possible backward compatible template include if theme overrides content-single-message.php |
|
| 211 | - // this template was removed in 1.9.0 and code all moved into the main single-message.php file |
|
| 212 | - self::locate_and_load_template_overrides( Sensei()->template_url . 'content-single-message.php', true ); |
|
| 210 | + // possible backward compatible template include if theme overrides content-single-message.php |
|
| 211 | + // this template was removed in 1.9.0 and code all moved into the main single-message.php file |
|
| 212 | + self::locate_and_load_template_overrides( Sensei()->template_url . 'content-single-message.php', true ); |
|
| 213 | 213 | |
| 214 | - $file = 'single-message.php'; |
|
| 215 | - $find[] = $file; |
|
| 216 | - $find[] = Sensei()->template_url . $file; |
|
| 214 | + $file = 'single-message.php'; |
|
| 215 | + $find[] = $file; |
|
| 216 | + $find[] = Sensei()->template_url . $file; |
|
| 217 | 217 | |
| 218 | - } elseif ( is_post_type_archive( 'course' ) |
|
| 219 | - || is_page( Sensei()->get_page_id( 'courses' ) ) |
|
| 220 | - || is_tax( 'course-category' )) { |
|
| 218 | + } elseif ( is_post_type_archive( 'course' ) |
|
| 219 | + || is_page( Sensei()->get_page_id( 'courses' ) ) |
|
| 220 | + || is_tax( 'course-category' )) { |
|
| 221 | 221 | |
| 222 | - // possible backward compatible template include if theme overrides 'taxonomy-course-category' |
|
| 223 | - // this template was removed in 1.9.0 and replaced by archive-course.php |
|
| 224 | - self::locate_and_load_template_overrides( Sensei()->template_url . 'taxonomy-course-category.php'); |
|
| 222 | + // possible backward compatible template include if theme overrides 'taxonomy-course-category' |
|
| 223 | + // this template was removed in 1.9.0 and replaced by archive-course.php |
|
| 224 | + self::locate_and_load_template_overrides( Sensei()->template_url . 'taxonomy-course-category.php'); |
|
| 225 | 225 | |
| 226 | - $file = 'archive-course.php'; |
|
| 227 | - $find[] = $file; |
|
| 228 | - $find[] = Sensei()->template_url . $file; |
|
| 226 | + $file = 'archive-course.php'; |
|
| 227 | + $find[] = $file; |
|
| 228 | + $find[] = Sensei()->template_url . $file; |
|
| 229 | 229 | |
| 230 | - } elseif ( is_post_type_archive( 'sensei_message' ) ) { |
|
| 230 | + } elseif ( is_post_type_archive( 'sensei_message' ) ) { |
|
| 231 | 231 | |
| 232 | - $file = 'archive-message.php'; |
|
| 233 | - $find[] = $file; |
|
| 234 | - $find[] = Sensei()->template_url . $file; |
|
| 232 | + $file = 'archive-message.php'; |
|
| 233 | + $find[] = $file; |
|
| 234 | + $find[] = Sensei()->template_url . $file; |
|
| 235 | 235 | |
| 236 | - } elseif( is_tax( 'lesson-tag' ) ) { |
|
| 236 | + } elseif( is_tax( 'lesson-tag' ) ) { |
|
| 237 | 237 | |
| 238 | - // possible backward compatible template include if theme overrides 'taxonomy-lesson-tag.php' |
|
| 239 | - // this template was removed in 1.9.0 and replaced by archive-lesson.php |
|
| 240 | - self::locate_and_load_template_overrides( Sensei()->template_url . 'taxonomy-lesson-tag.php' ); |
|
| 238 | + // possible backward compatible template include if theme overrides 'taxonomy-lesson-tag.php' |
|
| 239 | + // this template was removed in 1.9.0 and replaced by archive-lesson.php |
|
| 240 | + self::locate_and_load_template_overrides( Sensei()->template_url . 'taxonomy-lesson-tag.php' ); |
|
| 241 | 241 | |
| 242 | - $file = 'archive-lesson.php'; |
|
| 243 | - $find[] = $file; |
|
| 244 | - $find[] = Sensei()->template_url . $file; |
|
| 242 | + $file = 'archive-lesson.php'; |
|
| 243 | + $find[] = $file; |
|
| 244 | + $find[] = Sensei()->template_url . $file; |
|
| 245 | 245 | |
| 246 | - } elseif ( isset( $wp_query->query_vars['learner_profile'] ) ) { |
|
| 246 | + } elseif ( isset( $wp_query->query_vars['learner_profile'] ) ) { |
|
| 247 | 247 | |
| 248 | - // Override for sites with static home page |
|
| 249 | - $wp_query->is_home = false; |
|
| 248 | + // Override for sites with static home page |
|
| 249 | + $wp_query->is_home = false; |
|
| 250 | 250 | |
| 251 | - $file = 'learner-profile.php'; |
|
| 252 | - $find[] = $file; |
|
| 253 | - $find[] = Sensei()->template_url . $file; |
|
| 251 | + $file = 'learner-profile.php'; |
|
| 252 | + $find[] = $file; |
|
| 253 | + $find[] = Sensei()->template_url . $file; |
|
| 254 | 254 | |
| 255 | - } elseif ( isset( $wp_query->query_vars['course_results'] ) ) { |
|
| 255 | + } elseif ( isset( $wp_query->query_vars['course_results'] ) ) { |
|
| 256 | 256 | |
| 257 | - // Override for sites with static home page |
|
| 258 | - $wp_query->is_home = false; |
|
| 257 | + // Override for sites with static home page |
|
| 258 | + $wp_query->is_home = false; |
|
| 259 | 259 | |
| 260 | - $file = 'course-results.php'; |
|
| 261 | - $find[] = $file; |
|
| 262 | - $find[] = Sensei()->template_url . $file; |
|
| 260 | + $file = 'course-results.php'; |
|
| 261 | + $find[] = $file; |
|
| 262 | + $find[] = Sensei()->template_url . $file; |
|
| 263 | 263 | |
| 264 | - }elseif( is_author() |
|
| 265 | - && Sensei_Teacher::is_a_teacher( get_query_var('author') ) |
|
| 266 | - && ! user_can( get_query_var('author'), 'manage_options' ) ){ |
|
| 264 | + }elseif( is_author() |
|
| 265 | + && Sensei_Teacher::is_a_teacher( get_query_var('author') ) |
|
| 266 | + && ! user_can( get_query_var('author'), 'manage_options' ) ){ |
|
| 267 | 267 | |
| 268 | - $file = 'teacher-archive.php'; |
|
| 269 | - $find[] = $file; |
|
| 270 | - $find[] = Sensei()->template_url . $file; |
|
| 268 | + $file = 'teacher-archive.php'; |
|
| 269 | + $find[] = $file; |
|
| 270 | + $find[] = Sensei()->template_url . $file; |
|
| 271 | 271 | |
| 272 | - } // Load the template file |
|
| 272 | + } // Load the template file |
|
| 273 | 273 | |
| 274 | - if ( $file ) { |
|
| 274 | + if ( $file ) { |
|
| 275 | 275 | |
| 276 | - $template = locate_template( $find ); |
|
| 277 | - if ( ! $template ) $template = Sensei()->plugin_path() . '/templates/' . $file; |
|
| 276 | + $template = locate_template( $find ); |
|
| 277 | + if ( ! $template ) $template = Sensei()->plugin_path() . '/templates/' . $file; |
|
| 278 | 278 | |
| 279 | - } // End If Statement |
|
| 279 | + } // End If Statement |
|
| 280 | 280 | |
| 281 | - return $template; |
|
| 281 | + return $template; |
|
| 282 | 282 | |
| 283 | - } // End template_loader() |
|
| 283 | + } // End template_loader() |
|
| 284 | 284 | |
| 285 | - /** |
|
| 286 | - * This function loads the no-permissions template for users with no access |
|
| 287 | - * if a Sensei template was loaded. |
|
| 288 | - * |
|
| 289 | - * This function doesn't determine the permissions. Permissions must be determined |
|
| 290 | - * before loading this function as it only gets the template. |
|
| 291 | - * |
|
| 292 | - * This function also checks the user theme for overrides to ensure the right template |
|
| 293 | - * file is returned. |
|
| 294 | - * |
|
| 295 | - * @since 1.9.0 |
|
| 296 | - */ |
|
| 297 | - public static function get_no_permission_template( ){ |
|
| 285 | + /** |
|
| 286 | + * This function loads the no-permissions template for users with no access |
|
| 287 | + * if a Sensei template was loaded. |
|
| 288 | + * |
|
| 289 | + * This function doesn't determine the permissions. Permissions must be determined |
|
| 290 | + * before loading this function as it only gets the template. |
|
| 291 | + * |
|
| 292 | + * This function also checks the user theme for overrides to ensure the right template |
|
| 293 | + * file is returned. |
|
| 294 | + * |
|
| 295 | + * @since 1.9.0 |
|
| 296 | + */ |
|
| 297 | + public static function get_no_permission_template( ){ |
|
| 298 | 298 | |
| 299 | - // possible backward compatible template loading |
|
| 300 | - // this template was removed in 1.9.0 and code all moved into the no-permissions.php file |
|
| 301 | - self::locate_and_load_template_overrides( Sensei()->template_url . 'content-no-permissions.php', true ); |
|
| 299 | + // possible backward compatible template loading |
|
| 300 | + // this template was removed in 1.9.0 and code all moved into the no-permissions.php file |
|
| 301 | + self::locate_and_load_template_overrides( Sensei()->template_url . 'content-no-permissions.php', true ); |
|
| 302 | 302 | |
| 303 | - $file = 'no-permissions.php'; |
|
| 304 | - $find[] = $file; |
|
| 305 | - $find[] = Sensei()->template_url . $file; |
|
| 303 | + $file = 'no-permissions.php'; |
|
| 304 | + $find[] = $file; |
|
| 305 | + $find[] = Sensei()->template_url . $file; |
|
| 306 | 306 | |
| 307 | - $template = locate_template( $find ); |
|
| 308 | - if ( ! $template ) $template = Sensei()->plugin_path() . '/templates/' . $file; |
|
| 307 | + $template = locate_template( $find ); |
|
| 308 | + if ( ! $template ) $template = Sensei()->plugin_path() . '/templates/' . $file; |
|
| 309 | 309 | |
| 310 | - return $template; |
|
| 310 | + return $template; |
|
| 311 | 311 | |
| 312 | - } |
|
| 312 | + } |
|
| 313 | 313 | |
| 314 | - /** |
|
| 315 | - * This function is specifically created for loading template files from the theme. |
|
| 316 | - * |
|
| 317 | - * This function checks if the user has overwritten the templates like in their theme. If they have it in their theme it will load the header and the footer |
|
| 318 | - * around the singular content file from their theme and exit. |
|
| 319 | - * |
|
| 320 | - * If none is found this function will do nothing. If a template is found this funciton |
|
| 321 | - * will exit execution of the script an not continue. |
|
| 322 | - * |
|
| 323 | - * @since 1.9.0 |
|
| 324 | - * @param string $template |
|
| 325 | - * @param bool $load_header_footer should the file be wrapped in between header and footer? Default: true |
|
| 326 | - */ |
|
| 327 | - public static function locate_and_load_template_overrides( $template = '', $load_header_footer = false ){ |
|
| 314 | + /** |
|
| 315 | + * This function is specifically created for loading template files from the theme. |
|
| 316 | + * |
|
| 317 | + * This function checks if the user has overwritten the templates like in their theme. If they have it in their theme it will load the header and the footer |
|
| 318 | + * around the singular content file from their theme and exit. |
|
| 319 | + * |
|
| 320 | + * If none is found this function will do nothing. If a template is found this funciton |
|
| 321 | + * will exit execution of the script an not continue. |
|
| 322 | + * |
|
| 323 | + * @since 1.9.0 |
|
| 324 | + * @param string $template |
|
| 325 | + * @param bool $load_header_footer should the file be wrapped in between header and footer? Default: true |
|
| 326 | + */ |
|
| 327 | + public static function locate_and_load_template_overrides( $template = '', $load_header_footer = false ){ |
|
| 328 | 328 | |
| 329 | - $found_template = locate_template( array( $template ) ); |
|
| 330 | - if( $found_template ){ |
|
| 329 | + $found_template = locate_template( array( $template ) ); |
|
| 330 | + if( $found_template ){ |
|
| 331 | 331 | |
| 332 | - if( $load_header_footer ){ |
|
| 332 | + if( $load_header_footer ){ |
|
| 333 | 333 | |
| 334 | - get_sensei_header(); |
|
| 335 | - include( $found_template ); |
|
| 336 | - get_sensei_footer(); |
|
| 337 | - |
|
| 338 | - }else{ |
|
| 339 | - |
|
| 340 | - include( $found_template ); |
|
| 341 | - |
|
| 342 | - } |
|
| 343 | - |
|
| 344 | - exit; |
|
| 334 | + get_sensei_header(); |
|
| 335 | + include( $found_template ); |
|
| 336 | + get_sensei_footer(); |
|
| 337 | + |
|
| 338 | + }else{ |
|
| 339 | + |
|
| 340 | + include( $found_template ); |
|
| 341 | + |
|
| 342 | + } |
|
| 343 | + |
|
| 344 | + exit; |
|
| 345 | 345 | |
| 346 | - } |
|
| 346 | + } |
|
| 347 | 347 | |
| 348 | - } |
|
| 348 | + } |
|
| 349 | 349 | |
| 350 | 350 | |
| 351 | - /** |
|
| 352 | - * Hooks the deprecated archive content hook into the hook again just in |
|
| 353 | - * case other developers have used it. |
|
| 354 | - * |
|
| 355 | - * @deprecated since 1.9.0 |
|
| 356 | - */ |
|
| 357 | - public static function deprecated_archive_course_content_hook(){ |
|
| 358 | - |
|
| 359 | - sensei_do_deprecated_action( 'sensei_course_archive_main_content','1.9.0', 'sensei_loop_course_before' ); |
|
| 360 | - |
|
| 361 | - }// end deprecated_archive_hook |
|
| 351 | + /** |
|
| 352 | + * Hooks the deprecated archive content hook into the hook again just in |
|
| 353 | + * case other developers have used it. |
|
| 354 | + * |
|
| 355 | + * @deprecated since 1.9.0 |
|
| 356 | + */ |
|
| 357 | + public static function deprecated_archive_course_content_hook(){ |
|
| 358 | + |
|
| 359 | + sensei_do_deprecated_action( 'sensei_course_archive_main_content','1.9.0', 'sensei_loop_course_before' ); |
|
| 360 | + |
|
| 361 | + }// end deprecated_archive_hook |
|
| 362 | 362 | |
| 363 | - /** |
|
| 364 | - * A generic function for echoing the post title |
|
| 365 | - * |
|
| 366 | - * @since 1.9.0 |
|
| 367 | - * @param WP_Post $post |
|
| 368 | - */ |
|
| 369 | - public static function the_title( $post ){ |
|
| 370 | - |
|
| 371 | - // ID passed in |
|
| 372 | - if( is_numeric( $post ) ){ |
|
| 373 | - $post = get_post( $post ); |
|
| 374 | - } |
|
| 375 | - |
|
| 376 | - /** |
|
| 377 | - * Filter the template html tag for the title |
|
| 378 | - * |
|
| 379 | - * @since 1.9.0 |
|
| 380 | - * |
|
| 381 | - * @param $title_html_tag default is 'h3' |
|
| 382 | - */ |
|
| 383 | - $title_html_tag = apply_filters('sensei_the_title_html_tag','h3'); |
|
| 384 | - |
|
| 385 | - /** |
|
| 386 | - * Filter the title classes |
|
| 387 | - * |
|
| 388 | - * @since 1.9.0 |
|
| 389 | - * @param string $title_classes defaults to $post_type-title |
|
| 390 | - */ |
|
| 391 | - $title_classes = apply_filters('sensei_the_title_classes', $post->post_type . '-title' ); |
|
| 392 | - |
|
| 393 | - $html= ''; |
|
| 394 | - $html .= '<'. $title_html_tag .' class="'. $title_classes .'" >'; |
|
| 395 | - $html .= '<a href="' . get_permalink( $post->ID ) . '" >'; |
|
| 396 | - $html .= $post->post_title ; |
|
| 397 | - $html .= '</a>'; |
|
| 398 | - $html .= '</'. $title_html_tag. '>'; |
|
| 399 | - echo $html; |
|
| 400 | - |
|
| 401 | - }// end the title |
|
| 402 | - |
|
| 403 | - /** |
|
| 404 | - * This function adds the hooks inside and above the single course content for |
|
| 405 | - * backwards compatibility sake. |
|
| 406 | - * |
|
| 407 | - * @since 1.9.0 |
|
| 408 | - * @deprecated 1.9.0 |
|
| 409 | - */ |
|
| 410 | - public static function deprecated_single_course_inside_before_hooks(){ |
|
| 411 | - |
|
| 412 | - sensei_do_deprecated_action('sensei_course_image','1.9.0', 'sensei_single_course_content_inside_before', array( get_the_ID()) ); |
|
| 413 | - sensei_do_deprecated_action('sensei_course_single_title','1.9.0', 'sensei_single_course_content_inside_before' ); |
|
| 414 | - sensei_do_deprecated_action('sensei_course_single_meta','1.9.0', 'sensei_single_course_content_inside_before' ); |
|
| 415 | - |
|
| 416 | - }// end deprecated_single_course_inside_before_hooks |
|
| 417 | - |
|
| 418 | - /** |
|
| 419 | - * This function adds the hooks to sensei_course_single_lessons for |
|
| 420 | - * backwards compatibility sake. and provides developers with an alternative. |
|
| 421 | - * |
|
| 422 | - * @since 1.9.0 |
|
| 423 | - * @deprecated 1.9.0 |
|
| 424 | - */ |
|
| 425 | - public static function deprecate_sensei_course_single_lessons_hook(){ |
|
| 363 | + /** |
|
| 364 | + * A generic function for echoing the post title |
|
| 365 | + * |
|
| 366 | + * @since 1.9.0 |
|
| 367 | + * @param WP_Post $post |
|
| 368 | + */ |
|
| 369 | + public static function the_title( $post ){ |
|
| 370 | + |
|
| 371 | + // ID passed in |
|
| 372 | + if( is_numeric( $post ) ){ |
|
| 373 | + $post = get_post( $post ); |
|
| 374 | + } |
|
| 375 | + |
|
| 376 | + /** |
|
| 377 | + * Filter the template html tag for the title |
|
| 378 | + * |
|
| 379 | + * @since 1.9.0 |
|
| 380 | + * |
|
| 381 | + * @param $title_html_tag default is 'h3' |
|
| 382 | + */ |
|
| 383 | + $title_html_tag = apply_filters('sensei_the_title_html_tag','h3'); |
|
| 384 | + |
|
| 385 | + /** |
|
| 386 | + * Filter the title classes |
|
| 387 | + * |
|
| 388 | + * @since 1.9.0 |
|
| 389 | + * @param string $title_classes defaults to $post_type-title |
|
| 390 | + */ |
|
| 391 | + $title_classes = apply_filters('sensei_the_title_classes', $post->post_type . '-title' ); |
|
| 392 | + |
|
| 393 | + $html= ''; |
|
| 394 | + $html .= '<'. $title_html_tag .' class="'. $title_classes .'" >'; |
|
| 395 | + $html .= '<a href="' . get_permalink( $post->ID ) . '" >'; |
|
| 396 | + $html .= $post->post_title ; |
|
| 397 | + $html .= '</a>'; |
|
| 398 | + $html .= '</'. $title_html_tag. '>'; |
|
| 399 | + echo $html; |
|
| 400 | + |
|
| 401 | + }// end the title |
|
| 402 | + |
|
| 403 | + /** |
|
| 404 | + * This function adds the hooks inside and above the single course content for |
|
| 405 | + * backwards compatibility sake. |
|
| 406 | + * |
|
| 407 | + * @since 1.9.0 |
|
| 408 | + * @deprecated 1.9.0 |
|
| 409 | + */ |
|
| 410 | + public static function deprecated_single_course_inside_before_hooks(){ |
|
| 411 | + |
|
| 412 | + sensei_do_deprecated_action('sensei_course_image','1.9.0', 'sensei_single_course_content_inside_before', array( get_the_ID()) ); |
|
| 413 | + sensei_do_deprecated_action('sensei_course_single_title','1.9.0', 'sensei_single_course_content_inside_before' ); |
|
| 414 | + sensei_do_deprecated_action('sensei_course_single_meta','1.9.0', 'sensei_single_course_content_inside_before' ); |
|
| 415 | + |
|
| 416 | + }// end deprecated_single_course_inside_before_hooks |
|
| 417 | + |
|
| 418 | + /** |
|
| 419 | + * This function adds the hooks to sensei_course_single_lessons for |
|
| 420 | + * backwards compatibility sake. and provides developers with an alternative. |
|
| 421 | + * |
|
| 422 | + * @since 1.9.0 |
|
| 423 | + * @deprecated 1.9.0 |
|
| 424 | + */ |
|
| 425 | + public static function deprecate_sensei_course_single_lessons_hook(){ |
|
| 426 | 426 | |
| 427 | - sensei_do_deprecated_action('sensei_course_single_lessons','1.9.0', 'sensei_single_course_content_inside_after'); |
|
| 427 | + sensei_do_deprecated_action('sensei_course_single_lessons','1.9.0', 'sensei_single_course_content_inside_after'); |
|
| 428 | 428 | |
| 429 | - }// deprecate_sensei_course_single_lessons_hook |
|
| 429 | + }// deprecate_sensei_course_single_lessons_hook |
|
| 430 | 430 | |
| 431 | - /** |
|
| 432 | - * Deprecated all deprecated_single_main_content_hook hooked actions. |
|
| 433 | - * |
|
| 434 | - * The content must be dealt with inside the respective templates. |
|
| 435 | - * |
|
| 436 | - * @since 1.9.0 |
|
| 437 | - * @deprecated 1.9.0 |
|
| 438 | - */ |
|
| 439 | - public static function deprecated_single_main_content_hook(){ |
|
| 431 | + /** |
|
| 432 | + * Deprecated all deprecated_single_main_content_hook hooked actions. |
|
| 433 | + * |
|
| 434 | + * The content must be dealt with inside the respective templates. |
|
| 435 | + * |
|
| 436 | + * @since 1.9.0 |
|
| 437 | + * @deprecated 1.9.0 |
|
| 438 | + */ |
|
| 439 | + public static function deprecated_single_main_content_hook(){ |
|
| 440 | 440 | |
| 441 | - if( is_singular( 'course' ) ) { |
|
| 441 | + if( is_singular( 'course' ) ) { |
|
| 442 | 442 | |
| 443 | - sensei_do_deprecated_action('sensei_single_main_content', '1.9.0', 'sensei_single_course_content_inside_before or sensei_single_course_content_inside_after'); |
|
| 444 | - |
|
| 445 | - } elseif( is_singular( 'message' ) ){ |
|
| 446 | - |
|
| 447 | - sensei_do_deprecated_action('sensei_single_main_content', '1.9.0', 'sensei_single_message_content_inside_before or sensei_single_message_content_inside_after'); |
|
| 448 | - } |
|
| 449 | - |
|
| 450 | - }// end deprecated_single_course_single_main_content_hook |
|
| 451 | - |
|
| 452 | - /** |
|
| 453 | - * Deprecate the old sensei modules |
|
| 454 | - * @since 1.9.0 |
|
| 455 | - * @deprecated since 1.9.0 |
|
| 456 | - */ |
|
| 457 | - public static function deprecate_module_before_hook(){ |
|
| 443 | + sensei_do_deprecated_action('sensei_single_main_content', '1.9.0', 'sensei_single_course_content_inside_before or sensei_single_course_content_inside_after'); |
|
| 444 | + |
|
| 445 | + } elseif( is_singular( 'message' ) ){ |
|
| 446 | + |
|
| 447 | + sensei_do_deprecated_action('sensei_single_main_content', '1.9.0', 'sensei_single_message_content_inside_before or sensei_single_message_content_inside_after'); |
|
| 448 | + } |
|
| 449 | + |
|
| 450 | + }// end deprecated_single_course_single_main_content_hook |
|
| 451 | + |
|
| 452 | + /** |
|
| 453 | + * Deprecate the old sensei modules |
|
| 454 | + * @since 1.9.0 |
|
| 455 | + * @deprecated since 1.9.0 |
|
| 456 | + */ |
|
| 457 | + public static function deprecate_module_before_hook(){ |
|
| 458 | 458 | |
| 459 | - sensei_do_deprecated_action('sensei_modules_page_before', '1.9.0','sensei_single_course_modules_after' ); |
|
| 459 | + sensei_do_deprecated_action('sensei_modules_page_before', '1.9.0','sensei_single_course_modules_after' ); |
|
| 460 | 460 | |
| 461 | - } |
|
| 462 | - |
|
| 463 | - /** |
|
| 464 | - * Deprecate the old sensei modules after hooks |
|
| 465 | - * @since 1.9.0 |
|
| 466 | - * @deprecated since 1.9.0 |
|
| 467 | - */ |
|
| 468 | - public static function deprecate_module_after_hook(){ |
|
| 461 | + } |
|
| 462 | + |
|
| 463 | + /** |
|
| 464 | + * Deprecate the old sensei modules after hooks |
|
| 465 | + * @since 1.9.0 |
|
| 466 | + * @deprecated since 1.9.0 |
|
| 467 | + */ |
|
| 468 | + public static function deprecate_module_after_hook(){ |
|
| 469 | 469 | |
| 470 | - sensei_do_deprecated_action('sensei_modules_page_after', '1.9.0','sensei_single_course_modules_after' ); |
|
| 470 | + sensei_do_deprecated_action('sensei_modules_page_after', '1.9.0','sensei_single_course_modules_after' ); |
|
| 471 | 471 | |
| 472 | - } |
|
| 472 | + } |
|
| 473 | 473 | |
| 474 | - /** |
|
| 475 | - * Deprecate the single message hooks for post types. |
|
| 476 | - * |
|
| 477 | - * @since 1.9.0 |
|
| 478 | - * @deprecated since 1.9.0 |
|
| 479 | - */ |
|
| 480 | - public static function deprecate_all_post_type_single_title_hooks(){ |
|
| 474 | + /** |
|
| 475 | + * Deprecate the single message hooks for post types. |
|
| 476 | + * |
|
| 477 | + * @since 1.9.0 |
|
| 478 | + * @deprecated since 1.9.0 |
|
| 479 | + */ |
|
| 480 | + public static function deprecate_all_post_type_single_title_hooks(){ |
|
| 481 | 481 | |
| 482 | - if( is_singular( 'sensei_message' ) ){ |
|
| 482 | + if( is_singular( 'sensei_message' ) ){ |
|
| 483 | 483 | |
| 484 | - sensei_do_deprecated_action( 'sensei_message_single_title', '1.9.0', 'sensei_single_message_content_inside_before' ); |
|
| 484 | + sensei_do_deprecated_action( 'sensei_message_single_title', '1.9.0', 'sensei_single_message_content_inside_before' ); |
|
| 485 | 485 | |
| 486 | - } |
|
| 486 | + } |
|
| 487 | 487 | |
| 488 | - } |
|
| 488 | + } |
|
| 489 | 489 | |
| 490 | - /** |
|
| 491 | - * course_single_meta function. |
|
| 492 | - * |
|
| 493 | - * @access public |
|
| 494 | - * @return void |
|
| 495 | - * @deprecated since 1.9.0 |
|
| 496 | - */ |
|
| 497 | - public static function deprecate_course_single_meta_hooks() { |
|
| 490 | + /** |
|
| 491 | + * course_single_meta function. |
|
| 492 | + * |
|
| 493 | + * @access public |
|
| 494 | + * @return void |
|
| 495 | + * @deprecated since 1.9.0 |
|
| 496 | + */ |
|
| 497 | + public static function deprecate_course_single_meta_hooks() { |
|
| 498 | 498 | |
| 499 | - // deprecate all these hooks |
|
| 500 | - sensei_do_deprecated_action('sensei_course_start','1.9.0', 'sensei_single_course_content_inside_before' ); |
|
| 501 | - sensei_do_deprecated_action('sensei_woocommerce_in_cart_message','1.9.0', 'sensei_single_course_content_inside_before' ); |
|
| 502 | - sensei_do_deprecated_action('sensei_course_meta','1.9.0', 'sensei_single_course_content_inside_before' ); |
|
| 503 | - sensei_do_deprecated_action('sensei_course_meta_video','1.9.0', 'sensei_single_course_content_inside_before' ); |
|
| 499 | + // deprecate all these hooks |
|
| 500 | + sensei_do_deprecated_action('sensei_course_start','1.9.0', 'sensei_single_course_content_inside_before' ); |
|
| 501 | + sensei_do_deprecated_action('sensei_woocommerce_in_cart_message','1.9.0', 'sensei_single_course_content_inside_before' ); |
|
| 502 | + sensei_do_deprecated_action('sensei_course_meta','1.9.0', 'sensei_single_course_content_inside_before' ); |
|
| 503 | + sensei_do_deprecated_action('sensei_course_meta_video','1.9.0', 'sensei_single_course_content_inside_before' ); |
|
| 504 | 504 | |
| 505 | - } // End deprecate_course_single_meta_hooks |
|
| 505 | + } // End deprecate_course_single_meta_hooks |
|
| 506 | 506 | |
| 507 | - /** |
|
| 508 | - * Run the deprecated hooks on the single lesson page |
|
| 509 | - * @deprecated since 1.9.0 |
|
| 510 | - */ |
|
| 511 | - public static function deprecate_single_lesson_breadcrumbs_and_comments_hooks() { |
|
| 507 | + /** |
|
| 508 | + * Run the deprecated hooks on the single lesson page |
|
| 509 | + * @deprecated since 1.9.0 |
|
| 510 | + */ |
|
| 511 | + public static function deprecate_single_lesson_breadcrumbs_and_comments_hooks() { |
|
| 512 | 512 | |
| 513 | - if( is_singular( 'lesson' ) ){ |
|
| 513 | + if( is_singular( 'lesson' ) ){ |
|
| 514 | 514 | |
| 515 | - sensei_do_deprecated_action( 'sensei_breadcrumb','1.9.0','sensei_after_main_content', get_the_ID() ); |
|
| 516 | - sensei_do_deprecated_action( 'sensei_comments','1.9.0','sensei_after_main_content', get_the_ID() ); |
|
| 515 | + sensei_do_deprecated_action( 'sensei_breadcrumb','1.9.0','sensei_after_main_content', get_the_ID() ); |
|
| 516 | + sensei_do_deprecated_action( 'sensei_comments','1.9.0','sensei_after_main_content', get_the_ID() ); |
|
| 517 | 517 | |
| 518 | - } |
|
| 518 | + } |
|
| 519 | 519 | |
| 520 | - }// end sensei_deprecate_single_lesson_breadcrumbs_and_comments_hooks |
|
| 520 | + }// end sensei_deprecate_single_lesson_breadcrumbs_and_comments_hooks |
|
| 521 | 521 | |
| 522 | - /** |
|
| 523 | - * Deprecate the hook sensei_lesson_course_signup. |
|
| 524 | - * |
|
| 525 | - * The hook content will be linked directly on the recommended |
|
| 526 | - * sensei_single_lesson_content_inside_after |
|
| 527 | - * |
|
| 528 | - * @deprecated since 1.9.0 |
|
| 529 | - */ |
|
| 530 | - public static function deprecate_sensei_lesson_course_signup_hook(){ |
|
| 522 | + /** |
|
| 523 | + * Deprecate the hook sensei_lesson_course_signup. |
|
| 524 | + * |
|
| 525 | + * The hook content will be linked directly on the recommended |
|
| 526 | + * sensei_single_lesson_content_inside_after |
|
| 527 | + * |
|
| 528 | + * @deprecated since 1.9.0 |
|
| 529 | + */ |
|
| 530 | + public static function deprecate_sensei_lesson_course_signup_hook(){ |
|
| 531 | 531 | |
| 532 | - $lesson_course_id = get_post_meta( get_the_ID(), '_lesson_course', true ); |
|
| 533 | - $user_taking_course = Sensei_Utils::user_started_course( $lesson_course_id, get_current_user_id() ); |
|
| 532 | + $lesson_course_id = get_post_meta( get_the_ID(), '_lesson_course', true ); |
|
| 533 | + $user_taking_course = Sensei_Utils::user_started_course( $lesson_course_id, get_current_user_id() ); |
|
| 534 | 534 | |
| 535 | - if( !$user_taking_course ) { |
|
| 535 | + if( !$user_taking_course ) { |
|
| 536 | 536 | |
| 537 | - sensei_do_deprecated_action( 'sensei_lesson_course_signup','1.9.0', 'sensei_single_lesson_content_inside_after', $lesson_course_id ); |
|
| 537 | + sensei_do_deprecated_action( 'sensei_lesson_course_signup','1.9.0', 'sensei_single_lesson_content_inside_after', $lesson_course_id ); |
|
| 538 | 538 | |
| 539 | - } |
|
| 540 | - }// end deprecate_sensei_lesson_course_signup_hook |
|
| 539 | + } |
|
| 540 | + }// end deprecate_sensei_lesson_course_signup_hook |
|
| 541 | 541 | |
| 542 | - /** |
|
| 543 | - * Running the deprecated hook: sensei_lesson_single_meta |
|
| 544 | - * |
|
| 545 | - * @since 1.9.0 |
|
| 546 | - * @deprecated since 1.9.0 |
|
| 547 | - */ |
|
| 548 | - public static function deprecate_sensei_lesson_single_meta_hook(){ |
|
| 542 | + /** |
|
| 543 | + * Running the deprecated hook: sensei_lesson_single_meta |
|
| 544 | + * |
|
| 545 | + * @since 1.9.0 |
|
| 546 | + * @deprecated since 1.9.0 |
|
| 547 | + */ |
|
| 548 | + public static function deprecate_sensei_lesson_single_meta_hook(){ |
|
| 549 | 549 | |
| 550 | - if ( sensei_can_user_view_lesson() ) { |
|
| 550 | + if ( sensei_can_user_view_lesson() ) { |
|
| 551 | 551 | |
| 552 | - sensei_do_deprecated_action( 'sensei_lesson_single_meta', '1.9.0', 'sensei_single_lesson_content_inside_after' ); |
|
| 552 | + sensei_do_deprecated_action( 'sensei_lesson_single_meta', '1.9.0', 'sensei_single_lesson_content_inside_after' ); |
|
| 553 | 553 | |
| 554 | 554 | |
| 555 | - } |
|
| 555 | + } |
|
| 556 | 556 | |
| 557 | - }// end deprecate_sensei_lesson_single_meta_hook |
|
| 557 | + }// end deprecate_sensei_lesson_single_meta_hook |
|
| 558 | 558 | |
| 559 | - /** |
|
| 560 | - * Deprecate the sensei lesson single title hook |
|
| 561 | - * @deprecated since 1.9.0 |
|
| 562 | - */ |
|
| 563 | - public static function deprecate_sensei_lesson_single_title(){ |
|
| 559 | + /** |
|
| 560 | + * Deprecate the sensei lesson single title hook |
|
| 561 | + * @deprecated since 1.9.0 |
|
| 562 | + */ |
|
| 563 | + public static function deprecate_sensei_lesson_single_title(){ |
|
| 564 | 564 | |
| 565 | - sensei_do_deprecated_action( 'sensei_lesson_single_title', '1.9.0', 'sensei_single_lesson_content_inside_before', get_the_ID() ); |
|
| 565 | + sensei_do_deprecated_action( 'sensei_lesson_single_title', '1.9.0', 'sensei_single_lesson_content_inside_before', get_the_ID() ); |
|
| 566 | 566 | |
| 567 | - }// end deprecate_sensei_lesson_single_title |
|
| 567 | + }// end deprecate_sensei_lesson_single_title |
|
| 568 | 568 | |
| 569 | - /** |
|
| 570 | - * hook in the deperecated single main content to the lesson |
|
| 571 | - * @deprecated since 1.9.0 |
|
| 572 | - */ |
|
| 573 | - public static function deprecate_lesson_single_main_content_hook(){ |
|
| 569 | + /** |
|
| 570 | + * hook in the deperecated single main content to the lesson |
|
| 571 | + * @deprecated since 1.9.0 |
|
| 572 | + */ |
|
| 573 | + public static function deprecate_lesson_single_main_content_hook(){ |
|
| 574 | 574 | |
| 575 | - sensei_do_deprecated_action( 'sensei_single_main_content', '1.9.0', 'sensei_single_lesson_content_inside_before' ); |
|
| 575 | + sensei_do_deprecated_action( 'sensei_single_main_content', '1.9.0', 'sensei_single_lesson_content_inside_before' ); |
|
| 576 | 576 | |
| 577 | - }// end sensei_deprecate_lesson_single_main_content_hook |
|
| 577 | + }// end sensei_deprecate_lesson_single_main_content_hook |
|
| 578 | 578 | |
| 579 | - /** |
|
| 580 | - * hook in the deperecated single main content to the lesson |
|
| 581 | - * @deprecated since 1.9.0 |
|
| 582 | - */ |
|
| 583 | - public static function deprecate_lesson_image_hook(){ |
|
| 579 | + /** |
|
| 580 | + * hook in the deperecated single main content to the lesson |
|
| 581 | + * @deprecated since 1.9.0 |
|
| 582 | + */ |
|
| 583 | + public static function deprecate_lesson_image_hook(){ |
|
| 584 | 584 | |
| 585 | - sensei_do_deprecated_action( 'sensei_lesson_image', '1.9.0', 'sensei_single_lesson_content_inside_before', get_the_ID() ); |
|
| 585 | + sensei_do_deprecated_action( 'sensei_lesson_image', '1.9.0', 'sensei_single_lesson_content_inside_before', get_the_ID() ); |
|
| 586 | 586 | |
| 587 | - }// end sensei_deprecate_lesson_single_main_content_hook |
|
| 587 | + }// end sensei_deprecate_lesson_single_main_content_hook |
|
| 588 | 588 | |
| 589 | - /** |
|
| 590 | - * hook in the deprecated sensei_login_form hook for backwards |
|
| 591 | - * compatibility |
|
| 592 | - * |
|
| 593 | - * @since 1.9.0 |
|
| 594 | - * @deprecated since 1.9.0 |
|
| 595 | - */ |
|
| 596 | - public static function deprecate_sensei_login_form_hook(){ |
|
| 589 | + /** |
|
| 590 | + * hook in the deprecated sensei_login_form hook for backwards |
|
| 591 | + * compatibility |
|
| 592 | + * |
|
| 593 | + * @since 1.9.0 |
|
| 594 | + * @deprecated since 1.9.0 |
|
| 595 | + */ |
|
| 596 | + public static function deprecate_sensei_login_form_hook(){ |
|
| 597 | 597 | |
| 598 | - sensei_do_deprecated_action( 'sensei_login_form', '1.9.0', 'sensei_login_form_before' ); |
|
| 598 | + sensei_do_deprecated_action( 'sensei_login_form', '1.9.0', 'sensei_login_form_before' ); |
|
| 599 | 599 | |
| 600 | - } // end deprecate_sensei_login_form_hook |
|
| 600 | + } // end deprecate_sensei_login_form_hook |
|
| 601 | 601 | |
| 602 | - /** |
|
| 603 | - * Fire the sensei_complete_course action. |
|
| 604 | - * |
|
| 605 | - * This is just a backwards compatible function to add the action |
|
| 606 | - * to a template. This should not be used as the function from this |
|
| 607 | - * hook will be added directly to my-courses page via one of the hooks there. |
|
| 608 | - * |
|
| 609 | - * @since 1.9.0 |
|
| 610 | - */ |
|
| 611 | - public static function fire_sensei_complete_course_hook(){ |
|
| 602 | + /** |
|
| 603 | + * Fire the sensei_complete_course action. |
|
| 604 | + * |
|
| 605 | + * This is just a backwards compatible function to add the action |
|
| 606 | + * to a template. This should not be used as the function from this |
|
| 607 | + * hook will be added directly to my-courses page via one of the hooks there. |
|
| 608 | + * |
|
| 609 | + * @since 1.9.0 |
|
| 610 | + */ |
|
| 611 | + public static function fire_sensei_complete_course_hook(){ |
|
| 612 | 612 | |
| 613 | - do_action( 'sensei_complete_course' ); |
|
| 613 | + do_action( 'sensei_complete_course' ); |
|
| 614 | 614 | |
| 615 | - } //fire_sensei_complete_course_hook |
|
| 615 | + } //fire_sensei_complete_course_hook |
|
| 616 | 616 | |
| 617 | - /** |
|
| 618 | - * Fire the frontend message hook |
|
| 619 | - * |
|
| 620 | - * @since 1.9.0 |
|
| 621 | - */ |
|
| 622 | - public static function fire_frontend_messages_hook(){ |
|
| 617 | + /** |
|
| 618 | + * Fire the frontend message hook |
|
| 619 | + * |
|
| 620 | + * @since 1.9.0 |
|
| 621 | + */ |
|
| 622 | + public static function fire_frontend_messages_hook(){ |
|
| 623 | 623 | |
| 624 | - do_action( 'sensei_frontend_messages' ); |
|
| 624 | + do_action( 'sensei_frontend_messages' ); |
|
| 625 | 625 | |
| 626 | - }// end sensei_complete_course_action |
|
| 626 | + }// end sensei_complete_course_action |
|
| 627 | 627 | |
| 628 | - /** |
|
| 629 | - * deprecate the sensei_before_user_course_content hook in favor |
|
| 630 | - * of sensei_my_courses_content_inside_before. |
|
| 631 | - * |
|
| 632 | - * @deprected since 1.9.0 |
|
| 633 | - */ |
|
| 634 | - public static function deprecate_sensei_before_user_course_content_hook(){ |
|
| 628 | + /** |
|
| 629 | + * deprecate the sensei_before_user_course_content hook in favor |
|
| 630 | + * of sensei_my_courses_content_inside_before. |
|
| 631 | + * |
|
| 632 | + * @deprected since 1.9.0 |
|
| 633 | + */ |
|
| 634 | + public static function deprecate_sensei_before_user_course_content_hook(){ |
|
| 635 | 635 | |
| 636 | - sensei_do_deprecated_action( 'sensei_before_user_course_content','1.9.0', 'sensei_my_courses_content_inside_before' , wp_get_current_user() ); |
|
| 636 | + sensei_do_deprecated_action( 'sensei_before_user_course_content','1.9.0', 'sensei_my_courses_content_inside_before' , wp_get_current_user() ); |
|
| 637 | 637 | |
| 638 | - }// deprecate_sensei_before_user_course_content_hook |
|
| 638 | + }// deprecate_sensei_before_user_course_content_hook |
|
| 639 | 639 | |
| 640 | - /** |
|
| 641 | - * deprecate the sensei_before_user_course_content hook in favor |
|
| 642 | - * of sensei_my_courses_content_inside_after hook. |
|
| 643 | - * |
|
| 644 | - * @deprected since 1.9.0 |
|
| 645 | - */ |
|
| 646 | - public static function deprecate_sensei_after_user_course_content_hook(){ |
|
| 640 | + /** |
|
| 641 | + * deprecate the sensei_before_user_course_content hook in favor |
|
| 642 | + * of sensei_my_courses_content_inside_after hook. |
|
| 643 | + * |
|
| 644 | + * @deprected since 1.9.0 |
|
| 645 | + */ |
|
| 646 | + public static function deprecate_sensei_after_user_course_content_hook(){ |
|
| 647 | 647 | |
| 648 | - sensei_do_deprecated_action( 'sensei_after_user_course_content','1.9.0', 'sensei_my_courses_content_inside_after' , wp_get_current_user() ); |
|
| 648 | + sensei_do_deprecated_action( 'sensei_after_user_course_content','1.9.0', 'sensei_my_courses_content_inside_after' , wp_get_current_user() ); |
|
| 649 | 649 | |
| 650 | - }// deprecate_sensei_after_user_course_content_hook |
|
| 650 | + }// deprecate_sensei_after_user_course_content_hook |
|
| 651 | 651 | |
| 652 | - /** |
|
| 653 | - * Deprecate the 2 main hooks on the archive message template |
|
| 654 | - * |
|
| 655 | - * @deprecated since 1.9.0 |
|
| 656 | - * @since 1.9.0 |
|
| 657 | - */ |
|
| 658 | - public static function deprecated_archive_message_hooks (){ |
|
| 659 | - |
|
| 660 | - sensei_do_deprecated_action('sensei_message_archive_main_content', '1.9.0', 'sensei_archive_before_message_loop OR sensei_archive_after_message_loop' ); |
|
| 661 | - sensei_do_deprecated_action('sensei_message_archive_header', '1.9.0', 'sensei_archive_before_message_loop' ); |
|
| 652 | + /** |
|
| 653 | + * Deprecate the 2 main hooks on the archive message template |
|
| 654 | + * |
|
| 655 | + * @deprecated since 1.9.0 |
|
| 656 | + * @since 1.9.0 |
|
| 657 | + */ |
|
| 658 | + public static function deprecated_archive_message_hooks (){ |
|
| 659 | + |
|
| 660 | + sensei_do_deprecated_action('sensei_message_archive_main_content', '1.9.0', 'sensei_archive_before_message_loop OR sensei_archive_after_message_loop' ); |
|
| 661 | + sensei_do_deprecated_action('sensei_message_archive_header', '1.9.0', 'sensei_archive_before_message_loop' ); |
|
| 662 | 662 | |
| 663 | - } |
|
| 663 | + } |
|
| 664 | 664 | |
| 665 | - /** |
|
| 666 | - * Run the sensei_complete_quiz for those still hooking |
|
| 667 | - * into but deprecated it. |
|
| 668 | - * |
|
| 669 | - * @deprecated since 1.9.0 |
|
| 670 | - */ |
|
| 671 | - public static function deprecate_sensei_complete_quiz_action(){ |
|
| 665 | + /** |
|
| 666 | + * Run the sensei_complete_quiz for those still hooking |
|
| 667 | + * into but deprecated it. |
|
| 668 | + * |
|
| 669 | + * @deprecated since 1.9.0 |
|
| 670 | + */ |
|
| 671 | + public static function deprecate_sensei_complete_quiz_action(){ |
|
| 672 | 672 | |
| 673 | - sensei_do_deprecated_action( 'sensei_complete_quiz', '1.9.0', 'sensei_single_quiz_content_inside_before' ); |
|
| 673 | + sensei_do_deprecated_action( 'sensei_complete_quiz', '1.9.0', 'sensei_single_quiz_content_inside_before' ); |
|
| 674 | 674 | |
| 675 | - } |
|
| 675 | + } |
|
| 676 | 676 | |
| 677 | - /** |
|
| 678 | - * Run the sensei_quiz_question_type action for those still hooing into it, but depreate |
|
| 679 | - * it to provide user with a better alternative. |
|
| 680 | - * |
|
| 681 | - * @deprecated since 1.9.0 |
|
| 682 | - */ |
|
| 683 | - public static function deprecate_sensei_quiz_question_type_action(){ |
|
| 677 | + /** |
|
| 678 | + * Run the sensei_quiz_question_type action for those still hooing into it, but depreate |
|
| 679 | + * it to provide user with a better alternative. |
|
| 680 | + * |
|
| 681 | + * @deprecated since 1.9.0 |
|
| 682 | + */ |
|
| 683 | + public static function deprecate_sensei_quiz_question_type_action(){ |
|
| 684 | 684 | |
| 685 | - // Question Type |
|
| 686 | - global $sensei_question_loop; |
|
| 687 | - $question_type = Sensei()->question->get_question_type($sensei_question_loop['current_question']->ID); |
|
| 688 | - sensei_do_deprecated_action('sensei_quiz_question_type', '1.9.0', 'sensei_quiz_question_inside_after', $question_type); |
|
| 689 | - |
|
| 690 | - } |
|
| 685 | + // Question Type |
|
| 686 | + global $sensei_question_loop; |
|
| 687 | + $question_type = Sensei()->question->get_question_type($sensei_question_loop['current_question']->ID); |
|
| 688 | + sensei_do_deprecated_action('sensei_quiz_question_type', '1.9.0', 'sensei_quiz_question_inside_after', $question_type); |
|
| 689 | + |
|
| 690 | + } |
|
| 691 | 691 | }//end class |
@@ -1,14 +1,14 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The Template for displaying all Quiz Questions. |
|
| 4 | - * |
|
| 5 | - * Override this template by copying it to yourtheme/sensei/single-quiz.php |
|
| 6 | - * |
|
| 7 | - * @author Automattic |
|
| 8 | - * @package Sensei |
|
| 9 | - * @category Templates |
|
| 10 | - * @version 1.9.0 |
|
| 11 | - */ |
|
| 3 | + * The Template for displaying all Quiz Questions. |
|
| 4 | + * |
|
| 5 | + * Override this template by copying it to yourtheme/sensei/single-quiz.php |
|
| 6 | + * |
|
| 7 | + * @author Automattic |
|
| 8 | + * @package Sensei |
|
| 9 | + * @category Templates |
|
| 10 | + * @version 1.9.0 |
|
| 11 | + */ |
|
| 12 | 12 | ?> |
| 13 | 13 | |
| 14 | 14 | <?php get_sensei_header(); ?> |
@@ -17,19 +17,19 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | <?php |
| 19 | 19 | |
| 20 | - /** |
|
| 21 | - * Hook inside the single quiz post above the content |
|
| 22 | - * |
|
| 23 | - * @since 1.9.0 |
|
| 24 | - * |
|
| 25 | - * @hooked Sensei_Quiz::the_title - 20 |
|
| 26 | - * @hooked Sensei_Quiz::the_user_status_message - 40 |
|
| 27 | - * @param integer $quiz_id |
|
| 28 | - * |
|
| 29 | - */ |
|
| 30 | - do_action( 'sensei_single_quiz_content_inside_before', get_the_ID() ); |
|
| 20 | + /** |
|
| 21 | + * Hook inside the single quiz post above the content |
|
| 22 | + * |
|
| 23 | + * @since 1.9.0 |
|
| 24 | + * |
|
| 25 | + * @hooked Sensei_Quiz::the_title - 20 |
|
| 26 | + * @hooked Sensei_Quiz::the_user_status_message - 40 |
|
| 27 | + * @param integer $quiz_id |
|
| 28 | + * |
|
| 29 | + */ |
|
| 30 | + do_action( 'sensei_single_quiz_content_inside_before', get_the_ID() ); |
|
| 31 | 31 | |
| 32 | - ?> |
|
| 32 | + ?> |
|
| 33 | 33 | |
| 34 | 34 | <section class="entry quiz-questions"> |
| 35 | 35 | |
@@ -39,16 +39,16 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | <?php |
| 41 | 41 | |
| 42 | - /** |
|
| 43 | - * Action inside before the question content on single-quiz page |
|
| 44 | - * |
|
| 45 | - * @hooked WooThemes_Sensei_Quiz::the_user_status_message - 10 |
|
| 46 | - * |
|
| 47 | - * @param string $the_quiz_id |
|
| 48 | - */ |
|
| 49 | - do_action( 'sensei_single_quiz_questions_before', get_the_id() ); |
|
| 42 | + /** |
|
| 43 | + * Action inside before the question content on single-quiz page |
|
| 44 | + * |
|
| 45 | + * @hooked WooThemes_Sensei_Quiz::the_user_status_message - 10 |
|
| 46 | + * |
|
| 47 | + * @param string $the_quiz_id |
|
| 48 | + */ |
|
| 49 | + do_action( 'sensei_single_quiz_questions_before', get_the_id() ); |
|
| 50 | 50 | |
| 51 | - ?> |
|
| 51 | + ?> |
|
| 52 | 52 | |
| 53 | 53 | |
| 54 | 54 | |
@@ -60,35 +60,35 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | <?php |
| 62 | 62 | |
| 63 | - /** |
|
| 64 | - * Action inside before the question content on single-quiz page |
|
| 65 | - * |
|
| 66 | - * @hooked WooThemes_Sensei_Question::the_question_title - 10 |
|
| 67 | - * @hooked WooThemes_Sensei_Question::the_question_description - 20 |
|
| 68 | - * @hooked WooThemes_Sensei_Question::the_question_media - 30 |
|
| 69 | - * @hooked WooThemes_Sensei_Question::the_question_hidden_field - 40 |
|
| 70 | - * |
|
| 71 | - * @since 1.9.0 |
|
| 72 | - * @param string $the_question_id |
|
| 73 | - */ |
|
| 74 | - do_action( 'sensei_quiz_question_inside_before', sensei_get_the_question_id() ); |
|
| 75 | - |
|
| 76 | - ?> |
|
| 63 | + /** |
|
| 64 | + * Action inside before the question content on single-quiz page |
|
| 65 | + * |
|
| 66 | + * @hooked WooThemes_Sensei_Question::the_question_title - 10 |
|
| 67 | + * @hooked WooThemes_Sensei_Question::the_question_description - 20 |
|
| 68 | + * @hooked WooThemes_Sensei_Question::the_question_media - 30 |
|
| 69 | + * @hooked WooThemes_Sensei_Question::the_question_hidden_field - 40 |
|
| 70 | + * |
|
| 71 | + * @since 1.9.0 |
|
| 72 | + * @param string $the_question_id |
|
| 73 | + */ |
|
| 74 | + do_action( 'sensei_quiz_question_inside_before', sensei_get_the_question_id() ); |
|
| 75 | + |
|
| 76 | + ?> |
|
| 77 | 77 | |
| 78 | 78 | <?php sensei_the_question_content(); ?> |
| 79 | 79 | |
| 80 | 80 | <?php |
| 81 | 81 | |
| 82 | - /** |
|
| 83 | - * Action inside before the question content on single-quiz page |
|
| 84 | - * |
|
| 85 | - * @hooked WooThemes_Sensei_Question::answer_feedback_notes |
|
| 86 | - * |
|
| 87 | - * @param string $the_question_id |
|
| 88 | - */ |
|
| 89 | - do_action( 'sensei_quiz_question_inside_after', sensei_get_the_question_id() ); |
|
| 82 | + /** |
|
| 83 | + * Action inside before the question content on single-quiz page |
|
| 84 | + * |
|
| 85 | + * @hooked WooThemes_Sensei_Question::answer_feedback_notes |
|
| 86 | + * |
|
| 87 | + * @param string $the_question_id |
|
| 88 | + */ |
|
| 89 | + do_action( 'sensei_quiz_question_inside_after', sensei_get_the_question_id() ); |
|
| 90 | 90 | |
| 91 | - ?> |
|
| 91 | + ?> |
|
| 92 | 92 | |
| 93 | 93 | </li> |
| 94 | 94 | |
@@ -98,14 +98,14 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | <?php |
| 100 | 100 | |
| 101 | - /** |
|
| 102 | - * Action inside before the question content on single-quiz page |
|
| 103 | - * |
|
| 104 | - * @param string $the_quiz_id |
|
| 105 | - */ |
|
| 106 | - do_action( 'sensei_single_quiz_questions_after', get_the_id() ); |
|
| 101 | + /** |
|
| 102 | + * Action inside before the question content on single-quiz page |
|
| 103 | + * |
|
| 104 | + * @param string $the_quiz_id |
|
| 105 | + */ |
|
| 106 | + do_action( 'sensei_single_quiz_questions_after', get_the_id() ); |
|
| 107 | 107 | |
| 108 | - ?> |
|
| 108 | + ?> |
|
| 109 | 109 | |
| 110 | 110 | </form> |
| 111 | 111 | <?php else: ?> |
@@ -116,25 +116,25 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | |
| 118 | 118 | <?php |
| 119 | - $quiz_lesson = Sensei()->quiz->data->quiz_lesson; |
|
| 120 | - do_action( 'sensei_quiz_back_link', $quiz_lesson ); |
|
| 121 | - ?> |
|
| 119 | + $quiz_lesson = Sensei()->quiz->data->quiz_lesson; |
|
| 120 | + do_action( 'sensei_quiz_back_link', $quiz_lesson ); |
|
| 121 | + ?> |
|
| 122 | 122 | |
| 123 | 123 | </section> |
| 124 | 124 | |
| 125 | 125 | <?php |
| 126 | 126 | |
| 127 | - /** |
|
| 128 | - * Hook inside the single quiz post above the content |
|
| 129 | - * |
|
| 130 | - * @since 1.9.0 |
|
| 131 | - * |
|
| 132 | - * @param integer $quiz_id |
|
| 133 | - * |
|
| 134 | - */ |
|
| 135 | - do_action( 'sensei_single_quiz_content_inside_after', get_the_ID() ); |
|
| 136 | - |
|
| 137 | - ?> |
|
| 127 | + /** |
|
| 128 | + * Hook inside the single quiz post above the content |
|
| 129 | + * |
|
| 130 | + * @since 1.9.0 |
|
| 131 | + * |
|
| 132 | + * @param integer $quiz_id |
|
| 133 | + * |
|
| 134 | + */ |
|
| 135 | + do_action( 'sensei_single_quiz_content_inside_after', get_the_ID() ); |
|
| 136 | + |
|
| 137 | + ?> |
|
| 138 | 138 | |
| 139 | 139 | </article><!-- .quiz --> |
| 140 | 140 | |
@@ -1,51 +1,51 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
| 3 | 3 | /** |
| 4 | - * Content-course.php template file |
|
| 5 | - * |
|
| 6 | - * responsible for content on archive like pages. Only shows the course excerpt. |
|
| 7 | - * |
|
| 8 | - * For single course content please see single-course.php |
|
| 9 | - * |
|
| 10 | - * @author Automattic |
|
| 11 | - * @package Sensei |
|
| 12 | - * @category Templates |
|
| 13 | - * @version 1.9.0 |
|
| 14 | - */ |
|
| 4 | + * Content-course.php template file |
|
| 5 | + * |
|
| 6 | + * responsible for content on archive like pages. Only shows the course excerpt. |
|
| 7 | + * |
|
| 8 | + * For single course content please see single-course.php |
|
| 9 | + * |
|
| 10 | + * @author Automattic |
|
| 11 | + * @package Sensei |
|
| 12 | + * @category Templates |
|
| 13 | + * @version 1.9.0 |
|
| 14 | + */ |
|
| 15 | 15 | ?> |
| 16 | 16 | |
| 17 | 17 | <li <?php post_class( WooThemes_Sensei_Course::get_course_loop_content_class() ); ?> > |
| 18 | 18 | |
| 19 | 19 | <?php |
| 20 | - /** |
|
| 21 | - * This action runs before the sensei course content. It runs inside the sensei |
|
| 22 | - * content-course.php template. |
|
| 23 | - * |
|
| 24 | - * @since 1.9 |
|
| 25 | - * |
|
| 26 | - * @param integer $course_id |
|
| 27 | - */ |
|
| 28 | - do_action( 'sensei_course_content_before', get_the_ID() ); |
|
| 29 | - ?> |
|
| 20 | + /** |
|
| 21 | + * This action runs before the sensei course content. It runs inside the sensei |
|
| 22 | + * content-course.php template. |
|
| 23 | + * |
|
| 24 | + * @since 1.9 |
|
| 25 | + * |
|
| 26 | + * @param integer $course_id |
|
| 27 | + */ |
|
| 28 | + do_action( 'sensei_course_content_before', get_the_ID() ); |
|
| 29 | + ?> |
|
| 30 | 30 | |
| 31 | 31 | <section class="course-content"> |
| 32 | 32 | |
| 33 | 33 | <section class="entry"> |
| 34 | 34 | |
| 35 | 35 | <?php |
| 36 | - /** |
|
| 37 | - * Fires just before the course content in the content-course.php file. |
|
| 38 | - * |
|
| 39 | - * @since 1.9 |
|
| 40 | - * |
|
| 41 | - * @param integer $course_id |
|
| 42 | - * |
|
| 43 | - * @hooked Sensei_Templates::the_title - 5 |
|
| 44 | - * @hooked Sensei()->course->course_image - 10 |
|
| 45 | - * @hooked Sensei()->course->the_course_meta - 20 |
|
| 46 | - */ |
|
| 47 | - do_action('sensei_course_content_inside_before', get_the_ID() ); |
|
| 48 | - ?> |
|
| 36 | + /** |
|
| 37 | + * Fires just before the course content in the content-course.php file. |
|
| 38 | + * |
|
| 39 | + * @since 1.9 |
|
| 40 | + * |
|
| 41 | + * @param integer $course_id |
|
| 42 | + * |
|
| 43 | + * @hooked Sensei_Templates::the_title - 5 |
|
| 44 | + * @hooked Sensei()->course->course_image - 10 |
|
| 45 | + * @hooked Sensei()->course->the_course_meta - 20 |
|
| 46 | + */ |
|
| 47 | + do_action('sensei_course_content_inside_before', get_the_ID() ); |
|
| 48 | + ?> |
|
| 49 | 49 | |
| 50 | 50 | <p class="course-excerpt"> |
| 51 | 51 | |
@@ -54,34 +54,34 @@ discard block |
||
| 54 | 54 | </p> |
| 55 | 55 | |
| 56 | 56 | <?php |
| 57 | - /** |
|
| 58 | - * Fires just after the course content in the content-course.php file. |
|
| 59 | - * |
|
| 60 | - * @since 1.9 |
|
| 61 | - * |
|
| 62 | - * @param integer $course_id |
|
| 63 | - * |
|
| 64 | - * @hooked Sensei()->course->the_course_free_lesson_preview - 20 |
|
| 65 | - */ |
|
| 66 | - do_action('sensei_course_content_inside_after', get_the_ID() ); |
|
| 67 | - ?> |
|
| 57 | + /** |
|
| 58 | + * Fires just after the course content in the content-course.php file. |
|
| 59 | + * |
|
| 60 | + * @since 1.9 |
|
| 61 | + * |
|
| 62 | + * @param integer $course_id |
|
| 63 | + * |
|
| 64 | + * @hooked Sensei()->course->the_course_free_lesson_preview - 20 |
|
| 65 | + */ |
|
| 66 | + do_action('sensei_course_content_inside_after', get_the_ID() ); |
|
| 67 | + ?> |
|
| 68 | 68 | |
| 69 | 69 | </section> <!-- section .entry --> |
| 70 | 70 | |
| 71 | 71 | </section> <!-- section .course-content --> |
| 72 | 72 | |
| 73 | 73 | <?php |
| 74 | - /** |
|
| 75 | - * Fires after the course block in the content-course.php file. |
|
| 76 | - * |
|
| 77 | - * @since 1.9 |
|
| 78 | - * |
|
| 79 | - * @param integer $course_id |
|
| 80 | - * |
|
| 81 | - * @hooked Sensei()->course->the_course_free_lesson_preview - 20 |
|
| 82 | - */ |
|
| 83 | - do_action('sensei_course_content_after', get_the_ID() ); |
|
| 84 | - ?> |
|
| 74 | + /** |
|
| 75 | + * Fires after the course block in the content-course.php file. |
|
| 76 | + * |
|
| 77 | + * @since 1.9 |
|
| 78 | + * |
|
| 79 | + * @param integer $course_id |
|
| 80 | + * |
|
| 81 | + * @hooked Sensei()->course->the_course_free_lesson_preview - 20 |
|
| 82 | + */ |
|
| 83 | + do_action('sensei_course_content_after', get_the_ID() ); |
|
| 84 | + ?> |
|
| 85 | 85 | |
| 86 | 86 | |
| 87 | 87 | </li> <!-- article .(<?php esc_attr_e( join( ' ', get_post_class( array( 'course', 'post' ) ) ) ); ?> --> |
| 88 | 88 | \ No newline at end of file |
@@ -19,62 +19,62 @@ |
||
| 19 | 19 | |
| 20 | 20 | <?php |
| 21 | 21 | |
| 22 | - /** |
|
| 23 | - * Hook inside the single lesson above the content |
|
| 24 | - * |
|
| 25 | - * @since 1.9.0 |
|
| 26 | - * |
|
| 27 | - * @param integer $lesson_id |
|
| 28 | - * |
|
| 29 | - * @hooked deprecated_lesson_image_hook - 10 |
|
| 30 | - * @hooked deprecate_sensei_lesson_single_title - 15 |
|
| 31 | - * @hooked Sensei_Lesson::lesson_image() - 17 |
|
| 32 | - * @hooked deprecate_lesson_single_main_content_hook - 20 |
|
| 33 | - */ |
|
| 34 | - do_action( 'sensei_single_lesson_content_inside_before', get_the_ID() ); |
|
| 35 | - |
|
| 36 | - ?> |
|
| 22 | + /** |
|
| 23 | + * Hook inside the single lesson above the content |
|
| 24 | + * |
|
| 25 | + * @since 1.9.0 |
|
| 26 | + * |
|
| 27 | + * @param integer $lesson_id |
|
| 28 | + * |
|
| 29 | + * @hooked deprecated_lesson_image_hook - 10 |
|
| 30 | + * @hooked deprecate_sensei_lesson_single_title - 15 |
|
| 31 | + * @hooked Sensei_Lesson::lesson_image() - 17 |
|
| 32 | + * @hooked deprecate_lesson_single_main_content_hook - 20 |
|
| 33 | + */ |
|
| 34 | + do_action( 'sensei_single_lesson_content_inside_before', get_the_ID() ); |
|
| 35 | + |
|
| 36 | + ?> |
|
| 37 | 37 | |
| 38 | 38 | <section class="entry fix"> |
| 39 | 39 | |
| 40 | 40 | <?php |
| 41 | 41 | |
| 42 | - if ( sensei_can_user_view_lesson() ) { |
|
| 42 | + if ( sensei_can_user_view_lesson() ) { |
|
| 43 | 43 | |
| 44 | - if( apply_filters( 'sensei_video_position', 'top', $post->ID ) == 'top' ) { |
|
| 44 | + if( apply_filters( 'sensei_video_position', 'top', $post->ID ) == 'top' ) { |
|
| 45 | 45 | |
| 46 | - do_action( 'sensei_lesson_video', $post->ID ); |
|
| 46 | + do_action( 'sensei_lesson_video', $post->ID ); |
|
| 47 | 47 | |
| 48 | - } |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - the_content(); |
|
| 50 | + the_content(); |
|
| 51 | 51 | |
| 52 | - } else { |
|
| 53 | - ?> |
|
| 52 | + } else { |
|
| 53 | + ?> |
|
| 54 | 54 | |
| 55 | 55 | <p> <?php the_excerpt(); ?> </p> |
| 56 | 56 | |
| 57 | 57 | <?php |
| 58 | - } |
|
| 58 | + } |
|
| 59 | 59 | |
| 60 | - ?> |
|
| 60 | + ?> |
|
| 61 | 61 | |
| 62 | 62 | </section> |
| 63 | 63 | |
| 64 | 64 | <?php |
| 65 | 65 | |
| 66 | - /** |
|
| 67 | - * Hook inside the single lesson template after the content |
|
| 68 | - * |
|
| 69 | - * @since 1.9.0 |
|
| 70 | - * |
|
| 71 | - * @param integer $lesson_id |
|
| 72 | - * |
|
| 73 | - * @hooked Sensei()->frontend->sensei_breadcrumb - 30 |
|
| 74 | - */ |
|
| 75 | - do_action( 'sensei_single_lesson_content_inside_after', get_the_ID() ); |
|
| 76 | - |
|
| 77 | - ?> |
|
| 66 | + /** |
|
| 67 | + * Hook inside the single lesson template after the content |
|
| 68 | + * |
|
| 69 | + * @since 1.9.0 |
|
| 70 | + * |
|
| 71 | + * @param integer $lesson_id |
|
| 72 | + * |
|
| 73 | + * @hooked Sensei()->frontend->sensei_breadcrumb - 30 |
|
| 74 | + */ |
|
| 75 | + do_action( 'sensei_single_lesson_content_inside_after', get_the_ID() ); |
|
| 76 | + |
|
| 77 | + ?> |
|
| 78 | 78 | |
| 79 | 79 | </article><!-- .post --> |
| 80 | 80 | |
@@ -1,17 +1,17 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
| 3 | 3 | /** |
| 4 | - * Content-lesson.php template file |
|
| 5 | - * |
|
| 6 | - * responsible for content on archive like pages. Only shows the lesson excerpt. |
|
| 7 | - * |
|
| 8 | - * For single lesson content please see single-lesson.php |
|
| 9 | - * |
|
| 10 | - * @author Automattic |
|
| 11 | - * @package Sensei |
|
| 12 | - * @category Templates |
|
| 13 | - * @version 1.9.0 |
|
| 14 | - */ |
|
| 4 | + * Content-lesson.php template file |
|
| 5 | + * |
|
| 6 | + * responsible for content on archive like pages. Only shows the lesson excerpt. |
|
| 7 | + * |
|
| 8 | + * For single lesson content please see single-lesson.php |
|
| 9 | + * |
|
| 10 | + * @author Automattic |
|
| 11 | + * @package Sensei |
|
| 12 | + * @category Templates |
|
| 13 | + * @version 1.9.0 |
|
| 14 | + */ |
|
| 15 | 15 | ?> |
| 16 | 16 | |
| 17 | 17 | <article <?php post_class( get_the_ID() ); ?> > |
@@ -19,32 +19,32 @@ discard block |
||
| 19 | 19 | <section class="lesson-content"> |
| 20 | 20 | |
| 21 | 21 | <?php |
| 22 | - /** |
|
| 23 | - * sensei_content_lesson_before |
|
| 24 | - * action that runs before the sensei {post_type} content. It runs inside the sensei |
|
| 25 | - * content.php template. This applies to the specific post type that you've targeted. |
|
| 26 | - * |
|
| 27 | - * @since 1.9.0 |
|
| 28 | - * @param string $lesson_id |
|
| 29 | - */ |
|
| 30 | - do_action( 'sensei_content_lesson_before', get_the_ID() ); |
|
| 31 | - ?> |
|
| 22 | + /** |
|
| 23 | + * sensei_content_lesson_before |
|
| 24 | + * action that runs before the sensei {post_type} content. It runs inside the sensei |
|
| 25 | + * content.php template. This applies to the specific post type that you've targeted. |
|
| 26 | + * |
|
| 27 | + * @since 1.9.0 |
|
| 28 | + * @param string $lesson_id |
|
| 29 | + */ |
|
| 30 | + do_action( 'sensei_content_lesson_before', get_the_ID() ); |
|
| 31 | + ?> |
|
| 32 | 32 | |
| 33 | 33 | <section class="entry"> |
| 34 | 34 | |
| 35 | 35 | <?php |
| 36 | - /** |
|
| 37 | - * Fires just before the post content in the content-lesson.php file. |
|
| 38 | - * |
|
| 39 | - * @since 1.9.0 |
|
| 40 | - * |
|
| 41 | - * @hooked Sensei()->modules->module_archive_description - 11 |
|
| 42 | - * @hooked Sensei_Lesson::the_lesson_meta - 20 |
|
| 43 | - * |
|
| 44 | - * @param string $lesson_id |
|
| 45 | - */ |
|
| 46 | - do_action('sensei_content_lesson_inside_before', get_the_ID()); |
|
| 47 | - ?> |
|
| 36 | + /** |
|
| 37 | + * Fires just before the post content in the content-lesson.php file. |
|
| 38 | + * |
|
| 39 | + * @since 1.9.0 |
|
| 40 | + * |
|
| 41 | + * @hooked Sensei()->modules->module_archive_description - 11 |
|
| 42 | + * @hooked Sensei_Lesson::the_lesson_meta - 20 |
|
| 43 | + * |
|
| 44 | + * @param string $lesson_id |
|
| 45 | + */ |
|
| 46 | + do_action('sensei_content_lesson_inside_before', get_the_ID()); |
|
| 47 | + ?> |
|
| 48 | 48 | |
| 49 | 49 | <p class="lesson-excerpt"> |
| 50 | 50 | |
@@ -53,28 +53,28 @@ discard block |
||
| 53 | 53 | </p> |
| 54 | 54 | |
| 55 | 55 | <?php |
| 56 | - /** |
|
| 57 | - * Fires just after the post content in the lesson-content.php file. |
|
| 58 | - * |
|
| 59 | - * @since 1.9.0 |
|
| 60 | - * |
|
| 61 | - * @param string $lesson_id |
|
| 62 | - */ |
|
| 63 | - do_action('sensei_content_lesson_inside_after', get_the_ID()); |
|
| 64 | - ?> |
|
| 56 | + /** |
|
| 57 | + * Fires just after the post content in the lesson-content.php file. |
|
| 58 | + * |
|
| 59 | + * @since 1.9.0 |
|
| 60 | + * |
|
| 61 | + * @param string $lesson_id |
|
| 62 | + */ |
|
| 63 | + do_action('sensei_content_lesson_inside_after', get_the_ID()); |
|
| 64 | + ?> |
|
| 65 | 65 | |
| 66 | 66 | </section> <!-- section .entry --> |
| 67 | 67 | |
| 68 | 68 | <?php |
| 69 | - /** |
|
| 70 | - * This action runs after the sensei lesson content. It runs inside the sensei |
|
| 71 | - * lesson-content.php template. |
|
| 72 | - * |
|
| 73 | - * @since 1.9.0 |
|
| 74 | - * @param string $lesson_id |
|
| 75 | - */ |
|
| 76 | - do_action( 'sensei_content_lesson_after', get_the_ID() ); |
|
| 77 | - ?> |
|
| 69 | + /** |
|
| 70 | + * This action runs after the sensei lesson content. It runs inside the sensei |
|
| 71 | + * lesson-content.php template. |
|
| 72 | + * |
|
| 73 | + * @since 1.9.0 |
|
| 74 | + * @param string $lesson_id |
|
| 75 | + */ |
|
| 76 | + do_action( 'sensei_content_lesson_after', get_the_ID() ); |
|
| 77 | + ?> |
|
| 78 | 78 | |
| 79 | 79 | </section> <!-- article .lesson-content --> |
| 80 | 80 | |
@@ -1,17 +1,17 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
| 3 | 3 | /** |
| 4 | - * Content-message.php template file |
|
| 5 | - * |
|
| 6 | - * responsible for content on archive like pages. Only shows the message excerpt. |
|
| 7 | - * |
|
| 8 | - * For single message content please see single-message.php |
|
| 9 | - * |
|
| 10 | - * @author Automattic |
|
| 11 | - * @package Sensei |
|
| 12 | - * @category Templates |
|
| 13 | - * @version 1.9.0 |
|
| 14 | - */ |
|
| 4 | + * Content-message.php template file |
|
| 5 | + * |
|
| 6 | + * responsible for content on archive like pages. Only shows the message excerpt. |
|
| 7 | + * |
|
| 8 | + * For single message content please see single-message.php |
|
| 9 | + * |
|
| 10 | + * @author Automattic |
|
| 11 | + * @package Sensei |
|
| 12 | + * @category Templates |
|
| 13 | + * @version 1.9.0 |
|
| 14 | + */ |
|
| 15 | 15 | ?> |
| 16 | 16 | |
| 17 | 17 | <article <?php post_class( array( 'post','sensei_message'), get_the_ID() ); ?>> |
@@ -19,31 +19,31 @@ discard block |
||
| 19 | 19 | <section class="message-content"> |
| 20 | 20 | |
| 21 | 21 | <?php |
| 22 | - /** |
|
| 23 | - * action that runs before the sensei {post_type} content. It runs inside the sensei |
|
| 24 | - * content.php template. This applies to the specific post type that you've targeted. |
|
| 25 | - * |
|
| 26 | - * @since 1.9 |
|
| 27 | - * @param string $message_id |
|
| 28 | - * |
|
| 29 | - * @hooked Sensei_Messages::the_message_title - 10 |
|
| 30 | - * @hooked Sensei_Messages::the_message_sender - 20 |
|
| 31 | - */ |
|
| 32 | - do_action( 'sensei_content_message_before', get_the_ID() ); |
|
| 33 | - ?> |
|
| 22 | + /** |
|
| 23 | + * action that runs before the sensei {post_type} content. It runs inside the sensei |
|
| 24 | + * content.php template. This applies to the specific post type that you've targeted. |
|
| 25 | + * |
|
| 26 | + * @since 1.9 |
|
| 27 | + * @param string $message_id |
|
| 28 | + * |
|
| 29 | + * @hooked Sensei_Messages::the_message_title - 10 |
|
| 30 | + * @hooked Sensei_Messages::the_message_sender - 20 |
|
| 31 | + */ |
|
| 32 | + do_action( 'sensei_content_message_before', get_the_ID() ); |
|
| 33 | + ?> |
|
| 34 | 34 | |
| 35 | 35 | <section class="entry"> |
| 36 | 36 | |
| 37 | 37 | <?php |
| 38 | - /** |
|
| 39 | - * Fires just before the post content in the content-message.php file. |
|
| 40 | - * |
|
| 41 | - * @since 1.9 |
|
| 42 | - * |
|
| 43 | - * @param string $message_id |
|
| 44 | - */ |
|
| 45 | - do_action('sensei_content_message_inside_before', get_the_ID()); |
|
| 46 | - ?> |
|
| 38 | + /** |
|
| 39 | + * Fires just before the post content in the content-message.php file. |
|
| 40 | + * |
|
| 41 | + * @since 1.9 |
|
| 42 | + * |
|
| 43 | + * @param string $message_id |
|
| 44 | + */ |
|
| 45 | + do_action('sensei_content_message_inside_before', get_the_ID()); |
|
| 46 | + ?> |
|
| 47 | 47 | |
| 48 | 48 | <p class="message-excerpt"> |
| 49 | 49 | |
@@ -52,28 +52,28 @@ discard block |
||
| 52 | 52 | </p> |
| 53 | 53 | |
| 54 | 54 | <?php |
| 55 | - /** |
|
| 56 | - * Fires just after the post content in the message-content.php file. |
|
| 57 | - * |
|
| 58 | - * @since 1.9 |
|
| 59 | - * |
|
| 60 | - * @param string $message_id |
|
| 61 | - */ |
|
| 62 | - do_action('sensei_content_message_inside_after', get_the_ID()); |
|
| 63 | - ?> |
|
| 55 | + /** |
|
| 56 | + * Fires just after the post content in the message-content.php file. |
|
| 57 | + * |
|
| 58 | + * @since 1.9 |
|
| 59 | + * |
|
| 60 | + * @param string $message_id |
|
| 61 | + */ |
|
| 62 | + do_action('sensei_content_message_inside_after', get_the_ID()); |
|
| 63 | + ?> |
|
| 64 | 64 | |
| 65 | 65 | </section> <!-- section .entry --> |
| 66 | 66 | |
| 67 | 67 | <?php |
| 68 | - /** |
|
| 69 | - * This action runs after the sensei message content. It runs inside the sensei |
|
| 70 | - * message-content.php template. |
|
| 71 | - * |
|
| 72 | - * @since 1.9 |
|
| 73 | - * @param string $message_id |
|
| 74 | - */ |
|
| 75 | - do_action( 'sensei_content_message_after', get_the_ID() ); |
|
| 76 | - ?> |
|
| 68 | + /** |
|
| 69 | + * This action runs after the sensei message content. It runs inside the sensei |
|
| 70 | + * message-content.php template. |
|
| 71 | + * |
|
| 72 | + * @since 1.9 |
|
| 73 | + * @param string $message_id |
|
| 74 | + */ |
|
| 75 | + do_action( 'sensei_content_message_after', get_the_ID() ); |
|
| 76 | + ?> |
|
| 77 | 77 | |
| 78 | 78 | </section> <!-- article .message-content --> |
| 79 | 79 | |
@@ -1,14 +1,14 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The Template for displaying all single messages. |
|
| 4 | - * |
|
| 5 | - * Override this template by copying it to yourtheme/sensei/single-message.php |
|
| 6 | - * |
|
| 7 | - * @author Automattic |
|
| 8 | - * @package Sensei |
|
| 9 | - * @category Templates |
|
| 10 | - * @version 1.9.0 |
|
| 11 | - */ |
|
| 3 | + * The Template for displaying all single messages. |
|
| 4 | + * |
|
| 5 | + * Override this template by copying it to yourtheme/sensei/single-message.php |
|
| 6 | + * |
|
| 7 | + * @author Automattic |
|
| 8 | + * @package Sensei |
|
| 9 | + * @category Templates |
|
| 10 | + * @version 1.9.0 |
|
| 11 | + */ |
|
| 12 | 12 | ?> |
| 13 | 13 | |
| 14 | 14 | <?php get_sensei_header(); ?> |
@@ -16,18 +16,18 @@ discard block |
||
| 16 | 16 | <article <?php post_class(); ?> > |
| 17 | 17 | |
| 18 | 18 | <?php |
| 19 | - /** |
|
| 20 | - * Action inside the single message template before the content |
|
| 21 | - * |
|
| 22 | - * @since 1.9.0 |
|
| 23 | - * |
|
| 24 | - * @param integer $message_id |
|
| 25 | - * |
|
| 26 | - * @hooked WooThemes_Sensei_Messages::the_title - 20 |
|
| 27 | - * @hooked WooThemes_Sensei_Messages::the_message_sent_by_title - 40 |
|
| 28 | - */ |
|
| 29 | - do_action( 'sensei_single_message_content_inside_before', get_the_ID()); |
|
| 30 | - ?> |
|
| 19 | + /** |
|
| 20 | + * Action inside the single message template before the content |
|
| 21 | + * |
|
| 22 | + * @since 1.9.0 |
|
| 23 | + * |
|
| 24 | + * @param integer $message_id |
|
| 25 | + * |
|
| 26 | + * @hooked WooThemes_Sensei_Messages::the_title - 20 |
|
| 27 | + * @hooked WooThemes_Sensei_Messages::the_message_sent_by_title - 40 |
|
| 28 | + */ |
|
| 29 | + do_action( 'sensei_single_message_content_inside_before', get_the_ID()); |
|
| 30 | + ?> |
|
| 31 | 31 | |
| 32 | 32 | <section class="entry"> |
| 33 | 33 | |
@@ -37,15 +37,15 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | <?php |
| 39 | 39 | |
| 40 | - /** |
|
| 41 | - * action inside the single message template after the content |
|
| 42 | - * @since 1.9.0 |
|
| 43 | - * |
|
| 44 | - * @param integer $message_id |
|
| 45 | - */ |
|
| 46 | - do_action( 'sensei_single_message_content_inside_after', get_the_ID()); |
|
| 40 | + /** |
|
| 41 | + * action inside the single message template after the content |
|
| 42 | + * @since 1.9.0 |
|
| 43 | + * |
|
| 44 | + * @param integer $message_id |
|
| 45 | + */ |
|
| 46 | + do_action( 'sensei_single_message_content_inside_after', get_the_ID()); |
|
| 47 | 47 | |
| 48 | - ?> |
|
| 48 | + ?> |
|
| 49 | 49 | </article><!-- .post --> |
| 50 | 50 | |
| 51 | 51 | <?php get_sensei_footer(); ?> |