| Server IP : 216.238.66.20 / Your IP : 216.73.216.248 Web Server : nginx/1.30.4 System : Linux woropds 5.15.0-187-generic #197-Ubuntu SMP Fri Jul 17 19:17:01 UTC 2026 x86_64 User : root ( 0) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/sweetheart.mx/htdocs/wp-content/plugins/url-shortify/lite/includes/ |
Upload File : |
<?php
namespace KaizenCoders\URL_Shortify;
class Option {
/**
* @since 1.0.0
* @var string
*
*/
static $prefix = 'kc_us_';
/**
* Get option
*
* @since 1.0.0
*
* @param string $default
*
* @param string $option
*
* @return bool|mixed|void|null
*
*/
public static function get( $option = '', $default = '' ) {
if ( empty( $option ) ) {
return null;
}
$option = self::$prefix . $option;
return get_option( $option, $default );
}
/**
* Set Option
*
* @since 1.0.0
*
* @param string $value
* @param bool $autoload
*
* @param string $option
*
* @return bool|null
*
*/
public static function set( $option = '', $value = '', $autoload = true ) {
if ( empty( $option ) ) {
return null;
}
$option = self::$prefix . $option;
return update_option( $option, $value, $autoload );
}
/**
* Add Option
*
* @since 1.0.0
*
* @param string $value
*
* @param string $option
*
* @return bool|null
*
*/
public static function add( $option = '', $value = '', $autoload = false ) {
if ( empty( $option ) ) {
return null;
}
$option = self::$prefix . $option;
return add_option( $option, $value, '', $autoload );
}
/**
* Delete option
*
* @since 1.0.0
*
* @param string $option
*
* @return bool|null
*
*/
public static function delete( $option = null ) {
if ( empty( $option ) ) {
return null;
}
$option = self::$prefix . $option;
return delete_option( $option );
}
}