Skip to:
Content

BuddyPress.org

Changeset 11957


Ignore:
Timestamp:
04/05/2018 02:43:31 PM (8 years ago)
Author:
djpaul
Message:

Remove further compatibilty checks for unsupported versions of WordPress.

BP 3.0.0 will require WP 4.5+, which lets us assume every site will have oEmbed support.

See #7618 and https://codex.buddypress.org/getting-started/wordpress-version-compatibility/

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-embeds.php

    r11956 r11957  
    2020 */
    2121function bp_activity_setup_oembed() {
    22         if ( version_compare( $GLOBALS['wp_version'], '4.5', '>=' ) && bp_is_active( 'activity', 'embeds' ) ) {
    23                 buddypress()->activity->oembed = new BP_Activity_oEmbed_Extension;
    24         }
     22        buddypress()->activity->oembed = new BP_Activity_oEmbed_Extension;
    2523}
    2624add_action( 'bp_loaded', 'bp_activity_setup_oembed' );
  • trunk/src/bp-activity/classes/class-bp-activity-component.php

    r11956 r11957  
    7272                }
    7373
    74                 // Embeds - only applicable for WP 4.5+
    75                 if ( version_compare( $GLOBALS['wp_version'], '4.5', '>=' ) && bp_is_active( $this->id, 'embeds' ) ) {
    76                         $includes[] = 'embeds';
    77                 }
     74                // Embeds
     75                $includes[] = 'embeds';
    7876
    7977                if ( is_admin() ) {
  • trunk/src/bp-core/bp-core-adminbar.php

    r11956 r11957  
    4848 *
    4949 * @since 1.2.0
    50  *
    51  * @global string $wp_version
    5250 */
    5351function bp_core_load_admin_bar() {
  • trunk/src/bp-core/classes/class-bp-admin.php

    r11956 r11957  
    337337                $hooks = array();
    338338
    339                 // Require WP 4.0+.
    340                 if ( bp_is_root_blog() && version_compare( $GLOBALS['wp_version'], '4.0', '>=' ) ) {
    341                         // Appearance > Emails.
    342                         $hooks[] = add_theme_page(
    343                                 _x( 'Emails', 'screen heading', 'buddypress' ),
    344                                 _x( 'Emails', 'screen heading', 'buddypress' ),
    345                                 $this->capability,
    346                                 'bp-emails-customizer-redirect',
    347                                 'bp_email_redirect_to_customizer'
    348                         );
    349 
    350                         // Emails > Customize.
    351                         $hooks[] = add_submenu_page(
    352                                 'edit.php?post_type=' . bp_get_email_post_type(),
    353                                 _x( 'Customize', 'email menu label', 'buddypress' ),
    354                                 _x( 'Customize', 'email menu label', 'buddypress' ),
    355                                 $this->capability,
    356                                 'bp-emails-customizer-redirect',
    357                                 'bp_email_redirect_to_customizer'
    358                         );
    359                 }
     339                // Appearance > Emails.
     340                $hooks[] = add_theme_page(
     341                        _x( 'Emails', 'screen heading', 'buddypress' ),
     342                        _x( 'Emails', 'screen heading', 'buddypress' ),
     343                        $this->capability,
     344                        'bp-emails-customizer-redirect',
     345                        'bp_email_redirect_to_customizer'
     346                );
     347
     348                // Emails > Customize.
     349                $hooks[] = add_submenu_page(
     350                        'edit.php?post_type=' . bp_get_email_post_type(),
     351                        _x( 'Customize', 'email menu label', 'buddypress' ),
     352                        _x( 'Customize', 'email menu label', 'buddypress' ),
     353                        $this->capability,
     354                        'bp-emails-customizer-redirect',
     355                        'bp_email_redirect_to_customizer'
     356                );
    360357
    361358                foreach( $hooks as $hook ) {
Note: See TracChangeset for help on using the changeset viewer.