Plugin Directory

source: unagi/trunk/plugin.php

Last change on this file was 3400676, checked in by handyplugins, 4 months ago

Update to version 0.2.2 from GitHub

File size: 1.6 KB
Line 
1<?php
2/**
3 * Plugin Name:       Unagi
4 * Plugin URI:        https://github.com/HandyPlugins/unagi
5 * Description:       Unagi clean-up your WordPress notices from the dashboard and show them under the "Notifications" pages.
6 * Version:           0.2.2
7 * Requires at least: 5.0
8 * Requires PHP:      5.6
9 * Author:            HandyPlugins
10 * Author URI:        https://handyplugins.co/
11 * License:           GPL v2 or later
12 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
13 * Text Domain:       unagi
14 * Domain Path:       /languages
15 *
16 * @package           Unagi
17 */
18
19namespace Unagi;
20
21if ( ! defined( 'ABSPATH' ) ) {
22        exit; // Exit if accessed directly.
23}
24
25// Useful global constants.
26define( 'UNAGI_VERSION', '0.2.2' );
27define( 'UNAGI_URL', plugin_dir_url( __FILE__ ) );
28define( 'UNAGI_PATH', plugin_dir_path( __FILE__ ) );
29define( 'UNAGI_INC', UNAGI_PATH . 'includes/' );
30
31// Include files.
32require_once UNAGI_INC . 'constants.php';
33require_once UNAGI_INC . 'utils.php';
34require_once UNAGI_INC . 'core.php';
35require_once UNAGI_INC . 'shovel.php';
36require_once UNAGI_INC . 'notifications.php';
37
38// Require Composer autoloader if it exists.
39if ( file_exists( UNAGI_PATH . 'vendor/autoload.php' ) ) {
40        require_once UNAGI_PATH . 'vendor/autoload.php';
41}
42
43add_action( 'plugins_loaded', __NAMESPACE__ . '\unagi_run' );
44
45/**
46 * Get prepared! U(N) - NAG - I
47 *
48 * @see  https://giphy.com/gifs/friends-tv-ubpB6XcvpYMF2
49 * @link https://www.urbandictionary.com/define.php?term=Unagi
50 */
51function unagi_run() {
52        if ( ! current_user_can( Utils\required_capability() ) ) {
53                return;
54        }
55        // Bootstrap.
56        Core\setup();
57        Shovel\setup();
58        Notifications\setup();
59}
60
Note: See TracBrowser for help on using the repository browser.