Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/22/2024 05:54:22 AM (3 years 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-core/bp-core-cssjs.php

    r13523 r13709  
    104104         */
    105105        $admin_bar_file = apply_filters( 'bp_core_admin_bar_css', "{$url}admin-bar{$min}.css" );
     106
     107        // Set default BP Tooltips styles.
     108        $tooltips_uri      = "{$url}bp-tooltips{$min}.css";
     109        $template_tooltips = bp_locate_template_asset( "css/bp-tooltips{$min}.css" );
     110
     111        if ( isset( $template_tooltips['uri'] ) && $template_tooltips['uri'] ) {
     112                $tooltips_uri = $template_tooltips['uri'];
     113        }
    106114
    107115        /**
     
    120128                        'file'         => "{$url}avatar{$min}.css",
    121129                        'dependencies' => array( 'jcrop' )
     130                ),
     131                'bp-tooltips' => array(
     132                        'file'         => $tooltips_uri,
     133                        'dependencies' => array()
    122134                ),
    123135        ) );
Note: See TracChangeset for help on using the changeset viewer.