forked from WordPress/phpdoc-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.php
27 lines (23 loc) · 925 Bytes
/
plugin.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
<?php
/**
* Plugin Name: WP Parser
* Description: Create a function reference site powered by WordPress
* Author: Ryan McCue, Paul Gibbs, Andrey "Rarst" Savchenko and Contributors
* Author URI: https://github.com/WordPress/phpdoc-parser/graphs/contributors
* Plugin URI: https://github.com/WordPress/phpdoc-parser
* Version:
* Text Domain: wp-parser
*/
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require __DIR__ . '/vendor/autoload.php';
}
// Check the class exists, to avoid fatals when composer hasn't been run.
if ( class_exists( 'WP_Parser\Plugin' ) ) {
global $wp_parser;
$wp_parser = new WP_Parser\Plugin();
$wp_parser->on_load();
}
register_activation_hook( __FILE__, array( 'P2P_Storage', 'init' ) );
register_activation_hook( __FILE__, array( 'P2P_Storage', 'install' ) );
// TODO safer handling for uninstall
//register_uninstall_hook( __FILE__, array( 'P2P_Storage', 'uninstall' ) );