-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmyplugin.php
More file actions
56 lines (35 loc) · 1.18 KB
/
Copy pathmyplugin.php
File metadata and controls
56 lines (35 loc) · 1.18 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
<?php
/*
Plugin Name: My Plugin
Description: Example plugin for learning purposes
Version: 1.0
Author: Danielle Maria Ali
Author URI: https://www.dmariali.com
License: GPL v3.0+
Text Domain: my-plugin
*/
// exit if file is called directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// if admin area
if (is_admin()){
//include dependencies
require_once plugin_dir_path(__FILE__). 'admin/admin-menu.php';
require_once plugin_dir_path(__FILE__). 'admin/settings-page.php';
require_once plugin_dir_path(__FILE__). 'admin/settings-register.php';
require_once plugin_dir_path(__FILE__). 'admin/settings-callbacks.php';
}
//include dependencies: admin and public
require_once plugin_dir_path(__FILE__). 'includes/core-functions.php';
function myplugin_options_default(){
return array(
'custom_url' => 'https://wordpress.org',
'custom_title' => 'Powered by FairyDust!',
'custom_style' => 'disable',
'custom_message'=> '<p class="custom-message"> My custom Message </p>',
'custom_footer' => 'Special Message for users... so very special',
'custom_toolbar'=> false,
'custom_scheme' => 'default',
);
}