-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhelp-docs.php
68 lines (60 loc) · 1.26 KB
/
help-docs.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
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
<?php
/**
* @wordpress-plugin
* @package WordPress
* Plugin Name: Help Docs
* Description: Adds a custom post type that is visible only in the admin.
* Author: Thomas McMahon
* Version: 0.12
* Author URI: https://www.twistermc.com
* Text Domain: help_docs
*/
/**
* Exit early if directly accessed via URL.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Include the Class
*/
require plugin_dir_path( __FILE__ ) . 'inc/class-help-docs.php';
/**
* Register Custom Post Type
*/
function add_custom_post_type() {
Help_Docs::add_custom_post_type();
}
add_action( 'init', 'add_custom_post_type', 0 );
/**
* Add Admin Menus
*/
function help_docs_admin_menu() {
Help_Docs::help_docs_admin_menu();
}
add_action( 'admin_menu', 'help_docs_admin_menu' );
/**
* Add Admin Page
*/
function help_docs_admin_page() {
Help_Docs::help_docs_admin_page();
}
/**
* Add Detail Page
*/
function help_docs_admin_page_info() {
Help_Docs::help_docs_admin_page_info();
}
/**
* Settings Page
*/
function help_docs_settings() {
Help_Docs::help_docs_settings();
}
/**
* Add Styles
*/
function help_docs_add_style() {
wp_enqueue_style( 'help-docs-style', plugins_url() . '/help-docs/style/style.css', array(), '1.0' );
}
add_action( 'admin_enqueue_scripts', 'help_docs_add_style' );