HEX
Server: nginx/1.24.0
System: Linux iZm5eic9piryinoecjybjoZ 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
User: www (1000)
PHP: 8.2.28
Disabled: 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
Upload Files
File: /www/wwwroot/h3.iyingtaos.cn/wp-content/plugins/bulk-delete/include/Core/Addon/UpsellModule.php
<?php

namespace BulkWP\BulkDelete\Core\Addon;

use BulkWP\BulkDelete\Core\Base\BaseModule;

defined( 'ABSPATH' ) || exit; // Exit if accessed directly.

/**
 * A Module that upsells an add-on.
 *
 * Upseller Module is displayed for add-ons with a description and a link to buy them.
 * If an add-on is installed, then the Upseller Module is automatically deactivated.
 *
 * Methods that are not needed are left empty.
 *
 * @since 6.0.0
 */
class UpsellModule extends BaseModule {
	/**
	 * Details about the add-on.
	 *
	 * @var \BulkWP\BulkDelete\Core\Addon\AddonUpsellInfo
	 */
	protected $addon_upsell_info;

	/**
	 * Create the UpsellModule using add-on info.
	 *
	 * @param \BulkWP\BulkDelete\Core\Addon\AddonUpsellInfo $addon_upsell_info Addon Upsell Info.
	 */
	public function __construct( $addon_upsell_info ) {
		$this->addon_upsell_info = $addon_upsell_info;

		$this->meta_box_slug = $this->addon_upsell_info->get_slug();
		$this->messages      = array(
			'box_label' => $addon_upsell_info->get_upsell_title(),
		);
	}

	/**
	 * Upsell modules will use the name of the Add-on as their name.
	 *
	 * @return string Upsell Module name.
	 */
	public function get_name() {
		return str_replace( ' ', '', $this->addon_upsell_info->get_name() );
	}

	public function render() {
		?>

		<p>
			<?php echo $this->addon_upsell_info->get_upsell_message(); ?>
			<a href="<?php echo esc_url( $this->addon_upsell_info->get_buy_url() ); ?>" target="_blank"><?php _e( 'Buy Now', 'bulk-delete' ); ?></a>
		</p>

		<?php
	}

	protected function initialize() {
		// Empty by design.
	}

	protected function parse_common_filters( $request ) {
		// Empty by design.
	}

	protected function convert_user_input_to_options( $request, $options ) {
		// Empty by design.
	}

	protected function get_success_message( $items_deleted ) {
		// Empty by design.
	}

	protected function do_delete( $options ) {
		// Empty by design.
	}
}