- WordPress core y plugins - Tema Twenty Twenty-Four configurado - Plugin allow-unfiltered-html.php simplificado - .gitignore configurado para excluir wp-config.php y uploads 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
57 lines
1.2 KiB
PHP
Executable File
57 lines
1.2 KiB
PHP
Executable File
<?php
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit; // Exit if accessed directly
|
|
}
|
|
|
|
#[AllowDynamicProperties]
|
|
class BWFAN_Load_Custom_Search {
|
|
|
|
/**
|
|
* Saves all the custom_search object
|
|
* @var array
|
|
*/
|
|
private static $custom_search = array();
|
|
private static $ins = null;
|
|
|
|
/**
|
|
* Return the object of current class
|
|
*
|
|
* @return null|BWFAN_Load_Custom_Search
|
|
*/
|
|
public static function get_instance() {
|
|
if ( null === self::$ins ) {
|
|
self::$ins = new self();
|
|
}
|
|
|
|
return self::$ins;
|
|
}
|
|
|
|
/**
|
|
* Register the integration when the integration file is included
|
|
*
|
|
* @param $class
|
|
*/
|
|
public static function register( $class ) {
|
|
if ( class_exists( $class ) && method_exists( $class, 'get_instance' ) ) {
|
|
$temp_integration = $class::get_instance();
|
|
|
|
$slug = $temp_integration->get_slug();
|
|
self::$custom_search[ $slug ] = $temp_integration;
|
|
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Return all available action registered which register by their integration
|
|
* @return array
|
|
*/
|
|
public function get_custom_search( $slug = '' ) {
|
|
return isset( self::$custom_search[ $slug ] ) ? self::$custom_search[ $slug ] : null;
|
|
}
|
|
|
|
}
|
|
|
|
if ( class_exists( 'BWFAN_Load_Custom_Search' ) ) {
|
|
BWFAN_Core::register( 'custom_search', 'BWFAN_Load_Custom_Search' );
|
|
} |