PluginProbe
Passster – Password Protect Pages and Content / 4.0
Passster – Password Protect Pages and Content v4.0
4.3.15 4.3.14 4.3.12 4.3.13 4.3.11 4.3.10 4.3.9 4.3.8 4.3.7 4.3.6 4.3.5 trunk 3.5.4 3.5.5.2 3.5.5.8 3.5.5.9 4.0 4.1.4 4.2.10 4.2.11 4.2.12 4.2.13 4.2.14 4.2.15 4.2.16 All 47 releases
content-protector / content-protector.php

content-protector.php in Passster – Password Protect Pages and Content 4.0, at content-protector.php

68 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Plugin Name: Passster
5 * Plugin URI: https://patrickposner.dev
6 * Description: A simple plugin to password-protect your complete website, some pages/posts or just parts of your content.
7 * Version: 4.0.1
8 * Author: Patrick Posner
9 * Author URI: https://patrickposner.dev
10 * License: GPL-2.0+
11 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
12 * Text Domain: content-protector
13 * Domain Path: /languages
14 *
15 */
16 define( 'PASSSTER_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
17 define( 'PASSSTER_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
18 define( 'PASSSTER_VERSION', '4.0.1' );
19 // run plugin.
20
21 if ( !function_exists( 'passster_run_plugin' ) ) {
22 add_action( 'plugins_loaded', 'passster_run_plugin' );
23 /**
24 * Run plugin
25 *
26 * @return void
27 * @throws Exception
28 */
29 function passster_run_plugin()
30 {
31 // Include files.
32 require_once PASSSTER_PATH . '/inc/class-ps-conditional.php';
33 require_once PASSSTER_PATH . '/inc/class-ps-helper.php';
34 require_once PASSSTER_PATH . '/inc/class-ps-form.php';
35 require_once PASSSTER_PATH . '/inc/class-ps-ajax.php';
36 require_once PASSSTER_PATH . '/inc/class-ps-public.php';
37 require_once PASSSTER_PATH . '/inc/class-ps-migrator.php';
38 require_once PASSSTER_PATH . '/inc/class-ps-block-editor.php';
39 // admin.
40 require_once PASSSTER_PATH . '/inc/admin/inc/class-ps-admin-settings.php';
41 require_once PASSSTER_PATH . '/inc/admin/inc/class-ps-admin.php';
42 require_once PASSSTER_PATH . '/inc/admin/inc/class-ps-meta.php';
43 require_once PASSSTER_PATH . '/inc/admin/inc/class-ps-dynamic-styles.php';
44 // load Freemius.
45 require_once PASSSTER_PATH . '/inc/freemius-setup.php';
46 // localize.
47 $textdomain_dir = plugin_basename( dirname( __FILE__ ) ) . '/languages';
48 load_plugin_textdomain( 'content-protector', false, $textdomain_dir );
49 if ( !get_option( 'passster_secure_key' ) ) {
50 add_option( 'passster_secure_key', bin2hex( random_bytes( 32 ) ) );
51 }
52 passster\PS_Admin::get_instance();
53 passster\PS_Admin_Settings::get_instance();
54 passster\PS_Meta::get_instance();
55 passster\PS_Dynamic_Styles::get_instance();
56 passster\PS_Form::get_instance();
57 passster\PS_Ajax::get_instance();
58 passster\PS_Public::get_instance();
59 passster\PS_Block_Editor::get_instance();
60 // Maybe migrate settings.
61 $options = get_option( 'passster' );
62 if ( empty($options) ) {
63 passster\PS_Migrator::migrate();
64 }
65 }
66
67 }
68