403Webshell
Server IP : 38.190.208.107  /  Your IP : 216.73.217.46
Web Server : nginx/1.28.1
System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64
User : root ( 0)
PHP Version : 8.2.28
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/wp.10/wp-content/plugins/flamingo/admin/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/wp.10/wp-content/plugins/flamingo/admin/includes/privacy.php
<?php
/**
 * Support for personal data eraser tool
 *
 * @link https://developer.wordpress.org/plugins/privacy/adding-the-personal-data-eraser-to-your-plugin/
 */


add_filter( 'wp_privacy_personal_data_erasers',
	'flamingo_privacy_register_personal_data_erasers',
	10, 1
);

/**
 * Registers callback functions.
 */
function flamingo_privacy_register_personal_data_erasers( $erasers ) {
	return array_merge( (array) $erasers, array(
		'flamingo-contact' => array(
			'eraser_friendly_name' => __( 'Flamingo Address Book', 'flamingo' ),
			'callback' => 'flamingo_privacy_contact_eraser',
		),
		'flamingo-inbound' => array(
			'eraser_friendly_name' => __( 'Flamingo Inbound Messages', 'flamingo' ),
			'callback' => 'flamingo_privacy_inbound_eraser',
		),
	) );
}


/**
 * Callback for the contact data.
 */
function flamingo_privacy_contact_eraser( $email_address, $page = 1 ) {
	$number = 100;

	$posts = Flamingo_Contact::find( array(
		'meta_key' => '_email',
		'meta_value' => $email_address,
		'posts_per_page' => $number,
		'paged' => (int) $page,
	) );

	$items_removed = false;
	$items_retained = false;
	$messages = array();

	foreach ( (array) $posts as $post ) {
		if ( ! current_user_can( 'flamingo_delete_contact', $post->id() ) ) {
			$items_retained = true;

			$messages = array(
				__( 'Flamingo Address Book: You are not allowed to delete contact data.', 'flamingo' ),
			);

			continue;
		}

		if ( $post->delete() ) {
			$items_removed = true;
		} else {
			$items_retained = true;
		}
	}

	$done = Flamingo_Contact::count() < $number;

	return array(
		'items_removed' => $items_removed,
		'items_retained' => $items_retained,
		'messages' => array_map( 'esc_html', (array) $messages ),
		'done' => $done,
	);
}


/**
 * Callback for the inbound messages data.
 */
function flamingo_privacy_inbound_eraser( $email_address, $page = 1 ) {
	$number = 100;

	$posts = Flamingo_Inbound_Message::find( array(
		'meta_key' => '_from_email',
		'meta_value' => $email_address,
		'posts_per_page' => $number,
		'paged' => (int) $page,
	) );

	$items_removed = false;
	$items_retained = false;
	$messages = array();

	foreach ( (array) $posts as $post ) {
		if ( ! current_user_can( 'flamingo_delete_inbound_message', $post->id() ) ) {
			$items_retained = true;

			$messages = array(
				__( 'Flamingo Inbound Messages: You are not allowed to delete inbound messages.', 'flamingo' ),
			);

			continue;
		}

		if ( $post->delete() ) {
			$items_removed = true;
		} else {
			$items_retained = true;
		}
	}

	$done = Flamingo_Inbound_Message::count() < $number;

	return array(
		'items_removed' => $items_removed,
		'items_retained' => $items_retained,
		'messages' => array_map( 'esc_html', (array) $messages ),
		'done' => $done,
	);
}

Youez - 2016 - github.com/yon3zu
LinuXploit