at path:
ROOT
/
wp-content
/
plugins
/
weglot
/
weglot-autoload.php
run:
R
W
Run
app
DIR
2026-07-10 16:52:05
R
W
Run
blocks
DIR
2026-07-10 16:52:05
R
W
Run
dist
DIR
2026-07-10 16:52:05
R
W
Run
languages
DIR
2026-07-10 16:52:05
R
W
Run
src
DIR
2026-07-10 16:52:05
R
W
Run
templates
DIR
2026-07-10 16:52:05
R
W
Run
vendor
DIR
2026-07-10 16:52:05
R
W
Run
bootstrap.php
6.9 KB
2026-07-02 12:29:18
R
W
Run
Delete
Rename
changelog.md
34.52 KB
2026-07-02 12:29:18
R
W
Run
Delete
Rename
changelog.txt
1.8 KB
2026-07-02 12:29:18
R
W
Run
Delete
Rename
composer.json
1.65 KB
2026-07-02 12:29:18
R
W
Run
Delete
Rename
readme.txt
11.32 KB
2026-07-06 11:36:44
R
W
Run
Delete
Rename
weglot-autoload.php
837 By
2026-07-02 12:29:18
R
W
Run
Delete
Rename
weglot-compatibility.php
1.4 KB
2026-07-02 12:29:18
R
W
Run
Delete
Rename
weglot-functions.php
7.24 KB
2026-07-02 12:29:18
R
W
Run
Delete
Rename
weglot.php
12.46 KB
2026-07-02 12:29:18
R
W
Run
Delete
Rename
error_log
up
📄
weglot-autoload.php
Save
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } spl_autoload_register( 'weglot_autoload' ); /** * Weglot autoload class PHP with class-name.php * @since 2.0 * @param string $class_name * @return void */ function weglot_autoload( $class_name ) { $dir_class = __DIR__ . '/src/'; $prefix = 'class-'; $file_parts = explode( '\\', $class_name ); $total_parts = count( $file_parts ) - 1; $dir_file = $dir_class; for ( $i = 1; $i <= $total_parts; $i++ ) { if ( $total_parts !== $i ) { $dir_file .= strtolower( $file_parts[ $i ] ) . '/'; } else { $string = str_replace( '_', '-', strtolower( $file_parts[ $i ] ) ); $file_load = $dir_file . $prefix . $string . '.php'; if ( file_exists( $file_load ) ) { include_once $file_load; // nosemgrep: audit.php.lang.security.file.inclusion-arg } } } }