This repository was archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhelpscout-api-docs.php
More file actions
64 lines (54 loc) · 1.53 KB
/
helpscout-api-docs.php
File metadata and controls
64 lines (54 loc) · 1.53 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
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* Granular Control for Yoast SEO
*
* @package Yoast/HelpScout-Docs-API
* @copyright Copyright (C) 2019 Yoast BV - support@yoast.com
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 or higher
*
* @wordpress-plugin
* Plugin Name: HelpScout Docs API
* Version: 0.1
* Plugin URI: https://yoast.com/wordpress/plugins/helpscout-docs-api/
* Description: Sync content to the Helpscout docs API
* Author: Team Yoast
* Author URI: https://yoast.com/
* Text Domain: helpscout-docs-api
*/
namespace HelpScout_Docs_API;
if ( ! function_exists( 'add_filter' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
define( 'HS_DOCS_API_PLUGIN_FILE', __FILE__ );
define( 'HS_DOCS_API_PLUGIN_VERSION', '0.1' );
define( 'HS_DOCS_API_DIR_PATH', plugin_dir_path( __FILE__ ) );
define( 'HS_DOCS_API_DIR_URL', plugin_dir_url( __FILE__ ) );
/**
* Class Yoast SEO Granular Control base class.
*/
class Control {
/**
* Initialize the plugin settings.
*/
public function __construct() {
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
return;
}
if ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) {
require __DIR__ . '/vendor/autoload.php';
}
add_action( 'plugins_loaded', array( $this, 'init' ) );
}
/**
* Initialize the whole plugin.
*/
public function init() {
if ( is_admin() ) {
load_plugin_textdomain( 'helpscout-docs-api', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
new Admin();
}
}
}
new Control();