REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.95 KB
Close
//home/nshryvcy/blissfulnepal.com/wp-content/plugins/newsletter/classes/Newsletter/Logs.php
Text
Base64
<?php namespace Newsletter; defined('ABSPATH') || exit; class Logs { /** * * @global wpdb $wpdb * @param string $source * @param mixed $data */ static function add($source, $description, $status = 0, $data = '') { global $wpdb; if (is_null($data)) { $data = ''; } if (!is_scalar($data)) { $data = wp_json_encode($data, JSON_PRETTY_PRINT); } if (is_wp_error($description)) { $description = $description->get_error_message() . ' (' . $description->get_error_code() . ')'; } $wpdb->insert($wpdb->prefix . 'newsletter_logs', ['source' => $source, 'description' => $description, 'status' => $status, 'data' => $data, 'created' => time()]); } /** * * @param string $source * @param \WP_Error $wp_error */ static function add_wp_error($source, $wp_error) { global $wpdb; $data = $wp_error->get_error_data(); if (!is_scalar($data)) { $data = wp_json_encode($data, JSON_PRETTY_PRINT); } $wpdb->insert($wpdb->prefix . 'newsletter_logs', ['source' => $source, 'description' => $wp_error->get_error_code() . ' - ' . $wp_error->get_error_message(), 'status' => 1, 'data' => $data, 'created' => time()]); } static function get($id) { global $wpdb; $log = $wpdb->get_row($wpdb->prepare("select * from {$wpdb->prefix}newsletter_logs where id=%d limit 1", $id)); return $log; } static function get_all($source) { global $wpdb; $list = $wpdb->get_results($wpdb->prepare("select * from {$wpdb->prefix}newsletter_logs where source=%s order by created desc", $source)); return $list; } static function clean() { global $wpdb; $wpdb->get_results($wpdb->prepare("delete from {$wpdb->prefix}newsletter_logs where created < %d", time() - 30 * DAY_IN_SECONDS)); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Composer
DIR
-
drwxr-xr-x
2026-06-03 14:57:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Subscription
DIR
-
drwxr-xr-x
2026-06-03 14:57:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Addons.php
5.17 KB
lrw-r--r--
2026-06-03 14:57:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Integrations.php
9.46 KB
lrw-r--r--
2026-06-03 14:57:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
License.php
5.42 KB
lrw-r--r--
2026-06-03 14:57:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Logs.php
1.95 KB
lrw-r--r--
2026-06-03 14:57:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
News.php
2.36 KB
lrw-r--r--
2026-06-03 14:57:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Source.php
341 B
lrw-r--r--
2026-06-03 14:57:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).