forked from scribu/wp-posts-to-posts
-
Notifications
You must be signed in to change notification settings - Fork 3
/
posts-to-posts.php
46 lines (34 loc) · 1.05 KB
/
posts-to-posts.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
<?php
/*
Plugin Name: Posts 2 Posts
Description: Create many-to-many relationships between all types of posts.
Version: 1.6.2
Author: scribu
Author URI: http://scribu.net/
Plugin URI: http://scribu.net/wordpress/posts-to-posts
Text Domain: posts-to-posts
Domain Path: /lang
*/
define( 'P2P_PLUGIN_VERSION', '1.6.2' );
define( 'P2P_TEXTDOMAIN', 'posts-to-posts' );
require_once dirname( __FILE__ ) . '/scb/load.php';
function _p2p_load() {
load_plugin_textdomain( P2P_TEXTDOMAIN, '', basename( dirname( __FILE__ ) ) . '/lang' );
require_once dirname( __FILE__ ) . '/core/init.php';
register_uninstall_hook( __FILE__, array( 'P2P_Storage', 'uninstall' ) );
if ( is_admin() )
_p2p_load_admin();
}
scb_init( '_p2p_load' );
function _p2p_load_admin() {
P2P_Autoload::register( 'P2P_', dirname( __FILE__ ) . '/admin' );
new P2P_Box_Factory;
new P2P_Column_Factory;
new P2P_Dropdown_Factory;
new P2P_Tools_Page;
}
function _p2p_init() {
// Safe hook for calling p2p_register_connection_type()
do_action( 'p2p_init' );
}
add_action( 'wp_loaded', '_p2p_init' );