REDROOM
PHP 8.0.30
Path:
Logout
Edit File
Size: 1.39 KB
Close
/proc/thread-self/cwd/wp/wp-content/plugins/auto-post-thumbnail/src/Modules/Options.php
Text
Base64
<?php /** * Options module. * * @package AutoPostThumbnail */ namespace AutoPostThumbnail\Modules; use AutoPostThumbnail\Constants\Options_Schema; use AutoPostThumbnail\Modules\Base; use AutoPostThumbnail\Settings; /** * Options module. * * @package AutoPostThumbnail */ class Options extends Base { const OPTION_GROUP = 'wapt'; /** * Run hooks for the options module. * * @return void */ public function run_hooks() { add_action( 'admin_init', [ $this, 'register_settings' ] ); add_filter( 'mime_types', [ $this, 'allow_upload_webp' ] ); } /** * Register the settings for the options module. * * @return void */ public function register_settings() { $schema = Options_Schema::get(); foreach ( $schema as $key => $value ) { $qualified_name = sprintf( '%s_%s', Settings::OPTION_PREFIX, $key ); register_setting( self::OPTION_GROUP, $qualified_name, [ 'sanitize_callback' => function ( $value ) use ( $key ) { return Settings::instance()->sanitize_value( $key, $value ); }, 'default' => $value['default'], ] ); } } /** * Allow upload webp. * * @param array $existing_mimes Existing mimes. * @return array */ public function allow_upload_webp( $existing_mimes ) { if ( ! is_array( $existing_mimes ) ) { return $existing_mimes; } $existing_mimes['webp'] = 'image/webp'; return $existing_mimes; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Admin
DIR
-
drwxr-xr-x
2026-04-02 07:27:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Api.php
1.29 KB
lrw-r--r--
2026-04-02 07:27:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Auto_Generate.php
3.11 KB
lrw-r--r--
2026-04-02 07:27:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Base.php
2.38 KB
lrw-r--r--
2026-04-02 07:27:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Options.php
1.39 KB
lrw-r--r--
2026-04-02 07:27:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).