[ SYSTEM ]: Linux wordpress 6.1.0-44-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
[ SERVER ]: Apache/2.4.66 (Debian) | PHP: 8.2.30
[ USER ]: www-data | IP: 172.19.30.54
GEFORCE FILE MANAGER
/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
rocket-lazy-load
/
src
/
Dependencies
/
LaunchpadOptions
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📁 Interfaces
SET
[ DEL ]
📁 Traits
SET
[ DEL ]
📄 Options.php
1,936 B
SET
[ EDIT ]
|
[ DEL ]
📄 Set.php
3,015 B
SET
[ EDIT ]
|
[ DEL ]
📄 Settings.php
2,703 B
SET
[ EDIT ]
|
[ DEL ]
📄 SiteOptions.php
1,890 B
SET
[ EDIT ]
|
[ DEL ]
📄 Transients.php
1,641 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: Settings.php
<?php namespace RocketLazyLoadPlugin\Dependencies\LaunchpadOptions; class Settings implements Interfaces\SettingsInterface { /** * WordPress Option facade. * * @var Options */ protected $options; /** * Settings option key. * * @var string */ protected $settings_key; /** * Settings Set. * * @var Set */ protected $settings; /** * Instantiate settings. * * @param Options $options WordPress Option facade. * @param string $settings_key Settings option key. */ public function __construct( Options $options, string $settings_key = 'settings' ) { $this->options = $options; $this->settings_key = $settings_key; $this->settings = new Set( $this->options->get( $settings_key, [] ), $this->settings_key ); } /** * Gets the value for the given name. Returns the default value if the value does not exist. * * @param string $name Name of the option to get. * @param mixed $default Default value to return if the value does not exist. * * @return mixed */ public function get( string $name, $default = null ) { return $this->settings->get( $name, $default ); } /** * Sets the value of an option. Update the value if the option for the given name already exists. * * @param string $name Name of the option to set. * @param mixed $value Value to set for the option. * * @return void */ public function set( string $name, $value ) { $this->settings->set( $name, $value ); $this->persist(); } /** * Deletes the option with the given name. * * @param string $name Name of the option to delete. * * @return void */ public function delete( string $name ) { $this->settings->delete( $name ); $this->persist(); } /** * Checks if the option with the given name exists. * * @param string $name Name of the option to check. * * @return bool */ public function has( string $name ): bool { return $this->settings->has( $name ); } /** * Persist the settings into the database. * * @return void */ protected function persist() { do_action( "pre_persist_{$this->settings_key}", $this->settings->get_values() ); $this->options->set( $this->settings_key, $this->settings->get_values() ); do_action( "persist_{$this->settings_key}", $this->settings->get_values() ); } /** * Import multiple values at once. * * @param array<string,mixed> $values Values to import. * * @return void */ public function import( array $values ) { $this->settings->set_values( $values ); $this->persist(); } /** * Export settings values. * * @return array<string,mixed> */ public function dumps(): array { return $this->settings->get_values(); } }