Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/22/2024 05:54:22 AM (23 months ago)
Author:
imath
Message:

Create a specific CSS file for BP Tooltips

  • Move BP Tooltips default CSS rules into their own BP Core file so that it's easier to add this file as a style dependency.
  • Let BP Template Packs override this BP Core file and create a new bp-tooltips.css file into BP Nouveau to do so.
  • Use this BP Core file as a dependency to Admin's Hello styles as well as BP Template packs main styles.
  • Enqueue BP Tooltips CSS rules when Block widgets are rendered.

Props jnie

See #9070 (trunk)
Closes https://github.com/buddypress/buddypress/pull/221

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress-functions.php

    r13672 r13709  
    224224        // LTR.
    225225        if ( ! is_rtl() && isset( $ltr['location'], $ltr['handle'] ) ) {
    226             wp_enqueue_style( $ltr['handle'], $ltr['location'], array(), $this->version, 'screen' );
     226            wp_enqueue_style( $ltr['handle'], $ltr['location'], array( 'bp-tooltips' ), $this->version, 'screen' );
    227227
    228228            if ( $min ) {
     
    237237            if ( isset( $rtl['location'], $rtl['handle'] ) ) {
    238238                $rtl['handle'] = str_replace( '-css', '-css-rtl', $rtl['handle'] );  // Backwards compatibility.
    239                 wp_enqueue_style( $rtl['handle'], $rtl['location'], array(), $this->version, 'screen' );
     239                wp_enqueue_style( $rtl['handle'], $rtl['location'], array( 'bp-tooltips' ), $this->version, 'screen' );
    240240
    241241                if ( $min ) {
     
    250250            // Use a unique handle.
    251251            $theme['handle'] = 'bp-' . get_template();
    252             wp_enqueue_style( $theme['handle'], $theme['location'], array(), $this->version, 'screen' );
     252            wp_enqueue_style( $theme['handle'], $theme['location'], array( 'bp-tooltips' ), $this->version, 'screen' );
    253253
    254254            if ( $min ) {
     
    263263            if ( isset( $theme_rtl['location'] ) ) {
    264264                $theme_rtl['handle'] = $theme['handle'] . '-rtl';
    265                 wp_enqueue_style( $theme_rtl['handle'], $theme_rtl['location'], array(), $this->version, 'screen' );
     265                wp_enqueue_style( $theme_rtl['handle'], $theme_rtl['location'], array( 'bp-tooltips' ), $this->version, 'screen' );
    266266
    267267                if ( $min ) {
Note: See TracChangeset for help on using the changeset viewer.