This repository has been archived by the owner on Jan 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfieldmanager-bylines.php
56 lines (49 loc) · 1.64 KB
/
fieldmanager-bylines.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
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* Plugin Name: Fieldmanager Bylines
* Plugin URI: http://github.com/alleyinteractive/fieldmanager-bylines
* Description: Allow creation of guest accounts to serve as Authors, Editors, Illustrators etc for a post.
* Author: Will Gladstone, David Herrera, Matt Boynes, Erick Hitter
* Version: 0.3
* Author URI: https://www.alleyinteractive.com/
*
* @package Fieldmanager_Bylines
*/
// Plugin Dependencies handler.
require_once __DIR__ . '/php/class-fm-bylines-plugin-dependencies.php';
/**
* Load plugin
*/
function fm_bylines_init() {
require_once __DIR__ . '/php/class-fm-bylines.php';
require_once __DIR__ . '/php/class-fm-bylines-post.php';
require_once __DIR__ . '/php/class-fm-bylines-author.php';
require_once __DIR__ . '/functions.php';
if ( defined( 'WP_CLI' ) && WP_CLI ) {
require_once __DIR__ . '/php/class-fm-bylines-cli.php';
}
add_action( 'wp_enqueue_scripts', 'fm_bylines_enqueue_assets' );
}
add_action( 'plugins_loaded', 'fm_bylines_init' );
/**
* Load plugin dependencies
*/
function fm_bylines_dependency() {
$fm_bylines_dependency = new FM_Bylines_Plugin_Dependencies( 'Fieldmanager Bylines', 'Fieldmanager', 'https://github.com/alleyinteractive/wordpress-fieldmanager' );
if ( ! $fm_bylines_dependency->verify() ) {
wp_die( wp_kses_post( $fm_bylines_dependency->message() ) );
}
}
register_activation_hook( __FILE__, 'fm_bylines_dependency' );
/**
* Get the base URL for this plugin.
*
* @return string URL pointing to Fieldmanager Plugin top directory.
*/
function fm_bylines_get_baseurl() {
return plugin_dir_url( __FILE__ );
}
/**
* Enqueue scripts and styles
*/
function fm_bylines_enqueue_assets() {}