Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/14/2021 08:29:34 PM (5 years ago)
Author:
imath
Message:

Merge the BP Blocks plugin's 'bp/sitewide-notices' Block

  • Add a front-end script to the Messages component to manage dismissible notices displayed into the Widget Block.
  • Adapt Grunt sass tasks.
  • Add the Block JavaScript source files into src/js/bp-messages/js/blocks.
  • Add the Block Scss source file into src/bp-messages/sass.
  • Generate the development files to ease testing.

Props dcavins

Fixes #8525

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-cssjs.php

    r12401 r13005  
    7474<?php
    7575}
     76
     77/**
     78 * Registers a new script to manage the dismissal action for the Sitewide notice widget/block.
     79 *
     80 * @since 9.0.0
     81 *
     82 * @param array $scripts Data about the scripts to register.
     83 * @return array Data about the scripts to register.
     84 */
     85function bp_messages_register_scripts( $scripts = array() ) {
     86        $scripts['bp-sitewide-notices-script'] = array(
     87                'file'         => plugins_url( 'js/sitewide-notices.js', __FILE__ ),
     88                'dependencies' => array(),
     89                'footer'       => true,
     90        );
     91
     92        return $scripts;
     93}
     94add_filter( 'bp_core_register_common_scripts', 'bp_messages_register_scripts', 9, 1 );
Note: See TracChangeset for help on using the changeset viewer.