| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: Front End PM |
| 4 |
Plugin URI: https://www.shamimsplugins.com/contact-us/ |
| 5 |
Description: Front End PM is a Private Messaging system and a secure contact form to your WordPress site.This is full functioning messaging system fromfront end. The messaging is done entirely through the front-end of your site rather than the Dashboard. This is very helpful if you want to keep your users out of the Dashboard area. |
| 6 |
Version: 11.4.6 |
| 7 |
Author: Shamim Hasan |
| 8 |
Author URI: https://www.shamimsplugins.com/contact-us/ |
| 9 |
License: GPLv2 or later |
| 10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 11 |
Text Domain: front-end-pm |
| 12 |
Domain Path: /languages |
| 13 |
*/ |
| 14 |
|
| 15 |
if ( ! defined( 'ABSPATH' ) ) { |
| 16 |
exit; // Exit if accessed directly. |
| 17 |
} |
| 18 |
|
| 19 |
class Front_End_Pm { |
| 20 |
private static $instance; |
| 21 |
|
| 22 |
private function __construct() { |
| 23 |
$this->constants(); |
| 24 |
$this->includes(); |
| 25 |
$this->hooks(); |
| 26 |
} |
| 27 |
|
| 28 |
public static function init() { |
| 29 |
if ( ! self::$instance instanceof self ) { |
| 30 |
self::$instance = new self; |
| 31 |
} |
| 32 |
return self::$instance; |
| 33 |
} |
| 34 |
|
| 35 |
function constants() { |
| 36 |
global $wpdb; |
| 37 |
define( 'FEP_PLUGIN_VERSION', '11.4.5' ); |
| 38 |
define( 'FEP_DB_VERSION', '1121' ); |
| 39 |
define( 'FEP_PLUGIN_FILE', __FILE__ ); |
| 40 |
define( 'FEP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); |
| 41 |
define( 'FEP_PLUGIN_URL', plugins_url( '/', __FILE__ ) ); |
| 42 |
|
| 43 |
if ( ! defined ('FEP_MESSAGE_TABLE' ) ) { |
| 44 |
define( 'FEP_MESSAGE_TABLE', $wpdb->base_prefix . 'fep_messages' ); |
| 45 |
} |
| 46 |
if ( ! defined ('FEP_META_TABLE' ) ) { |
| 47 |
define( 'FEP_META_TABLE', $wpdb->base_prefix . 'fep_messagemeta' ); |
| 48 |
} |
| 49 |
if ( ! defined ('FEP_PARTICIPANT_TABLE' ) ) { |
| 50 |
define( 'FEP_PARTICIPANT_TABLE', $wpdb->base_prefix . 'fep_participants' ); |
| 51 |
} |
| 52 |
if ( ! defined ('FEP_ATTACHMENT_TABLE' ) ) { |
| 53 |
define( 'FEP_ATTACHMENT_TABLE', $wpdb->base_prefix . 'fep_attachments' ); |
| 54 |
} |
| 55 |
} |
| 56 |
|
| 57 |
function includes() { |
| 58 |
require_once( FEP_PLUGIN_DIR . 'functions.php' ); |
| 59 |
require_once( FEP_PLUGIN_DIR . 'default-hooks.php' ); |
| 60 |
} |
| 61 |
|
| 62 |
function hooks() { |
| 63 |
//cleanup after uninstall |
| 64 |
fep_fs()->add_action('after_uninstall', 'fep_fs_uninstall_cleanup'); |
| 65 |
//Support fourm link in admin dashboard sidebar |
| 66 |
fep_fs()->add_filter( 'support_forum_url', 'fep_fs_support_forum_url' ); |
| 67 |
} |
| 68 |
|
| 69 |
} //END Class |
| 70 |
//Front_End_Pm::init(); |
| 71 |
|
| 72 |
if ( function_exists( 'fep_fs' ) ) { |
| 73 |
fep_fs()->set_basename( false, __FILE__ ); |
| 74 |
} else { |
| 75 |
// DO NOT REMOVE THIS IF, IT IS ESSENTIAL FOR THE `function_exists` CALL ABOVE TO PROPERLY WORK. |
| 76 |
if ( ! function_exists( 'fep_fs' ) ) { |
| 77 |
// Create a helper function for easy SDK access. |
| 78 |
function fep_fs() { |
| 79 |
global $fep_fs; |
| 80 |
|
| 81 |
if ( ! isset( $fep_fs ) ) { |
| 82 |
// Include Freemius SDK. |
| 83 |
require_once dirname(__FILE__) . '/freemius/start.php'; |
| 84 |
|
| 85 |
$fep_fs = fs_dynamic_init( array( |
| 86 |
'id' => '5809', |
| 87 |
'slug' => 'front-end-pm', |
| 88 |
'premium_slug' => 'front-end-pm-pro', |
| 89 |
'type' => 'plugin', |
| 90 |
'public_key' => 'pk_c7329ca7019f17b830c22b8f3a729', |
| 91 |
'is_premium' => false, |
| 92 |
'premium_suffix' => 'PRO', |
| 93 |
// If your plugin is a serviceware, set this option to false. |
| 94 |
'has_premium_version' => true, |
| 95 |
'has_addons' => false, |
| 96 |
'has_paid_plans' => true, |
| 97 |
'anonymous_mode' => true, |
| 98 |
'is_live' => true, |
| 99 |
'menu' => array( |
| 100 |
'slug' => 'fep-all-messages', |
| 101 |
'contact' => false, |
| 102 |
), |
| 103 |
) ); |
| 104 |
} |
| 105 |
|
| 106 |
return $fep_fs; |
| 107 |
} |
| 108 |
|
| 109 |
// Init Freemius. |
| 110 |
fep_fs(); |
| 111 |
// Signal that SDK was initiated. |
| 112 |
do_action( 'fep_fs_loaded' ); |
| 113 |
} |
| 114 |
|
| 115 |
// ... Your plugin's main file logic ... |
| 116 |
Front_End_Pm::init(); |
| 117 |
} |
| 118 |
|