PluginProbe
bbPress / 2.6.6
bbPress v2.6.6
2.6.17 trunk 2.0 2.0-beta-1 2.0-beta-2b 2.0-beta-3 2.0-beta-3b 2.0-rc-2 2.0-rc-3 2.0-rc-4 2.0-rc-5 2.0.1 2.0.2 2.0.3 2.1 2.1-beta-1 2.1-rc1 2.1-rc2 2.1-rc3 2.1-rc4 2.1.1 2.1.2 2.1.3 2.2 2.2.1 All 72 releases
← All changes | includes/core/extend.php +16 -9 2.2.12.6.6 View file →
@@ -10,14 +10,14 @@
10 10 * @subpackage Extend
11 11 */
12 12
13 13 // Exit if accessed directly
14 -if ( !defined( 'ABSPATH' ) ) exit;
14 +defined( 'ABSPATH' ) || exit;
15 15
16 16 /**
17 17 * Loads Akismet inside the bbPress global class
18 18 *
19 - * @since bbPress (r3277)
19 + * @since 2.0.0 bbPress (r3277)
20 20 *
21 21 * @return If bbPress is not active
22 22 */
23 23 function bbp_setup_akismet() {
@@ -22,15 +22,19 @@
22 22 */
23 23 function bbp_setup_akismet() {
24 24
25 25 // Bail if no akismet
26 - if ( !defined( 'AKISMET_VERSION' ) ) return;
26 + if ( ! defined( 'AKISMET_VERSION' ) ) {
27 + return;
28 + }
27 29
28 30 // Bail if Akismet is turned off
29 - if ( !bbp_is_akismet_active() ) return;
31 + if ( ! bbp_is_akismet_active() ) {
32 + return;
33 + }
30 34
31 35 // Include the Akismet Component
32 - require( bbpress()->includes_dir . 'extend/akismet.php' );
36 + require_once bbpress()->includes_dir . 'extend/akismet.php';
33 37
34 38 // Instantiate Akismet for bbPress
35 39 bbpress()->extend->akismet = new BBP_Akismet();
36 40 }
@@ -38,9 +42,10 @@
38 42 /**
39 43 * Requires and creates the BuddyPress extension, and adds component creation
40 44 * action to bp_init hook. @see bbp_setup_buddypress_component()
41 45 *
42 - * @since bbPress (r3395)
46 + * @since 2.0.0 bbPress (r3395)
47 + *
43 48 * @return If BuddyPress is not active
44 49 */
45 50 function bbp_setup_buddypress() {
46 51
@@ -48,9 +53,10 @@
48 53
49 54 /**
50 55 * Helper for BuddyPress 1.6 and earlier
51 56 *
52 - * @since bbPress (r4395)
57 + * @since 2.2.0 bbPress (r4395)
58 + *
53 59 * @return BuddyPress
54 60 */
55 61 function buddypress() {
56 62 return isset( $GLOBALS['bp'] ) ? $GLOBALS['bp'] : false;
@@ -57,13 +63,14 @@
57 63 }
58 64 }
59 65
60 66 // Bail if in maintenance mode
61 - if ( ! buddypress() || buddypress()->maintenance_mode )
67 + if ( ! buddypress() || buddypress()->maintenance_mode ) {
62 68 return;
69 + }
63 70
64 71 // Include the BuddyPress Component
65 - require( bbpress()->includes_dir . 'extend/buddypress/loader.php' );
72 + require_once bbpress()->includes_dir . 'extend/buddypress/loader.php';
66 73
67 74 // Instantiate BuddyPress for bbPress
68 75 bbpress()->extend->buddypress = new BBP_Forums_Component();
69 76 }