at path:
ROOT
/
wp-content
/
plugins
/
wpforms-lite
/
src
/
API.php
run:
R
W
Run
Access
DIR
2026-04-11 05:03:39
R
W
Run
Admin
DIR
2026-04-11 05:03:39
R
W
Run
Db
DIR
2026-04-11 05:03:38
R
W
Run
Emails
DIR
2026-04-11 05:03:39
R
W
Run
Forms
DIR
2026-04-11 05:03:40
R
W
Run
Frontend
DIR
2026-04-11 05:03:40
R
W
Run
Helpers
DIR
2026-04-11 05:03:40
R
W
Run
Integrations
DIR
2026-04-11 05:03:40
R
W
Run
Lite
DIR
2026-04-11 05:03:38
R
W
Run
Logger
DIR
2026-04-11 05:03:40
R
W
Run
Migrations
DIR
2026-04-11 05:03:40
R
W
Run
Providers
DIR
2026-04-11 05:03:40
R
W
Run
Requirements
DIR
2026-04-11 05:03:40
R
W
Run
SmartTags
DIR
2026-04-11 05:03:40
R
W
Run
Tasks
DIR
2026-04-11 05:03:40
R
W
Run
API.php
923 By
2026-04-11 05:03:39
R
W
Run
Delete
Rename
ErrorHandler.php
11.45 KB
2026-04-11 05:03:39
R
W
Run
Delete
Rename
Loader.php
18.48 KB
2026-04-11 05:03:40
R
W
Run
Delete
Rename
WPForms.php
16.39 KB
2026-04-11 05:03:40
R
W
Run
Delete
Rename
error_log
up
📄
API.php
Save
<?php namespace WPForms; use WPForms\Admin\Tools\Views\Import; /** * Class API. * * @since 1.8.6 */ class API { /** * Registry. * Contains name of the class and method to be called. * For non-static methods, should contain the id to operate via wpforms->get( 'class' ). * * @todo Add non-static methods processing. * * @since 1.8.6 * * @var array[] */ private $registry = [ 'import_forms' => [ 'class' => Import::class, 'method' => 'import_forms', ], ]; /** * Magic method to call a method from registry. * * @since 1.8.6 * * @param string $name Method name. * @param array $args Arguments. * * @return mixed|null */ public function __call( string $name, array $args ) { $callback = $this->registry[ $name ] ?? null; if ( $callback === null ) { return null; } return call_user_func( [ $callback['class'], $callback['method'] ], ...$args ); } }