| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Passster |
| 4 |
* Plugin URI: https://patrickposner.dev |
| 5 |
* Description: A simple plugin to password-protect your complete website, some pages/posts or just parts of your content. |
| 6 |
* Version: 3.5.4 |
| 7 |
* Author: Patrick Posner |
| 8 |
* Author URI: https://patrickposner.dev |
| 9 |
* License: GPL-2.0+ |
| 10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 11 |
* Text Domain: content-protector |
| 12 |
* Domain Path: /languages |
| 13 |
* |
| 14 |
*/ |
| 15 |
|
| 16 |
define( 'PASSSTER_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) ); |
| 17 |
define( 'PASSSTER_ABSPATH', dirname( __FILE__ ) . DIRECTORY_SEPARATOR ); |
| 18 |
define( 'PASSSTER_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) ); |
| 19 |
|
| 20 |
// load setup. |
| 21 |
require_once( PASSSTER_ABSPATH . 'inc' . DIRECTORY_SEPARATOR . 'setup.php' ); |
| 22 |
|
| 23 |
// localize. |
| 24 |
$textdomain_dir = plugin_basename( dirname( __FILE__ ) ) . '/languages'; |
| 25 |
load_plugin_textdomain( 'content-protector', false, $textdomain_dir ); |
| 26 |
|
| 27 |
// run plugin. |
| 28 |
if ( ! function_exists( 'passster_run_plugin' ) ) { |
| 29 |
|
| 30 |
// boot autoloader. |
| 31 |
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) && ! class_exists( 'passster\PS_Admin' ) ) { |
| 32 |
require __DIR__ . '/vendor/autoload.php'; |
| 33 |
} |
| 34 |
|
| 35 |
add_action( 'plugins_loaded', 'passster_run_plugin' ); |
| 36 |
|
| 37 |
/** |
| 38 |
* Run plugin |
| 39 |
* |
| 40 |
* @return void |
| 41 |
*/ |
| 42 |
function passster_run_plugin() { |
| 43 |
passster\PS_Admin::get_instance(); |
| 44 |
passster\PS_Customizer::get_instance(); |
| 45 |
passster\PS_Meta::get_instance(); |
| 46 |
passster\PS_Form::get_instance(); |
| 47 |
passster\PS_Public::get_instance(); |
| 48 |
} |
| 49 |
} |
| 50 |
|