PHPackages                             moderntribe/tribe-alerts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. moderntribe/tribe-alerts

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

moderntribe/tribe-alerts
========================

Tribe Alerts WordPress Plugin

1.7.1(3y ago)0263[1 PRs](https://github.com/moderntribe/tribe-alerts/pulls)PHPPHP &gt;=7.4

Since Apr 20Pushed 1mo ago10 watchersCompare

[ Source](https://github.com/moderntribe/tribe-alerts)[ Packagist](https://packagist.org/packages/moderntribe/tribe-alerts)[ Docs](https://github.com/moderntribe/tribe-alerts)[ RSS](/packages/moderntribe-tribe-alerts/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (20)Versions (21)Used By (0)

Tribe Alerts
============

[](#tribe-alerts)

Displays a customizable banner on that screen and remembers when users have dismissed it.

---

Display custom banner alerts on your website.
---------------------------------------------

[](#display-custom-banner-alerts-on-your-website)

### Requirements

[](#requirements)

- php7.4+
- Advanced Custom Fields Pro
- nvm or fnm
- node 16+
- yarn 1.22+
- npm 8.3+

### Quick Start First Run

[](#quick-start-first-run)

1. Install [SquareOne Docker (so)](https://github.com/moderntribe/square1-global-docker#squareone-docker)
2. Run: `so bootstrap`
3. Run: `nvm use`
4. Run: `yarn install`
5. Run: `yarn mix`
6. Activate your plugins in the WordPress dashboard and start developing!

### Pull Requests / Building

[](#pull-requests--building)

Ensure you run `yarn prod` before submitting a PR to ensure the `resources/dist` folder is updated with the latest build.

### Front end

[](#front-end)

Front end building is powered by [Laravel Mix](https://laravel-mix.com/).

#### Building

[](#building)

```
nvm use
```

```
yarn install
```

#### Usage

[](#usage)

Build for development:

```
yarn dev
```

Watch for file changes:

```
yarn watch
```

Poll for file changes:

```
yarn watch-poll
```

Watch with hot module replacement:

```
yarn hot
```

Build for production:

```
yarn production
```

See more options: `yarn mix --help`

### Installing this plugin

[](#installing-this-plugin)

Every published [release](https://github.com/moderntribe/tribe-alerts/releases) automatically creates a `tribe-alerts.zip` which is a fully built and vendor scoped WordPress plugin, about a minute after the release is published. To manually install, visit a release and download and extract the zip in your WordPress plugins folder.

#### Composer

[](#composer)

The best way to include the release zip is by using the fantastic [ffraenz/private-composer-installer](https://github.com/ffraenz/private-composer-installer) plugin.

Add a custom repository to your project's `repository` key in `composer.json`:

```
  "repositories": [
    {
      "type": "package",
      "package": {
        "name": "moderntribe/tribe-alerts",
        "version": "1.1.0",
        "type": "wordpress-plugin",
        "dist": {
          "type": "zip",
          "url": "https://github.com/moderntribe/tribe-alerts/releases/download/{%VERSION}/tribe-alerts.zip"
        },
        "require": {
          "ffraenz/private-composer-installer": "^5.0"
        }
      }
    },
 ],
```

> NOTE: Simply update the version above and run `composer update` to upgrade the plugin in the future.

Then, add the plugin definition to the require section:

```
  "require": {
    "moderntribe/tribe-alerts": "*",
  }
```

Tell composer where to put your WordPress plugins/themes via the `extra` section.

> NOTE: Adjust the paths based on your project.

```
  "extra": {
    "wordpress-install-dir": "wp",
    "installer-paths": {
      "wp-content/mu-plugins/{$name}": [
        "type:wordpress-muplugin"
      ],
      "wp-content/plugins/{$name}": [
        "type:wordpress-plugin"
      ],
      "wp-content/themes/{$name}": [
        "type:wordpress-theme"
      ]
    }
  },
```

You may have to allow this plugin in your config as well:

```
    "allow-plugins": {
      "composer/installers": true,
      "ffraenz/private-composer-installer": true,
    }
```

Finally, install the plugin:

```
composer update
```

### Displaying an Alert

[](#displaying-an-alert)

The banner is set to automatically display using the `wp_footer` hook. If you need to manually add it to a theme or a plugin, add the following code to render the alert view:

```
