-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuedu-trustpilot.php
More file actions
46 lines (38 loc) · 1.49 KB
/
Copy pathnuedu-trustpilot.php
File metadata and controls
46 lines (38 loc) · 1.49 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
<?php
/**
* Plugin Name: NU.edu Trustpilot Integration
* Description: Manages NU's various integrations with the Trustpilot platform & related functionality.
* Version: 1.0.0
* Author: Dan Scott
*
* Key features/functionality:
* - Custom REST endpoint to allow custom email encryption links
* - @TODO [Manage Trustpilot reviews widget visiblity across various pages] - migrate to this plugin & expand functionality
*
*
* Test API Path:
* .../xyz/xyz/?firstname=john&lastname=doe&clientnumber=12345
* (Note: On live site, we will set up a vanity URL to redirect to the above path so that we're not linking directly to the Wordpress /wp-json/ folder path)
*
* @package national-university
*/
namespace NUEDU_Trustpilot;
if ( ! defined( 'WPINC' ) ) {
die( 'Nope' );
}
define( 'NUEDU_TRUSTPILOT_FUNC_PATH', plugin_dir_path( __FILE__ ) );
define( 'NUEDU_TRUSTPILOT_FUNC_URL', plugin_dir_url( __FILE__ ) );
register_activation_hook( __FILE__, function() {
/**
* No required functionality on plugin activation,
* but leaving this here for now as a placeholder, just in case we need it later:
* require_once NUEDU_TRUSTPILOT_FUNC_PATH . 'inc/class-activation.php';
* new Inc\Activation();
*/
} );
use NUEDU_Trustpilot\Autoload\Init;
// NU's standard plugin file autoloader/initializer.
add_action( 'plugins_loaded', function() {
require_once NUEDU_TRUSTPILOT_FUNC_PATH . 'autoload/autoloader.php'; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant
new Init();
} );