-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevpages-wp.php
More file actions
34 lines (27 loc) · 844 Bytes
/
devpages-wp.php
File metadata and controls
34 lines (27 loc) · 844 Bytes
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
<?php
/**
* @package poutine-static-pages
* @version 0.1
*/
/*
Plugin Name: Dev/Static Pages for WP
Plugin URI: https://poutine.dev
Description: Have you ever needed to spin up a quick wordpress template, and had to go to the Admin panel just to create the page/post to tie into? No longer!
Author: Poutine / Chris Lagasse
Version: 0.1
Author URI: https://poutine.dev
*/
require_once('vendor/autoload.php');
define( 'POUTINEDEVPAGES__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
require_once( POUTINEDEVPAGES__PLUGIN_DIR . "/vendor/autoload.php" );
add_action('init', 'poutine_staticpage_setup');
function poutine_staticpage_setup()
{
$handler = Poutine\DevPagesWP\Manager::init();
$handler->register();
}
function register_page($url, $args = [])
{
$handler = Poutine\DevPagesWP\Manager::init();
$handler->add($url, $args);
}