| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Contact Form Query |
| 4 |
* Plugin URI: https://scriptstown.com/wordpress-plugins/contact-form-query/ |
| 5 |
* Description: Add a contact form and receive new message notifications directly to your WordPress admin and to your email. Search and filter messages. |
| 6 |
* Version: 1.9.4 |
| 7 |
* Author: ScriptsTown |
| 8 |
* Author URI: https://scriptstown.com/ |
| 9 |
* License: GPL v2 or later |
| 10 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 11 |
* Text Domain: contact-form-query |
| 12 |
* Requires at least: 5.0 |
| 13 |
* Requires PHP: 7.0 |
| 14 |
*/ |
| 15 |
|
| 16 |
defined( 'ABSPATH' ) || die(); |
| 17 |
|
| 18 |
define( 'STCFQ_PLUGIN_VERSION', '1.9.4' ); |
| 19 |
define( 'STCFQ_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); |
| 20 |
define( 'STCFQ_PLUGIN_DIR_PATH', plugin_dir_path( __FILE__ ) ); |
| 21 |
define( 'STCFQ_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); |
| 22 |
|
| 23 |
final class STCFQ_Contact_Form_Query { |
| 24 |
private static $instance = null; |
| 25 |
|
| 26 |
private function __construct() { |
| 27 |
$this->initialize_hooks(); |
| 28 |
$this->setup_database(); |
| 29 |
} |
| 30 |
|
| 31 |
public static function get_instance() { |
| 32 |
if ( is_null( self::$instance ) ) { |
| 33 |
self::$instance = new self(); |
| 34 |
} |
| 35 |
return self::$instance; |
| 36 |
} |
| 37 |
|
| 38 |
private function initialize_hooks() { |
| 39 |
if ( is_admin() ) { |
| 40 |
require_once STCFQ_PLUGIN_DIR_PATH . 'admin/admin.php'; |
| 41 |
} |
| 42 |
require_once STCFQ_PLUGIN_DIR_PATH . 'public/public.php'; |
| 43 |
} |
| 44 |
|
| 45 |
private function setup_database() { |
| 46 |
require_once STCFQ_PLUGIN_DIR_PATH . 'admin/inc/class-stcfq-database.php'; |
| 47 |
register_activation_hook( __FILE__, array( 'STCFQ_Database', 'activation' ) ); |
| 48 |
register_deactivation_hook( __FILE__, array( 'STCFQ_Database', 'deactivation' ) ); |
| 49 |
} |
| 50 |
} |
| 51 |
STCFQ_Contact_Form_Query::get_instance(); |
| 52 |
|