-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmevox-glossary.php
56 lines (52 loc) · 1.45 KB
/
mevox-glossary.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
<?php
/**
*
* @link https://mevox.co/
* @since 1.0.0
*
* @wordpress-plugin
* Plugin Name: Mevox Glossary
* Plugin URI: http://mevox.co
* Description: Display glossary terms for your business.
* Version: 1.0.0
* Author: Mohamad Fala
* Author URI: https://mevox.co/
* Text Domain: mevox-glossary
*/
function glossary_custom_post_type() {
$supports = array(
'title', // post title
'editor', // post content
'excerpt', // post excerpt
'custom-fields', // custom fields
'revisions', // post revisions
'post-formats', // post formats
);
$labels = array(
'name' => _x('Terms', 'plural'),
'singular_name' => _x('Term', 'singular'),
'menu_name' => _x('Glossary', 'admin menu'),
'name_admin_bar' => _x('Glossary', 'admin bar'),
'add_new' => _x('Add New', 'add new'),
'add_new_item' => __('Add New Term'),
'new_item' => __('New term'),
'edit_item' => __('Edit term'),
'view_item' => __('View term'),
'all_items' => __('All Terms'),
'search_items' => __('Search terms'),
'not_found' => __('No terms found.'),
);
$args = array(
'supports' => $supports,
'labels' => $labels,
'public' => true,
'query_var' => true,
'rewrite' => array('slug' => 'glossary'),
'has_archive' => true,
'hierarchical' => false,
'menu_icon' => 'dashicons-editor-spellcheck',
);
register_post_type('terms', $args);
}
add_action('init', 'glossary_custom_post_type');
?>