PHP 8.2.31
Preview: HelpCache.php Size: 1.16 KB
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/wpforms-lite/src/Admin/Builder/HelpCache.php

<?php

namespace WPForms\Admin\Builder;

use WPForms\Helpers\CacheBase;

/**
 * Form Builder Help Cache.
 *
 * @since 1.8.2
 */
class HelpCache extends CacheBase {

	/**
	 * Remote source URL.
	 *
	 * @since 1.9.3
	 *
	 * @var string
	 */
	const REMOTE_SOURCE = 'https://wpformsapi.com/feeds/v1/docs/';

	/**
	 * Determine if the class is allowed to load.
	 *
	 * @since 1.8.2
	 *
	 * @return bool
	 */
	protected function allow_load() {

		if ( wp_doing_cron() || wpforms_doing_wp_cli() ) {
			return true;
		}

		if ( ! wpforms_current_user_can( [ 'create_forms', 'edit_forms' ] ) ) {
			return false;
		}

		return wpforms_is_admin_page( 'builder' );
	}

	/**
	 * Setup settings and other things.
	 *
	 * @since 1.8.2
	 */
	protected function setup() {

		return [
			'remote_source' => self::REMOTE_SOURCE,
			'cache_file'    => 'docs.json',
			/**
			 * Allow modifying Help Docs cache TTL (time to live).
			 *
			 * @since 1.6.3
			 *
			 * @param int $cache_ttl Cache TTL in seconds. Defaults to 1 week.
			 */
			'cache_ttl'     => (int) apply_filters( 'wpforms_admin_builder_help_cache_ttl', WEEK_IN_SECONDS ),
			'update_action' => 'wpforms_builder_help_cache_update',
		];
	}
}

Directory Contents

Dirs: 3 × Files: 12

Name Size Perms Modified Actions
Ajax DIR
- drwxr-xr-x 2026-06-04 03:43:03
Edit Download
- drwxr-xr-x 2026-06-04 03:43:03
Edit Download
Settings DIR
- drwxr-xr-x 2026-06-04 03:43:03
Edit Download
10.16 KB lrw-r--r-- 2026-01-29 20:00:56
Edit Download
13.55 KB lrw-r--r-- 2026-05-28 15:16:52
Edit Download
953 B lrw-r--r-- 2024-04-23 14:43:10
Edit Download
53.47 KB lrw-r--r-- 2026-05-14 22:10:26
Edit Download
1.16 KB lrw-r--r-- 2025-01-16 17:57:18
Edit Download
789 B lrw-r--r-- 2025-08-11 13:38:06
Edit Download
5.37 KB lrw-r--r-- 2026-05-28 15:16:52
Edit Download
9.11 KB lrw-r--r-- 2026-05-28 15:16:52
Edit Download
3.23 KB lrw-r--r-- 2026-01-29 20:00:56
Edit Download
35.32 KB lrw-r--r-- 2025-09-25 15:01:02
Edit Download
5.66 KB lrw-r--r-- 2024-02-29 17:17:50
Edit Download
5.38 KB lrw-r--r-- 2024-09-26 15:36:36
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).