forked from daronspence/huh
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhuh-wp-docs.php
More file actions
51 lines (45 loc) · 1.34 KB
/
huh-wp-docs.php
File metadata and controls
51 lines (45 loc) · 1.34 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
<?php
/**
* @wordpress-plugin
* Plugin Name: Huh! WP Docs
* Plugin URI: https://silvanhagen.com
* Description: Show help docs easily in the WordPress admin and the theme customizer.
* Version: 1.0.0
* Author: neverything
* Author URI: https://silvanhagen.com
* Text Domain: huh-wp-docs
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* GitHub Plugin URI: neverything/huh-wp-docs
*
*
* Note: This plugin is based on the awesome <https://secretpizza.party/huh-making-documentation-easier/> and a fork of
* it (<https://github.com/Daronspence/huh>) that allows to use multiple markdown files. Thanks for that!
*
* @package Neverything\WP_Huh
*/
namespace Neverything\WP_Huh;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
include __DIR__ . '/vendor/autoload.php';
}
if ( ! class_exists( __NAMESPACE__ . '\Plugin' ) ) {
trigger_error( sprintf( '%s does not exist. Check Composer\'s autoloader.', __NAMESPACE__ . '\Plugin' ) );
return;
}
/**
* Initializes the plugin.
*
* @since 1.0.0
*/
function init() {
/**
* Default docs url.
*/
$doc_urls['all'] = 'https://raw.githubusercontent.com/neverything/huh-wp-docs/master/README.md';
$plugin = new Plugin();
$plugin->init( $doc_urls );
}
add_action( 'after_setup_theme', __NAMESPACE__ . '\init', 100 );