| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Content Censor |
| 4 |
* Plugin URI: https://wpgoplugins.com/plugins/content-censor/ |
| 5 |
* Description: Filter configured words from WordPress content, titles, comments, tags, and supported community plugins. |
| 6 |
* Version: 3.2.1 |
| 7 |
* Requires at least: 6.0 |
| 8 |
* Requires PHP: 7.4 |
| 9 |
* Author: David Gwyer |
| 10 |
* Author URI: https://wpgoplugins.com/ |
| 11 |
* License: GPL-2.0-or-later |
| 12 |
* Text Domain: wp-content-filter |
| 13 |
* |
| 14 |
* |
| 15 |
* @package WPGO_Content_Censor |
| 16 |
*/ |
| 17 |
|
| 18 |
if ( ! defined( 'ABSPATH' ) ) { |
| 19 |
exit; |
| 20 |
} |
| 21 |
|
| 22 |
if ( function_exists( 'content_censor_fs' ) ) { |
| 23 |
content_censor_fs()->set_basename( true, __FILE__ ); |
| 24 |
} else { |
| 25 |
/** |
| 26 |
* Return the Content Censor Freemius SDK instance. |
| 27 |
* |
| 28 |
* @return Freemius |
| 29 |
*/ |
| 30 |
function content_censor_fs() { |
| 31 |
global $content_censor_fs; |
| 32 |
|
| 33 |
if ( ! isset( $content_censor_fs ) ) { |
| 34 |
require_once __DIR__ . '/vendor/freemius/wordpress-sdk/start.php'; |
| 35 |
|
| 36 |
$content_censor_fs = fs_dynamic_init( |
| 37 |
array( |
| 38 |
'id' => '6755', |
| 39 |
'slug' => 'wp-content-filter', |
| 40 |
'premium_slug' => 'content-censor-pro', |
| 41 |
'type' => 'plugin', |
| 42 |
'public_key' => 'pk_f231afb642d228e0bbba760ca82fb', |
| 43 |
'is_premium' => false, |
| 44 |
'premium_suffix' => 'Pro', |
| 45 |
'has_premium_version' => true, |
| 46 |
'has_addons' => false, |
| 47 |
'has_paid_plans' => true, |
| 48 |
'is_org_compliant' => true, |
| 49 |
'menu' => array( |
| 50 |
'slug' => 'content-censor-wpgoplugins', |
| 51 |
'first-path' => 'options-general.php?page=content-censor-wpgoplugins', |
| 52 |
'support' => false, |
| 53 |
'parent' => array( |
| 54 |
'slug' => 'options-general.php', |
| 55 |
), |
| 56 |
), |
| 57 |
) |
| 58 |
); |
| 59 |
} |
| 60 |
|
| 61 |
return $content_censor_fs; |
| 62 |
} |
| 63 |
|
| 64 |
/** |
| 65 |
* Backward-compatible alias used by the 1.0.0 Freemius migration build. |
| 66 |
* |
| 67 |
* @return Freemius |
| 68 |
*/ |
| 69 |
function wpcf_fs() { |
| 70 |
return content_censor_fs(); |
| 71 |
} |
| 72 |
|
| 73 |
content_censor_fs(); |
| 74 |
do_action( 'content_censor_fs_loaded' ); |
| 75 |
|
| 76 |
define( 'WPGO_CONTENT_CENSOR_VERSION', '3.2.1' ); |
| 77 |
define( 'WPGO_CONTENT_CENSOR_FILE', __FILE__ ); |
| 78 |
define( 'WPGO_CONTENT_CENSOR_DIR', __DIR__ . '/' ); |
| 79 |
define( 'WPGO_CONTENT_CENSOR_OPTIONS', 'content_censor_plugin_options' ); |
| 80 |
|
| 81 |
require_once WPGO_CONTENT_CENSOR_DIR . 'includes/class-filter-engine.php'; |
| 82 |
require_once WPGO_CONTENT_CENSOR_DIR . 'includes/class-migrator.php'; |
| 83 |
require_once WPGO_CONTENT_CENSOR_DIR . 'includes/class-settings.php'; |
| 84 |
require_once WPGO_CONTENT_CENSOR_DIR . 'includes/class-plugin.php'; |
| 85 |
|
| 86 |
$premium_available = content_censor_fs()->can_use_premium_code__premium_only(); |
| 87 |
|
| 88 |
if ( $premium_available ) { |
| 89 |
require_once WPGO_CONTENT_CENSOR_DIR . 'premium/class-scanner.php'; |
| 90 |
require_once WPGO_CONTENT_CENSOR_DIR . 'premium/class-premium.php'; |
| 91 |
} |
| 92 |
|
| 93 |
register_activation_hook( |
| 94 |
__FILE__, |
| 95 |
array( 'WPGO\\Content_Censor\\Migrator', 'activate' ) |
| 96 |
); |
| 97 |
|
| 98 |
WPGO\Content_Censor\Plugin::boot( $premium_available ); |
| 99 |
} |
| 100 |
|