GRAYBYTE WORDPRESS FILE MANAGER6811

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/chahida.co.in/wp-content/plugins/envato-elements/inc/api/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/chahida.co.in/wp-content/plugins/envato-elements/inc/api//class-banners.php
<?php
/**
 * Envato Elements: Banners API
 *
 * Banners API
 *
 * @package Envato/Envato_Elements
 * @since 2.0.0
 */

namespace Envato_Elements\API;

use Envato_Elements\Backend\Options;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}


/**
 * Search API
 *
 * @since 2.0.0
 */
class Banners extends API {

	/**
	 * @param $request \WP_REST_Request
	 *
	 * @return \WP_REST_Response
	 */
	public function dismiss_banner( $request ) {

		$banner_id = $request->get_param( 'bannerId' );

		// Get a list of dismissed banners (defaulting to an empty array)
		$dismissed_banners = Options::get_instance()->get( 'dismissed_banners', [] );

		// Add the users dismissed banner to the options array
		$dismissed_banners[ $banner_id ] = true;

		// Save this new options array back to the DB:
		Options::get_instance()->set( 'dismissed_banners', $dismissed_banners );

		// Return some success to react:
		return $this->format_success( [
			'closed' => true,
		] );
	}

	public function register_api_endpoints() {
		$this->register_endpoint( 'dismissBanner', [ $this, 'dismiss_banner' ] );
	}
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:29
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:29
giriqfky / giriqfky
0644
class-api.php
1.495 KB
March 07 2025 11:33:34
giriqfky / giriqfky
0644
class-banners.php
1.086 KB
March 07 2025 11:33:34
giriqfky / giriqfky
0644
class-photos-import.php
5.984 KB
March 07 2025 11:33:34
giriqfky / giriqfky
0644
class-photos-search.php
1.803 KB
March 07 2025 11:33:34
giriqfky / giriqfky
0644
class-project-name.php
1.092 KB
March 07 2025 11:33:34
giriqfky / giriqfky
0644
class-requirements.php
9.783 KB
March 07 2025 11:33:34
giriqfky / giriqfky
0644
class-settings.php
12.623 KB
March 07 2025 11:33:34
giriqfky / giriqfky
0644
class-subscription-api.php
2.05 KB
March 07 2025 11:33:34
giriqfky / giriqfky
0644
class-template-kit-import.php
16.31 KB
March 07 2025 11:33:34
giriqfky / giriqfky
0644
class-template-kit-install.php
8.651 KB
March 07 2025 11:33:34
giriqfky / giriqfky
0644
class-template-kit-search.php
4.726 KB
March 07 2025 11:33:34
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF