-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathremote-dashboard-notifications.php
More file actions
75 lines (63 loc) · 2.54 KB
/
Copy pathremote-dashboard-notifications.php
File metadata and controls
75 lines (63 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
/**
* Remote Dashboard Notifications.
*
* This plugin allows to push any notification to the WordPress dashboard.
* This allows easy communication with the clients.
*
* @package Remote Dashboard Notifications
* @author ThemeAvenue <web@themeavenue.net>
* @license GPL-2.0+
* @link http://themeavenue.net
* @copyright 2013 ThemeAvenue
*
* Plugin Name: Remote Dashboard Notifications
* Plugin URI: https://github.com/ThemeAvenue/Remote-Dashboard-Notifications
* Description: Remote Dashboard Notifications is made for themes and plugins developers who want to send short notifications to their users.
* Version: 1.3.0
* Author: ThemeAvenue
* Author URI: http://themeavenue.net
* Text Domain: remote-notifications
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Domain Path: /languages
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
define( 'RDN_URL', plugin_dir_url( __FILE__ ) );
define( 'RDN_PATH', plugin_dir_path( __FILE__ ) );
/*----------------------------------------------------------------------------*
* Public-Facing Functionality
*----------------------------------------------------------------------------*/
require_once( plugin_dir_path( __FILE__ ) . 'includes/class-rdn.php' );
/*
* Register hooks that are fired when the plugin is activated or deactivated.
* When the plugin is deleted, the uninstall.php file is loaded.
*/
register_activation_hook( __FILE__, array( 'Remote_Notifications', 'activate' ) );
register_deactivation_hook( __FILE__, array( 'Remote_Notifications', 'deactivate' ) );
/**
* Instantiate public class
*/
add_action( 'plugins_loaded', array( 'Remote_Notifications', 'get_instance' ) );
/*----------------------------------------------------------------------------*
* Dashboard and Administrative Functionality
*----------------------------------------------------------------------------*/
/**
* The code below is intended to to give the lightest footprint possible.
*/
if ( is_admin() ) {
require_once( RDN_PATH . 'includes/class-rdn-admin.php' );
add_action( 'plugins_loaded', array( 'Remote_Notifications_Admin', 'get_instance' ) );
/**
* Instantiate the client class
*/
if ( ! class_exists( 'TAV_Remote_Notification_Client' ) ) {
require_once( RDN_PATH . 'includes/class-remote-notification-client.php' );
}
if( function_exists( 'rdnc_add_notification' ) ) {
rdnc_add_notification( 4, '0a075eda8c3be0ed', 'https://api.themeavenue.net' );
}
}