GRAYBYTE WORDPRESS FILE MANAGER8245

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/ninja-forms/includes/Database/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/trustyourlawyer.com/wp-content/plugins/ninja-forms/includes/Database//Logger.php
<?php if ( ! defined( 'ABSPATH' ) ) exit;

/**
 * Class NF_Abstracts_logger
 *
 * Handles custom logging for Ninja Forms and Ninja Forms Extensions.
 *
 * PSR-3 and WordPress Compliant where applicable.
 */
final class NF_Database_Logger extends NF_Abstracts_Logger
{
    protected $_current = array();

    /**
     * Logs with an arbitrary level.
     *
     * @param mixed $level
     * @param string $message
     * @param array $context
     * @return null
     */
    public function log( $level, $message, array $context = array() )
    {
        $message = $this->interpolate( $message, $context );

        // Create Log Object
        $log = Ninja_Forms()->form()->object()->get();
        $log->update_setting( 'type', 'log' )
            ->update_setting( 'level', $level )
            ->update_setting( 'message', $message );

        foreach ($context as $key => $value) {
            $log->update_setting($key, maybe_serialize($value));
        }

        // Add to Database
        $log->save();

        // Add to Current Property Array
        $this->_current[ $level ][] = $log;
    }

    /**
     * Get current logs for the request lifecycle
     *
     * @param string $level
     * @return array
     */
    public function get_current( $level = '' )
    {
        return ( $level ) ? $this->_current[ $level ] : $this->_current;
    }

    /**
     * Interpolates context values into the message placeholders.
     *
     * @param $message
     * @param array $context
     * @return string
     */
    protected function interpolate( $message, array $context = array() )
    {
        // build a replacement array with braces around the context keys
        $replace = array();
        foreach ($context as $key => $val) {

            if( is_array( $val ) ) continue;

            $replace['{' . $key . '}'] = $val;
        }

        // interpolate replacement values into the message and return
        return strtr($message, $replace);
    }
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:23
giriqfky / giriqfky
0755
Migrations
--
July 10 2025 04:32:23
giriqfky / giriqfky
0755
Models
--
July 10 2025 04:32:23
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:23
giriqfky / giriqfky
0644
CalderaSubmissionDataSource.php
9.903 KB
August 30 2022 18:49:42
giriqfky / giriqfky
0644
CptSubmissionDataSource.php
12.945 KB
August 16 2023 21:11:58
giriqfky / giriqfky
0644
FieldsController.php
20.281 KB
June 18 2025 22:07:56
giriqfky / giriqfky
0644
FormsController.php
1.689 KB
June 18 2019 19:32:24
giriqfky / giriqfky
0644
Logger.php
1.927 KB
March 14 2016 18:30:08
giriqfky / giriqfky
0644
Migrations.php
8.187 KB
January 14 2019 22:58:06
giriqfky / giriqfky
0644
MockData.php
45.679 KB
February 04 2020 21:17:42
giriqfky / giriqfky
0644
PublishProcessing.php
0.792 KB
October 06 2016 20:51:12
giriqfky / giriqfky
0644
SubmissionExpirationCron.php
3.564 KB
July 02 2018 17:39:10
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF