62 lines
1.7 KiB
PHP
62 lines
1.7 KiB
PHP
<?php
|
|
// Copyright 2026 Umbra Tools (umbratools.com)
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
/**
|
|
* Plugin Name: BD BookShelfHelper
|
|
* Plugin URI: https://authorbdmurphy.com/plugins/bd-bookshelfhelper
|
|
* Description: Manages book data, series, pen names, short links, reviews, and ratings for the BD Murphy Bookshelf theme.
|
|
* Version: 2.0.0
|
|
* Author: B.D. Murphy
|
|
* Author URI: https://authorbdmurphy.com
|
|
* License: GPLv2 or later
|
|
* Text Domain: bd-bookshelfhelper
|
|
* Requires at least: 6.0
|
|
* Requires PHP: 7.4
|
|
*/
|
|
|
|
if (!defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
define('BD_BHS_VERSION', '2.0.0');
|
|
define('BD_BHS_DIR', plugin_dir_path(__FILE__));
|
|
define('BD_BHS_URI', plugin_dir_url(__FILE__));
|
|
|
|
// Main plugin class
|
|
require_once BD_BHS_DIR . 'inc/class-bookhelper.php';
|
|
require_once BD_BHS_DIR . 'inc/class-admin.php';
|
|
require_once BD_BHS_DIR . 'inc/class-install.php';
|
|
|
|
/**
|
|
* Get plugin instance
|
|
*
|
|
* @return BD_BookShelfHelper
|
|
*/
|
|
function BD_BookShelfHelper() {
|
|
return BD_BookShelfHelper::instance();
|
|
}
|
|
|
|
/**
|
|
* Initialize plugin
|
|
*/
|
|
function bd_bookshelf_init() {
|
|
// Initialize main plugin
|
|
BD_BookShelfHelper::instance();
|
|
|
|
// Initialize admin (only in admin)
|
|
if (is_admin()) {
|
|
BD_BookShelfHelper_Admin::instance();
|
|
}
|
|
}
|
|
add_action('plugins_loaded', 'bd_bookshelf_init', 10);
|
|
|
|
// Activation/Deactivation hooks
|
|
register_activation_hook(__FILE__, array('BD_BookShelfHelper_Install', 'activate'));
|
|
register_deactivation_hook(__FILE__, array('BD_BookShelfHelper_Install', 'deactivate'));
|
|
|
|
// Load plugin text domain
|
|
add_action('plugins_loaded', function() {
|
|
load_plugin_textdomain('bd-bookshelfhelper', false, dirname(plugin_basename(__FILE__)) . '/languages');
|
|
});
|