@@ -103,6 +103,8 @@ private function __construct() {
103
103
/**
104
104
* Filter allows a custom Stream API class to be instantiated
105
105
*
106
+ * @since 2.0.2
107
+ *
106
108
* @return object The API class object
107
109
*/
108
110
self ::$ api = apply_filters ( 'wp_stream_api_class ' , new WP_Stream_API );
@@ -133,6 +135,7 @@ private function __construct() {
133
135
// Add frontend indicator
134
136
add_action ( 'wp_head ' , array ( $ this , 'frontend_indicator ' ) );
135
137
138
+ // Load admin area classes
136
139
if ( is_admin () ) {
137
140
add_action ( 'init ' , array ( 'WP_Stream_Admin ' , 'load ' ) );
138
141
add_action ( 'init ' , array ( 'WP_Stream_Dashboard_Widget ' , 'load ' ) );
@@ -143,16 +146,21 @@ private function __construct() {
143
146
}
144
147
145
148
/**
146
- * Invoked when the PHP version check fails. Load up the translations and
147
- * add the error message to the admin notices
149
+ * Invoked when the PHP version check fails
150
+ *
151
+ * Load up the translations and add the error message to the admin notices.
152
+ *
153
+ * @return void
148
154
*/
149
155
public static function fail_php_version () {
150
156
add_action ( 'plugins_loaded ' , array ( __CLASS__ , 'i18n ' ) );
151
157
self ::notice ( __ ( 'Stream requires PHP version 5.3+, plugin is currently NOT ACTIVE. ' , 'stream ' ) );
152
158
}
153
159
154
160
/**
161
+ * Check for deprecated extension plugins
155
162
*
163
+ * @return bool
156
164
*/
157
165
public static function deprecated_plugins_exist () {
158
166
foreach ( self ::$ deprecated_extensions as $ class => $ dir ) {
@@ -165,7 +173,9 @@ public static function deprecated_plugins_exist() {
165
173
}
166
174
167
175
/**
176
+ * Display admin notices when deprecated extension plugins exist
168
177
*
178
+ * @return void
169
179
*/
170
180
public static function deprecated_plugins_notice () {
171
181
add_action ( 'plugins_loaded ' , array ( __CLASS__ , 'i18n ' ) );
@@ -209,11 +219,12 @@ public static function deprecated_plugins_notice() {
209
219
}
210
220
211
221
/**
212
- * Autoloader for classes
213
- *
214
- * @param string $class
215
- * @return void
216
- */
222
+ * Autoloader for classes
223
+ *
224
+ * @param string $class
225
+ *
226
+ * @return void
227
+ */
217
228
function autoload ( $ class ) {
218
229
$ class = strtolower ( str_replace ( '_ ' , '- ' , $ class ) );
219
230
$ class_file = sprintf ( '%sclass-%s.php ' , WP_STREAM_CLASS_DIR , $ class );
@@ -226,8 +237,8 @@ function autoload( $class ) {
226
237
/**
227
238
* Loads the translation files.
228
239
*
229
- * @access public
230
240
* @action plugins_loaded
241
+ *
231
242
* @return void
232
243
*/
233
244
public static function i18n () {
@@ -269,6 +280,8 @@ public static function is_development_mode() {
269
280
/**
270
281
* Filter allows development mode to be overridden
271
282
*
283
+ * @since 2.0.0
284
+ *
272
285
* @return bool
273
286
*/
274
287
return apply_filters ( 'wp_stream_development_mode ' , $ development_mode );
@@ -279,6 +292,7 @@ public static function is_development_mode() {
279
292
*
280
293
* @param string $message
281
294
* @param bool $is_error
295
+ *
282
296
* @return void
283
297
*/
284
298
public static function notice ( $ message , $ is_error = true ) {
@@ -305,6 +319,7 @@ public static function notice( $message, $is_error = true ) {
305
319
* Show an error or other message in the WP Admin
306
320
*
307
321
* @action shutdown
322
+ *
308
323
* @return void
309
324
*/
310
325
public static function admin_notices () {
@@ -336,9 +351,8 @@ public static function admin_notices() {
336
351
* Displays an HTML comment in the frontend head to indicate that Stream is activated,
337
352
* and which version of Stream is currently in use.
338
353
*
339
- * @since 1.4.5
340
- *
341
354
* @action wp_head
355
+ *
342
356
* @return string|void An HTML comment, or nothing if the value is filtered out.
343
357
*/
344
358
public function frontend_indicator () {
@@ -348,6 +362,8 @@ public function frontend_indicator() {
348
362
* Filter allows the HTML output of the frontend indicator comment
349
363
* to be altered or removed, if desired.
350
364
*
365
+ * @since 1.4.5
366
+ *
351
367
* @return string The content of the HTML comment
352
368
*/
353
369
$ comment = apply_filters ( 'wp_stream_frontend_indicator ' , $ comment );
0 commit comments