-
Notifications
You must be signed in to change notification settings - Fork 2
/
byline-manager.php
executable file
·65 lines (51 loc) · 1.69 KB
/
byline-manager.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
57
58
59
60
61
62
63
64
65
<?php
/**
* Plugin Name: Byline Manager
* Plugin URI: https://github.com/alleyinteractive/byline-manager
* Description: Manage an article's byline and author profiles.
* Author: Alley Interactive
* Author URI: https://alley.com
* Text Domain: byline-manager
* Domain Path: /languages
* Version: 0.6.0
* Requires WP: 5.9
* Requires PHP: 8.0
* Tested up to: 6.4
*
* @package Byline_Manager
*/
namespace Byline_Manager;
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'BYLINE_MANAGER_PATH', __DIR__ . '/' );
/**
* Helper function to validate a path before doing something with it.
*
* @param string $path The path to validate.
*
* @return bool True if the path is valid, false otherwise.
*/
function validate_path( string $path ) : bool {
return in_array( validate_file( $path ), [ 0, 2 ], true ) && file_exists( $path );
}
// Autoloader.
require_once BYLINE_MANAGER_PATH . 'inc/autoload.php';
// Template Tags.
require_once BYLINE_MANAGER_PATH . 'inc/template-tags.php';
// Asset loader.
require_once BYLINE_MANAGER_PATH . 'inc/assets.php';
// Data structures.
require_once BYLINE_MANAGER_PATH . 'inc/data-structures.php';
// Admin interfaces.
require_once BYLINE_MANAGER_PATH . 'inc/admin-ui.php';
// REST API integration.
require_once BYLINE_MANAGER_PATH . 'inc/rest-api.php';
// WPGraphQL integration.
require_once BYLINE_MANAGER_PATH . 'inc/graphql.php';
// Yoast SEO integration.
require_once BYLINE_MANAGER_PATH . 'inc/yoast.php';
// Hook into core filters to output byline.
require_once BYLINE_MANAGER_PATH . 'inc/core-filters.php';
require_once BYLINE_MANAGER_PATH . 'inc/class-core-author-block.php';