PluginProbe
GDPRess | Eliminate external requests to increase GDPR compliance / trunk
GDPRess | Eliminate external requests to increase GDPR compliance vtrunk
trunk 1.0.2 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1
gdpr-press / src / Setup.php

Setup.php in GDPRess | Eliminate external requests to increase GDPR compliance trunk, at src/Setup.php

41 lines 645 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package GDPRess
4 * @author Daan van den Bergh
5 * https://daan.dev
6 */
7
8 namespace GDPRess;
9
10 class Setup {
11
12 /**
13 * Set Fields
14 *
15 * @return void
16 */
17 public function __construct() {
18 $this->init_hooks();
19 }
20
21 /**
22 * Actions and Filters
23 *
24 * @return void
25 */
26 private function init_hooks() {
27 register_activation_hook( GDPRESS_PLUGIN_FILE, [ $this, 'create_cache_dir' ] );
28 }
29
30 /**
31 * Create cache directory structure, if it doesn't exist yet.
32 *
33 * @return void
34 */
35 public function create_cache_dir() {
36 if ( ! is_dir( GDPRESS_CACHE_ABSPATH ) ) {
37 wp_mkdir_p( GDPRESS_CACHE_ABSPATH );
38 }
39 }
40 }
41