46 lines
1.0 KiB
PHP
46 lines
1.0 KiB
PHP
<?php
|
|
/**
|
|
* Plugin Name: Logo Soup
|
|
* Description: Build balanced logo grids and marquees directly inside the WordPress block editor.
|
|
* Version: 0.1.0
|
|
* Requires at least: 6.1
|
|
* Requires PHP: 7.4
|
|
* Author: Ksolo
|
|
* License: GPL-2.0-or-later
|
|
* Text Domain: logo-soup
|
|
*
|
|
* @package LogoSoup
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
spl_autoload_register(
|
|
static function ( $autoload_class ) {
|
|
$prefix = 'LogoSoup\\';
|
|
|
|
if ( 0 !== strpos( $autoload_class, $prefix ) ) {
|
|
return;
|
|
}
|
|
|
|
$relative_class = substr( $autoload_class, strlen( $prefix ) );
|
|
$parts = explode( '\\', $relative_class );
|
|
$class_name = array_pop( $parts );
|
|
$class_slug = 'class-' . strtolower( str_replace( '_', '-', $class_name ) ) . '.php';
|
|
$directory_path = '';
|
|
|
|
if ( ! empty( $parts ) ) {
|
|
$directory_path = implode( DIRECTORY_SEPARATOR, $parts ) . DIRECTORY_SEPARATOR;
|
|
}
|
|
|
|
$file_path = __DIR__ . '/src/' . $directory_path . $class_slug;
|
|
|
|
if ( file_exists( $file_path ) ) {
|
|
require_once $file_path;
|
|
}
|
|
}
|
|
);
|
|
|
|
LogoSoup\Plugin::boot( __FILE__ );
|