Smilia: children's dental clinic website (WordPress theme and plugin)
This commit is contained in:
commit
4f4b5f2c0a
266 files changed
+16459
No files matched your search
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: Smilia Core
|
||||
* Description: Услуги, врачи, отзывы, вопросы, настройки клиники и запись на приём.
|
||||
* Version: 0.1.0
|
||||
* Requires at least: 6.5
|
||||
* Requires PHP: 8.2
|
||||
* Text Domain: smilia-core
|
||||
* Domain Path: /languages
|
||||
*/
|
||||
|
||||
namespace Smilia\Core;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
define( 'SMILIA_CORE_FILE', __FILE__ );
|
||||
define( 'SMILIA_CORE_DIR', __DIR__ );
|
||||
|
||||
spl_autoload_register(
|
||||
static function ( string $class_name ): void {
|
||||
$prefix = __NAMESPACE__ . '\\';
|
||||
if ( 0 !== strpos( $class_name, $prefix ) ) {
|
||||
return;
|
||||
}
|
||||
$relative = substr( $class_name, strlen( $prefix ) );
|
||||
$file = SMILIA_CORE_DIR . '/includes/class-' . strtolower( str_replace( '_', '-', $relative ) ) . '.php';
|
||||
if ( is_readable( $file ) ) {
|
||||
require $file;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
require SMILIA_CORE_DIR . '/vendor/autoload.php';
|
||||
|
||||
Plugin::instance()->register();
|
||||
|
||||
register_activation_hook( __FILE__, array( Plugin::class, 'activate' ) );
|
||||
register_deactivation_hook( __FILE__, array( Plugin::class, 'deactivate' ) );
|
||||
Reference in new issue
Block a user