-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdistributor-addon-template.php
More file actions
35 lines (32 loc) · 1 KB
/
distributor-addon-template.php
File metadata and controls
35 lines (32 loc) · 1 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
<?php
/**
* Plugin Name: Distributor { Add-on name } Add-on
* Description: { Add-on description }
* Version: 1.0.0
* Author: Novembit
* Author URI: https://novembit.com
* License: GPLv3 or later
* Domain Path: /lang/
* GitHub Plugin URI: { Add-on repository URI }
* Text Domain: distributor-{ Add-on prefix }
*
* @package distributor-{ Add-on slug }
*/
/**
* Bootstrap function
*/
function dt_{ Add - on strictslug }_add_on_bootstrap() {
if ( ! function_exists( '\Distributor\ExternalConnectionCPT\setup' ) ) {
if ( is_admin() ) {
add_action(
'admin_notices',
function() {
printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( 'notice notice-error' ), esc_html( 'You need to have Distributor plug-in activated to run the {Add-on name}.', 'distributor-acf' ) );
}
);
}
return;
}
require_once plugin_dir_path( __FILE__ ) . 'manager.php';
}
add_action( 'plugins_loaded', 'dt_{ Add-on strictslug }_add_on_bootstrap' );