| @@ -1,24 +1,27 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * Plugin Name: Passster |
| 5 | - * Plugin URI: https://patrickposner.dev | |
| 5 | + * Plugin URI: https://passster.com/ | |
| 6 | 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 | |
| 7 | + * Version: 4.3.15 | |
| 8 | + * Author: WPChill | |
| 9 | + * Author URI: https://wpchill.com | |
| 10 | 10 | * License: GPL-2.0+ |
| 11 | 11 | * License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 12 | 12 | * Text Domain: content-protector |
| 13 | 13 | * Domain Path: /languages |
| 14 | 14 | * |
| 15 | + * | |
| 16 | + * | |
| 17 | + * NOTE: | |
| 18 | + * Patrick Posner transferred ownership rights on: 6th of December, 2024 when ownership was handed over to WPChill | |
| 15 | 19 | */ |
| 16 | 20 | define( 'PASSSTER_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) ); |
| 17 | 21 | define( 'PASSSTER_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) ); |
| 18 | -define( 'PASSSTER_VERSION', '4.0.1' ); | |
| 22 | +define( 'PASSSTER_VERSION', '4.3.15' ); | |
| 19 | 23 | // run plugin. |
| 20 | - | |
| 21 | 24 | if ( !function_exists( 'passster_run_plugin' ) ) { |
| 22 | 25 | add_action( 'plugins_loaded', 'passster_run_plugin' ); |
| 23 | 26 | /** |
| 24 | 27 | * Run plugin |
| @@ -25,20 +28,24 @@ | ||
| 25 | 28 | * |
| 26 | 29 | * @return void |
| 27 | 30 | * @throws Exception |
| 28 | 31 | */ |
| 29 | - function passster_run_plugin() | |
| 30 | - { | |
| 32 | + function passster_run_plugin() { | |
| 31 | 33 | // Include files. |
| 32 | 34 | require_once PASSSTER_PATH . '/inc/class-ps-conditional.php'; |
| 33 | 35 | require_once PASSSTER_PATH . '/inc/class-ps-helper.php'; |
| 34 | 36 | require_once PASSSTER_PATH . '/inc/class-ps-form.php'; |
| 35 | - require_once PASSSTER_PATH . '/inc/class-ps-ajax.php'; | |
| 36 | 37 | require_once PASSSTER_PATH . '/inc/class-ps-public.php'; |
| 37 | 38 | require_once PASSSTER_PATH . '/inc/class-ps-migrator.php'; |
| 38 | 39 | require_once PASSSTER_PATH . '/inc/class-ps-block-editor.php'; |
| 40 | + require_once PASSSTER_PATH . '/inc/class-ps-rest-handler.php'; | |
| 41 | + require_once PASSSTER_PATH . '/inc/class-ps-protected-areas-rest-controller.php'; | |
| 42 | + require_once PASSSTER_PATH . '/inc/class-ps-rest-api.php'; | |
| 43 | + require_once PASSSTER_PATH . '/inc/class-ps-protected-posts.php'; | |
| 44 | + require_once PASSSTER_PATH . '/inc/class-ps-category-lock.php'; | |
| 39 | 45 | // admin. |
| 40 | 46 | require_once PASSSTER_PATH . '/inc/admin/inc/class-ps-admin-settings.php'; |
| 47 | + require_once PASSSTER_PATH . '/inc/admin/inc/class-ps-upsells.php'; | |
| 41 | 48 | require_once PASSSTER_PATH . '/inc/admin/inc/class-ps-admin.php'; |
| 42 | 49 | require_once PASSSTER_PATH . '/inc/admin/inc/class-ps-meta.php'; |
| 43 | 50 | require_once PASSSTER_PATH . '/inc/admin/inc/class-ps-dynamic-styles.php'; |
| 44 | 51 | // load Freemius. |
| @@ -43,9 +50,9 @@ | ||
| 43 | 50 | require_once PASSSTER_PATH . '/inc/admin/inc/class-ps-dynamic-styles.php'; |
| 44 | 51 | // load Freemius. |
| 45 | 52 | require_once PASSSTER_PATH . '/inc/freemius-setup.php'; |
| 46 | 53 | // localize. |
| 47 | - $textdomain_dir = plugin_basename( dirname( __FILE__ ) ) . '/languages'; | |
| 54 | + $textdomain_dir = plugin_basename( __DIR__ ) . '/languages'; | |
| 48 | 55 | load_plugin_textdomain( 'content-protector', false, $textdomain_dir ); |
| 49 | 56 | if ( !get_option( 'passster_secure_key' ) ) { |
| 50 | 57 | add_option( 'passster_secure_key', bin2hex( random_bytes( 32 ) ) ); |
| 51 | 58 | } |
| @@ -53,15 +60,19 @@ | ||
| 53 | 60 | passster\PS_Admin_Settings::get_instance(); |
| 54 | 61 | passster\PS_Meta::get_instance(); |
| 55 | 62 | passster\PS_Dynamic_Styles::get_instance(); |
| 56 | 63 | passster\PS_Form::get_instance(); |
| 57 | - passster\PS_Ajax::get_instance(); | |
| 58 | 64 | passster\PS_Public::get_instance(); |
| 59 | 65 | passster\PS_Block_Editor::get_instance(); |
| 66 | + passster\PS_Rest_Handler::get_instance(); | |
| 67 | + passster\PS_Rest_API::get_instance(); | |
| 68 | + passster\PS_Upsells::get_instance(); | |
| 60 | 69 | // Maybe migrate settings. |
| 61 | 70 | $options = get_option( 'passster' ); |
| 62 | - if ( empty($options) ) { | |
| 71 | + if ( empty( $options ) ) { | |
| 63 | 72 | passster\PS_Migrator::migrate(); |
| 64 | 73 | } |
| 74 | + passster\PS_Protected_Posts::get_instance(); | |
| 75 | + passster\PS_Category_Lock::get_instance(); | |
| 65 | 76 | } |
| 66 | 77 | |
| 67 | -} | |
| 78 | +} | |