-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patham-projects.php
39 lines (31 loc) · 1.23 KB
/
am-projects.php
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
<?php
/**
* Plugin Name: AMDEV Projects
* Description: Crea un custom post type e mette a disposizione uno shortcode per stamparne il contenuto
* Version: 1.0
* Author: Alessandro Mondelli
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: am-projects
*/
if (!defined('WPINC')) {
die;
}
define('PLUGIN_DIR', plugin_dir_path(__FILE__)); //Setto costante con path plugin
define('PLUGIN_URL', plugin_dir_url(__FILE__)); //Setto costante con url plugin
define('ADMIN_PLUGIN_DIR', plugin_dir_path(__FILE__) . 'admin'); //Setto costante con path sezione admin
define('ADMIN_PLUGIN_URL', plugin_dir_url(__FILE__) . 'admin'); //Setto costante con url sezione admin
register_activation_hook(__FILE__, '\\am_activation');
function am_activation()
{
require_once PLUGIN_DIR . '/inc/class-activator.php';
AmActivator::activator();
}
register_deactivation_hook(__FILE__, '\\am_deactivation');
function am_deactivation()
{
require_once PLUGIN_DIR . '/inc/class-deactivator.php';
AmDeactivator::deactivator();
}
require_once PLUGIN_DIR . '/inc/class-plugin.php';
$am_projects = new AmProject();