Uname: Linux premium294.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.1.32 [ PHP INFO ] PHP os: Linux
Server Ip: 104.21.16.1
Your Ip: 216.73.216.223
User: mjbynoyq (1574) | Group: mjbynoyq (1570)
Safe Mode: OFF
Disable Function:
NONE

name : hooks.php
<?php if (!defined('FW')) die('Forbidden');

/**
 * @param bool $exclude
 * @param string $option_name
 * @param bool $is_full_backup
 *
 * @return bool
 */
function _filter_fw_ext_backups_db_export_exclude_option($exclude, $option_name, $is_full_backup) {
	foreach (array(
		'_site_transient_',
		'_transient_'
	) as $option_prefix) {
		if (substr($option_name, 0, strlen($option_prefix)) === $option_prefix) {
			return true;
		}
	}

	return $exclude;
}
add_filter('fw_ext_backups_db_export_exclude_option', '_filter_fw_ext_backups_db_export_exclude_option', 10, 3);

/**
 * Other extensions options
 */
{
	function _filter_fw_ext_backups_db_export_exclude_other_extensions_options($exclude, $option_name, $is_full_backup) {
		if (!$is_full_backup) {
			if ($option_name === 'fw_ext_settings_options:mailer') {
				return true;
			}
		}

		return $exclude;
	}
	add_filter('fw_ext_backups_db_export_exclude_option',
		'_filter_fw_ext_backups_db_export_exclude_other_extensions_options', 10, 3
	);

	function _filter_fw_ext_backups_db_restore_keep_other_extensions_options($options, $is_full) {
		if (!$is_full) {
			$options[ 'fw_ext_settings_options:mailer' ] = true;
		}

		return $options;
	}
	add_filter('fw_ext_backups_db_restore_keep_options',
		'_filter_fw_ext_backups_db_restore_keep_other_extensions_options', 10, 2
	);
}
© 2025 XylotrechusZ