-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroxyapi.php
More file actions
58 lines (53 loc) · 1.78 KB
/
roxyapi.php
File metadata and controls
58 lines (53 loc) · 1.78 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
<?php
/**
* Plugin Name: Astrology, Horoscope, Tarot, Numerology by Roxy
* Plugin URI: https://roxyapi.com
* Description: Add astrology, daily horoscopes, tarot card pulls, numerology readings, and Vedic and Western birth charts to any WordPress page. Blocks and shortcodes. Calculations cross-checked against the NASA JPL Horizons ephemeris.
* Version: 1.0.0
* Requires at least: 6.5
* Tested up to: 6.9
* Requires PHP: 7.4
* Author: RoxyAPI
* Author URI: https://roxyapi.com
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: roxyapi
* Domain Path: /languages
*
* @package RoxyAPI
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
const ROXYAPI_VERSION = '1.0.0';
const ROXYAPI_PHP_MIN = '7.4.0';
const ROXYAPI_PLUGIN_FILE = __FILE__;
if ( version_compare( PHP_VERSION, ROXYAPI_PHP_MIN, '<' ) ) {
add_action(
'admin_notices',
static function () {
echo '<div class="notice notice-error"><p>RoxyAPI requires PHP 7.4 or higher.</p></div>';
}
);
return;
}
// Composer's autoloader is preferred when the dev environment installed it
// (composer install). The released zip ships without `vendor/` so we register
// a minimal PSR-4 autoloader covering the plugin's own namespace.
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require_once __DIR__ . '/vendor/autoload.php';
} else {
spl_autoload_register(
static function ( $fqcn ) {
if ( strpos( $fqcn, 'RoxyAPI\\' ) !== 0 ) {
return;
}
$relative = substr( $fqcn, strlen( 'RoxyAPI\\' ) );
$path = __DIR__ . '/src/' . str_replace( '\\', '/', $relative ) . '.php';
if ( is_readable( $path ) ) {
require_once $path;
}
}
);
}
RoxyAPI\Plugin::load( __FILE__ );