-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathraythompsonwebdev-plugin.php
More file actions
executable file
·55 lines (43 loc) · 1.49 KB
/
raythompsonwebdev-plugin.php
File metadata and controls
executable file
·55 lines (43 loc) · 1.49 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
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* Plugin Name: Raythompsonwebdev Plugin
* Plugin URI: https://raythompsonwebdev.co.uk
* Description: raythompsonwebdev-com custom post types plugin
* Version: 0.1
* Author: Raymond Thompson
* Author URI: https://raythompsonwebdev.co.uk
* License: GPL2
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Raythompsonwebdev-plugin
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
define( 'RTWD_VERSION', '1.0.0' );
define( 'RTWDPATH', plugin_dir_path( __FILE__ ) );
// remove version from head.
remove_action( 'wp_head', 'wp_generator' );
require_once (RTWDPATH . '/post-types/register.php');
// Custom Post.
add_action( 'init', 'raythompsonwebdev_plugin_register_post_type', 0 );
require_once (RTWDPATH . '/taxonomies/register.php');
// Taxonomy.
add_action( 'init', 'raythompsonwebdev_plugin_register_taxonomies', 0 );
/**
* Flush rewrite rules to add "project" as a permalink slug.
*/
function raythompsonwebdev_plugin_rewrite_flush() {
raythompsonwebdev_plugin_register_post_type();
flush_rewrite_rules();
}
register_activation_hook( __FILE__, 'raythompsonwebdev_plugin_rewrite_flush' );
/**
* Registers an editor stylesheet for the theme.
*/
// include plugin dependencies: admin and public
require_once plugin_dir_path( __FILE__ ) . 'responsive-barchart.php';
require_once plugin_dir_path( __FILE__ ) . 'slider-panel.php';
require_once plugin_dir_path( __FILE__ ) . 'block-pattern.php';