403Webshell
Server IP : 38.190.208.107  /  Your IP : 216.73.216.219
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 : www ( 1000)
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.3/wp-content/plugins/wpforms-lite/src/Integrations/AI/Admin/Pages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/wp.3/wp-content/plugins/wpforms-lite/src/Integrations/AI/Admin/Pages/Templates.php
<?php

namespace WPForms\Integrations\AI\Admin\Pages;

use WPForms\Integrations\LiteConnect\LiteConnect;

/**
 * Enqueue assets on the Form Templates admin page.
 *
 * @since 1.9.2
 */
class Templates {

	/**
	 * Initialize.
	 *
	 * @since 1.9.2
	 */
	public function init(): void {

		$this->hooks();
	}

	/**
	 * Register hooks.
	 *
	 * @since 1.9.2
	 */
	private function hooks(): void {

		add_action( 'admin_enqueue_scripts', [ $this, 'enqueues' ] );
		add_action( 'wpforms_admin_form_templates_list_before', [ $this, 'output_card' ] );
	}

	/**
	 * Enqueue styles and scripts.
	 *
	 * @since 1.9.2
	 */
	public function enqueues(): void {

		$min = wpforms_get_min_suffix();

		wp_enqueue_style(
			'wpforms-ai-forms-admin',
			WPFORMS_PLUGIN_URL . "assets/css/integrations/ai/form-templates-page$min.css",
			[],
			WPFORMS_VERSION
		);
	}

	/**
	 * Output Generate with AI card.
	 *
	 * @since 1.9.3
	 *
	 * @noinspection HtmlUnknownTarget
	 * @noinspection HtmlUnknownAttribute
	 */
	public function output_card(): void {

		$button_class = 'wpforms-template-generate';
		$button_attr  = '';

		// In Lite, we should disable the button in the case Lite Connect is not allowed.
		if ( ! LiteConnect::is_allowed() && ! wpforms()->is_pro() ) {
			$button_class .= ' wpforms-inactive wpforms-help-tooltip';
			$button_attr   = sprintf(
				'data-tooltip-position="top" title="%1$s"',
				esc_html__( 'WPForms AI is not available on local sites.', 'wpforms-lite' )
			);
		}

		printf(
			'<div class="wpforms-template" id="wpforms-template-generate">
				<div class="wpforms-template-thumbnail">
					<div class="wpforms-template-thumbnail-placeholder">
						<img src="%1$s" alt="%2$s" loading="lazy">
					</div>
				</div>
				<div class="wpforms-template-name-wrap">
					<h3 class="wpforms-template-name categories has-access favorite slug subcategories fields" data-categories="all,new" data-subcategories="" data-fields="" data-has-access="1" data-favorite="" data-slug="generate">
						%2$s
					</h3>
					<span class="wpforms-badge wpforms-badge-sm wpforms-badge-inline wpforms-badge-purple wpforms-badge-rounded">%3$s</span>
				</div>
				<p class="wpforms-template-desc">
					%4$s
				</p>
				<div class="wpforms-template-buttons">
					<a href="#" class="%5$s wpforms-btn wpforms-btn-md wpforms-btn-purple-dark" %6$s>
						%7$s
					</a>
				</div>
			</div>',
			esc_url( WPFORMS_PLUGIN_URL ) . 'assets/images/integrations/ai/ai-feature-icon.svg',
			esc_html__( 'Generate With AI', 'wpforms-lite' ),
			esc_html__( 'NEW!', 'wpforms-lite' ),
			esc_html__( 'Write simple prompts to create complex forms catered to your specific needs.', 'wpforms-lite' ),
			esc_attr( $button_class ),
			$button_attr, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
			esc_html__( 'Generate Form', 'wpforms-lite' )
		);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit