Server IP : 49.212.180.16 / Your IP : 18.117.166.111 Web Server : Apache System : FreeBSD www2606.sakura.ne.jp 13.0-RELEASE-p14 FreeBSD 13.0-RELEASE-p14 #2: Mon Dec 9 13:54:55 JST 2024 root@www5301.sakura.ne.jp:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 User : utannto ( 1076) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/utannto/www/hironaka.biz/wp-content/plugins/easing-slider/src/Foundation/Options/ |
Upload File : |
<?php namespace EasingSlider\Foundation\Options; use EasingSlider\Foundation\Contracts\Options\Option as OptionContract; /** * Exit if accessed directly */ if ( ! defined('ABSPATH')) { exit; } abstract class Option implements OptionContract { /** * Name * * @var string */ protected $name; /** * Value * * @var mixed */ public $value; /** * Constructor * * @return void */ public function __construct() { $this->value = $this->getValue(); add_option($this->name, $this->getDefaults()); } /** * Gets the option name * * @return string */ public function getName() { return $this->name; } /** * Gets the option value * * @return mixed */ public function getValue() { return get_option($this->name, $this->getDefaults()); } /** * Sets the option value * * @param mixed $value * @return void */ public function setValue($value) { $this->value = $value; } /** * Saves the option * * @return viod */ public function save() { update_option($this->name, $this->value); } /** * Deletes the option * * @return void */ public function delete() { delete_option($this->name); } /** * Gets the default settings * * @return mixed */ public function getDefaults() { // } }