@@ -25,45 +25,45 @@ discard block |
||
25 | 25 | |
26 | 26 | /** |
27 | 27 | * Hook in tabs. |
28 | - * @since 1.8.0 |
|
28 | + * @since 1.8.0 |
|
29 | 29 | */ |
30 | 30 | public function __construct() { |
31 | 31 | |
32 | - add_action( 'admin_menu', array( $this, 'admin_menus') ); |
|
32 | + add_action( 'admin_menu', array( $this, 'admin_menus') ); |
|
33 | 33 | add_action( 'admin_head', array( $this, 'admin_head' ) ); |
34 | 34 | |
35 | 35 | } |
36 | 36 | |
37 | - /** |
|
38 | - * Sends user to the welcome page on first activation. |
|
39 | - * |
|
40 | - * Hooked into activated_plugin |
|
41 | - * @since 1.8.0 |
|
42 | - */ |
|
43 | - public static function redirect( $plugin ) { |
|
37 | + /** |
|
38 | + * Sends user to the welcome page on first activation. |
|
39 | + * |
|
40 | + * Hooked into activated_plugin |
|
41 | + * @since 1.8.0 |
|
42 | + */ |
|
43 | + public static function redirect( $plugin ) { |
|
44 | 44 | |
45 | - // Bail if activating from network, or bulk, or within an iFrame |
|
46 | - if ( is_network_admin() || isset( $_GET['activate-multi'] ) || defined( 'IFRAME_REQUEST' ) ) { |
|
45 | + // Bail if activating from network, or bulk, or within an iFrame |
|
46 | + if ( is_network_admin() || isset( $_GET['activate-multi'] ) || defined( 'IFRAME_REQUEST' ) ) { |
|
47 | 47 | |
48 | - return; |
|
48 | + return; |
|
49 | 49 | |
50 | - } |
|
51 | - // don't run for upgrades and for pages already on the welcome screen |
|
52 | - if ( ( isset( $_GET['action'] ) && 'upgrade-plugin' == $_GET['action'] ) |
|
53 | - || ( ! empty( $_GET['page'] ) && $_GET['page'] === 'sensei-welcome' ) ) { |
|
50 | + } |
|
51 | + // don't run for upgrades and for pages already on the welcome screen |
|
52 | + if ( ( isset( $_GET['action'] ) && 'upgrade-plugin' == $_GET['action'] ) |
|
53 | + || ( ! empty( $_GET['page'] ) && $_GET['page'] === 'sensei-welcome' ) ) { |
|
54 | 54 | |
55 | - return; |
|
55 | + return; |
|
56 | 56 | |
57 | - } |
|
57 | + } |
|
58 | 58 | |
59 | - wp_redirect( admin_url( 'index.php?page=sensei-welcome' ) ); |
|
60 | - exit; |
|
61 | - } |
|
59 | + wp_redirect( admin_url( 'index.php?page=sensei-welcome' ) ); |
|
60 | + exit; |
|
61 | + } |
|
62 | 62 | |
63 | 63 | /** |
64 | 64 | * Add admin menus/screens. |
65 | - * |
|
66 | - * @since 1.8.0 |
|
65 | + * |
|
66 | + * @since 1.8.0 |
|
67 | 67 | */ |
68 | 68 | public function admin_menus() { |
69 | 69 | |
@@ -73,17 +73,17 @@ discard block |
||
73 | 73 | |
74 | 74 | $welcome_page_name = __( 'Sensei Activation', 'woothemes-sensei' ); |
75 | 75 | $welcome_page_title = __( 'Welcome to Sensei', 'woothemes-sensei' ); |
76 | - add_dashboard_page( $welcome_page_title, $welcome_page_name, 'manage_options', 'sensei-welcome', array( $this, 'welcome_screen' ) ); |
|
76 | + add_dashboard_page( $welcome_page_title, $welcome_page_name, 'manage_options', 'sensei-welcome', array( $this, 'welcome_screen' ) ); |
|
77 | 77 | |
78 | 78 | } |
79 | 79 | |
80 | - /** |
|
81 | - * Output the Welcome screen. |
|
82 | - * |
|
83 | - * @since 1.8.0 |
|
84 | - */ |
|
85 | - public function welcome_screen() { |
|
86 | - ?> |
|
80 | + /** |
|
81 | + * Output the Welcome screen. |
|
82 | + * |
|
83 | + * @since 1.8.0 |
|
84 | + */ |
|
85 | + public function welcome_screen() { |
|
86 | + ?> |
|
87 | 87 | <div class="wrap about-wrap"> |
88 | 88 | |
89 | 89 | <?php $this->intro(); ?> |
@@ -136,13 +136,13 @@ discard block |
||
136 | 136 | </div> |
137 | 137 | </div> |
138 | 138 | <?php |
139 | - } |
|
139 | + } |
|
140 | 140 | |
141 | 141 | /** |
142 | 142 | * Add styles just for this page, and remove dashboard page links. |
143 | 143 | */ |
144 | 144 | public function admin_head() { |
145 | - // remove the menu page so it is not visible in the admin side bar |
|
145 | + // remove the menu page so it is not visible in the admin side bar |
|
146 | 146 | remove_submenu_page( 'index.php', 'sensei-welcome' ); |
147 | 147 | ?> |
148 | 148 | <style type="text/css"> |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | |
267 | 267 | // Random tweet - must be kept to 102 chars to "fit" |
268 | 268 | $tweets = array( |
269 | - 'I\'ve just installed Sensei - A premium Learning Management plugin for #WordPress.' |
|
269 | + 'I\'ve just installed Sensei - A premium Learning Management plugin for #WordPress.' |
|
270 | 270 | ); |
271 | 271 | shuffle( $tweets ); |
272 | 272 | ?> |
@@ -288,11 +288,11 @@ discard block |
||
288 | 288 | |
289 | 289 | <div class="sensei-badge"> |
290 | 290 | <?php |
291 | - _e('Sensei by WooThemes','woothemes-sensei'); |
|
292 | - echo '<br />'; |
|
291 | + _e('Sensei by WooThemes','woothemes-sensei'); |
|
292 | + echo '<br />'; |
|
293 | 293 | |
294 | - printf( __( 'Version %s', 'woothemes-sensei' ), Sensei()->version ); |
|
295 | - ?> |
|
294 | + printf( __( 'Version %s', 'woothemes-sensei' ), Sensei()->version ); |
|
295 | + ?> |
|
296 | 296 | </div> |
297 | 297 | |
298 | 298 | <p class="sensei-actions"> |
@@ -86,7 +86,7 @@ |
||
86 | 86 | if ( WooThemes_Sensei_Utils::sensei_is_woocommerce_activated() ) { |
87 | 87 | global $woocommerce; |
88 | 88 | if( version_compare( $woocommerce->version, $version, ">=" ) ) { |
89 | - return true; |
|
89 | + return true; |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 | return false; |
@@ -162,8 +162,8 @@ |
||
162 | 162 | $sortable[$id] = $data; |
163 | 163 | } |
164 | 164 | |
165 | - $primary = $this->get_primary_column_name(); |
|
166 | - $this->_column_headers = array( $columns, $hidden, $sortable, $primary ); |
|
165 | + $primary = $this->get_primary_column_name(); |
|
166 | + $this->_column_headers = array( $columns, $hidden, $sortable, $primary ); |
|
167 | 167 | |
168 | 168 | return $this->_column_headers; |
169 | 169 | } |
@@ -70,9 +70,9 @@ discard block |
||
70 | 70 | '1.7.2' => array( 'auto' => array( 'index_comment_status_field' => array( 'title' => __( 'Add database index to comment statuses', 'woothemes-sensei' ), 'desc' => __( 'This indexes the comment statuses in the database, which will speed up all Sensei activity queries.', 'woothemes-sensei' ) ), ), |
71 | 71 | /*'manual' => array( 'remove_legacy_comments' => array( 'title' => __( 'Remove legacy Sensei activity types', 'woothemes-sensei' ), 'desc' => __( 'This removes all legacy (pre-1.7) Sensei activity types - only run this update once the update to v1.7 is complete and everything is stable.', 'woothemes-sensei' ) ) )*/ |
72 | 72 | ), |
73 | - '1.8.0' => array( 'auto' => array( 'enhance_teacher_role' => array( 'title' => 'Enhance the \'Teacher\' role', 'desc' => 'Adds the ability for a \'Teacher\' to create courses, lessons , quizes and manage their learners.' ), ), |
|
74 | - 'manual' => array() |
|
75 | - ), |
|
73 | + '1.8.0' => array( 'auto' => array( 'enhance_teacher_role' => array( 'title' => 'Enhance the \'Teacher\' role', 'desc' => 'Adds the ability for a \'Teacher\' to create courses, lessons , quizes and manage their learners.' ), ), |
|
74 | + 'manual' => array() |
|
75 | + ), |
|
76 | 76 | ); |
77 | 77 | |
78 | 78 | $this->updates = apply_filters( 'sensei_upgrade_functions', $this->updates, $this->updates ); |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | } // End For Loop |
330 | 330 | } // End For Loop |
331 | 331 | |
332 | - $this->updates_run = array_unique( $this->updates_run ); // we only need one reference per update |
|
332 | + $this->updates_run = array_unique( $this->updates_run ); // we only need one reference per update |
|
333 | 333 | update_option( $this->token . '-upgrades', $this->updates_run ); |
334 | 334 | return true; |
335 | 335 | |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | */ |
447 | 447 | private function set_update_run( $update ) { |
448 | 448 | array_push( $this->updates_run, $update ); |
449 | - $this->updates_run = array_unique( $this->updates_run ); // we only need one reference per update |
|
449 | + $this->updates_run = array_unique( $this->updates_run ); // we only need one reference per update |
|
450 | 450 | update_option( $this->token . '-upgrades', $this->updates_run ); |
451 | 451 | } |
452 | 452 | |
@@ -918,11 +918,11 @@ discard block |
||
918 | 918 | update_post_meta( $lesson->ID, '_order_' . $course_id, 0 ); |
919 | 919 | } |
920 | 920 | |
921 | - $module = Sensei()->modules->get_lesson_module( $lesson->ID ); |
|
921 | + $module = Sensei()->modules->get_lesson_module( $lesson->ID ); |
|
922 | 922 | |
923 | - if( $module ) { |
|
924 | - update_post_meta( $lesson->ID, '_order_module_' . $module->term_id, 0 ); |
|
925 | - } |
|
923 | + if( $module ) { |
|
924 | + update_post_meta( $lesson->ID, '_order_module_' . $module->term_id, 0 ); |
|
925 | + } |
|
926 | 926 | |
927 | 927 | } |
928 | 928 | |
@@ -1732,22 +1732,22 @@ discard block |
||
1732 | 1732 | |
1733 | 1733 | } |
1734 | 1734 | |
1735 | - /** |
|
1736 | - * WooThemes_Sensei_Updates::enhance_teacher_role |
|
1737 | - * |
|
1738 | - * This runs the update to create the teacher role |
|
1739 | - * @access public |
|
1740 | - * @since 1.8.0 |
|
1741 | - * @return bool; |
|
1742 | - */ |
|
1743 | - public function enhance_teacher_role ( ) { |
|
1744 | - |
|
1745 | - require_once('class-sensei-teacher.php'); |
|
1746 | - $teacher = new Sensei_Teacher(); |
|
1747 | - $teacher->create_role(); |
|
1748 | - return true; |
|
1749 | - |
|
1750 | - }// end enhance_teacher_role |
|
1735 | + /** |
|
1736 | + * WooThemes_Sensei_Updates::enhance_teacher_role |
|
1737 | + * |
|
1738 | + * This runs the update to create the teacher role |
|
1739 | + * @access public |
|
1740 | + * @since 1.8.0 |
|
1741 | + * @return bool; |
|
1742 | + */ |
|
1743 | + public function enhance_teacher_role ( ) { |
|
1744 | + |
|
1745 | + require_once('class-sensei-teacher.php'); |
|
1746 | + $teacher = new Sensei_Teacher(); |
|
1747 | + $teacher->create_role(); |
|
1748 | + return true; |
|
1749 | + |
|
1750 | + }// end enhance_teacher_role |
|
1751 | 1751 | |
1752 | 1752 | } // End Class |
1753 | 1753 |
@@ -201,7 +201,7 @@ |
||
201 | 201 | |
202 | 202 | if( 'complete' == $item->comment_approved ) { |
203 | 203 | |
204 | - $status = __( 'Completed', 'woothemes-sensei' ); |
|
204 | + $status = __( 'Completed', 'woothemes-sensei' ); |
|
205 | 205 | $status_class = 'graded'; |
206 | 206 | |
207 | 207 | $course_end_date = $item->comment_date; |
@@ -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 $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 $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 | - * @hooked |
|
133 | - * |
|
134 | - */ |
|
135 | - do_action( 'sensei_single_quiz_content_inside_after' ); |
|
136 | - |
|
137 | - ?> |
|
127 | + /** |
|
128 | + * Hook inside the single quiz post above the content |
|
129 | + * |
|
130 | + * @since 1.9.0 |
|
131 | + * |
|
132 | + * @hooked |
|
133 | + * |
|
134 | + */ |
|
135 | + do_action( 'sensei_single_quiz_content_inside_after' ); |
|
136 | + |
|
137 | + ?> |
|
138 | 138 | |
139 | 139 | </article><!-- .quiz --> |
140 | 140 |
@@ -1,31 +1,31 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The Template for displaying teacher author archives, this template wil show the teacher |
|
4 | - * and all course that belong to to them. |
|
5 | - * |
|
6 | - * Override this template by copying it to your_theme/sensei/teacher-archive.php |
|
7 | - * |
|
8 | - * @author Automattic |
|
9 | - * @package Sensei |
|
10 | - * @category Templates |
|
11 | - * @version 1.9.0 |
|
12 | - */ |
|
3 | + * The Template for displaying teacher author archives, this template wil show the teacher |
|
4 | + * and all course that belong to to them. |
|
5 | + * |
|
6 | + * Override this template by copying it to your_theme/sensei/teacher-archive.php |
|
7 | + * |
|
8 | + * @author Automattic |
|
9 | + * @package Sensei |
|
10 | + * @category Templates |
|
11 | + * @version 1.9.0 |
|
12 | + */ |
|
13 | 13 | ?> |
14 | 14 | |
15 | 15 | <?php get_sensei_header(); ?> |
16 | 16 | |
17 | 17 | <?php |
18 | 18 | |
19 | - /** |
|
20 | - * This action before teacher courses loop. This hook fires within the archive-course.php |
|
21 | - * It fires even if the current archive has no posts. |
|
22 | - * |
|
23 | - * @since 1.9.0 |
|
24 | - * |
|
25 | - */ |
|
26 | - do_action( 'sensei_teacher_archive_course_loop_before' ); |
|
19 | + /** |
|
20 | + * This action before teacher courses loop. This hook fires within the archive-course.php |
|
21 | + * It fires even if the current archive has no posts. |
|
22 | + * |
|
23 | + * @since 1.9.0 |
|
24 | + * |
|
25 | + */ |
|
26 | + do_action( 'sensei_teacher_archive_course_loop_before' ); |
|
27 | 27 | |
28 | - ?> |
|
28 | + ?> |
|
29 | 29 | |
30 | 30 | <?php if ( have_posts() ): ?> |
31 | 31 | |
@@ -39,14 +39,14 @@ discard block |
||
39 | 39 | |
40 | 40 | <?php |
41 | 41 | |
42 | - /** |
|
43 | - * This action runs after including the teacher archive loop. This hook fires within the teacher-archive.php |
|
44 | - * It fires even if the current archive has no posts. |
|
45 | - * |
|
46 | - * @since 1.9.0 |
|
47 | - */ |
|
48 | - do_action( 'sensei_teacher_archive_course_loop_after' ); |
|
42 | + /** |
|
43 | + * This action runs after including the teacher archive loop. This hook fires within the teacher-archive.php |
|
44 | + * It fires even if the current archive has no posts. |
|
45 | + * |
|
46 | + * @since 1.9.0 |
|
47 | + */ |
|
48 | + do_action( 'sensei_teacher_archive_course_loop_after' ); |
|
49 | 49 | |
50 | - ?> |
|
50 | + ?> |
|
51 | 51 | |
52 | 52 | <?php get_sensei_footer(); ?> |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Generate documentation for hooks in WC |
|
4 | - */ |
|
3 | + * Generate documentation for hooks in WC |
|
4 | + */ |
|
5 | 5 | class WC_HookFinder { |
6 | 6 | private static $current_file = ''; |
7 | 7 | private static $files_to_scan = array(); |
@@ -12,20 +12,20 @@ discard block |
||
12 | 12 | |
13 | 13 | private static function get_files( $pattern, $flags = 0, $path = '' ) { |
14 | 14 | |
15 | - if ( ! $path && ( $dir = dirname( $pattern ) ) != '.' ) { |
|
15 | + if ( ! $path && ( $dir = dirname( $pattern ) ) != '.' ) { |
|
16 | 16 | |
17 | - if ($dir == '\\' || $dir == '/') { $dir = ''; } // End IF Statement |
|
17 | + if ($dir == '\\' || $dir == '/') { $dir = ''; } // End IF Statement |
|
18 | 18 | |
19 | - return self::get_files(basename( $pattern ), $flags, $dir . '/' ); |
|
19 | + return self::get_files(basename( $pattern ), $flags, $dir . '/' ); |
|
20 | 20 | |
21 | - } // End IF Statement |
|
21 | + } // End IF Statement |
|
22 | 22 | |
23 | - $paths = glob( $path . '*', GLOB_ONLYDIR | GLOB_NOSORT ); |
|
24 | - $files = glob( $path . $pattern, $flags ); |
|
23 | + $paths = glob( $path . '*', GLOB_ONLYDIR | GLOB_NOSORT ); |
|
24 | + $files = glob( $path . $pattern, $flags ); |
|
25 | 25 | |
26 | - if ( is_array( $paths ) ) { |
|
27 | - foreach ( $paths as $p ) { |
|
28 | - $found_files = array(); |
|
26 | + if ( is_array( $paths ) ) { |
|
27 | + foreach ( $paths as $p ) { |
|
28 | + $found_files = array(); |
|
29 | 29 | $retrieved_files = (array) self::get_files( $pattern, $flags, $p . '/' ); |
30 | 30 | foreach ( $retrieved_files as $file ) { |
31 | 31 | if ( ! in_array( $file, self::$found_files ) ) |
@@ -38,10 +38,10 @@ discard block |
||
38 | 38 | $files = array_merge( $files, $found_files ); |
39 | 39 | } |
40 | 40 | |
41 | - } // End FOREACH Loop |
|
42 | - } |
|
43 | - return $files; |
|
44 | - } |
|
41 | + } // End FOREACH Loop |
|
42 | + } |
|
43 | + return $files; |
|
44 | + } |
|
45 | 45 | |
46 | 46 | private static function get_hook_link( $hook, $details = array() ) { |
47 | 47 | if ( ! empty( $details['class'] ) ) { |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | if ( isset( self::$custom_hooks_found[ $hook ] ) ) { |
127 | 127 | self::$custom_hooks_found[ $hook ]['file'][] = self::$current_file; |
128 | 128 | } else { |
129 | - self::$custom_hooks_found[ $hook ] = array( |
|
129 | + self::$custom_hooks_found[ $hook ] = array( |
|
130 | 130 | 'line' => $token[2], |
131 | 131 | 'class' => $current_class, |
132 | 132 | 'function' => $current_function, |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Pagination - Posts |
|
4 | - * |
|
5 | - * @author WooThemes |
|
6 | - * @package Sensei/Templates |
|
7 | - * @version 1.1.0 |
|
8 | - */ |
|
3 | + * Pagination - Posts |
|
4 | + * |
|
5 | + * @author WooThemes |
|
6 | + * @package Sensei/Templates |
|
7 | + * @version 1.1.0 |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | if ( ! defined( 'ABSPATH' ) ) exit; |
11 | 11 |