src/Admin/Rest.php */ spl_autoload_register( static function ( $class_name ) { if ( 0 !== strpos( $class_name, 'GoConsent\\' ) ) { return; } $path = GOCONSENT_DIR . 'src/' . str_replace( '\\', '/', substr( $class_name, strlen( 'GoConsent\\' ) ) ) . '.php'; if ( is_readable( $path ) ) { require $path; } } ); register_activation_hook( __FILE__, array( 'GoConsent\\Installer', 'activate' ) ); register_deactivation_hook( __FILE__, array( 'GoConsent\\Installer', 'deactivate' ) ); add_action( 'plugins_loaded', array( 'GoConsent\\Plugin', 'instance' ) ); if ( ! function_exists( 'goconsent' ) ) { /** * Public accessor for themes and other plugins. * * @return GoConsent\Plugin */ function goconsent() { return GoConsent\Plugin::instance(); } }