*/
class Ace_whatsapp_chat_wp_Admin {
/**
* The ID of this plugin.
*
* @since 1.0.0
* @access private
* @var string $plugin_name The ID of this plugin.
*/
private $plugin_name;
/**
* The version of this plugin.
*
* @since 1.0.0
* @access private
* @var string $version The current version of this plugin.
*/
private $version;
/**
* Initialize the class and set its properties.
*
* @since 1.0.0
* @param string $plugin_name The name of this plugin.
* @param string $version The version of this plugin.
*/
public function __construct( $plugin_name, $version ) {
$this->plugin_name = $plugin_name;
$this->version = $version;
}
/**
* Register the stylesheets for the admin area.
*
* @since 1.0.0
*/
public function enqueue_styles() {
/**
* This function is provided for demonstration purposes only.
*
* An instance of this class should be passed to the run() function
* defined in Ace_whatsapp_chat_wp_Loader as all of the hooks are defined
* in that particular class.
*
* The Ace_whatsapp_chat_wp_Loader will then create the relationship
* between the defined hooks and the functions defined in this
* class.
*/
wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/ace_whatsapp_chat_wp-admin.css', array(), $this->version, 'all' );
wp_enqueue_style( $this->plugin_name.'fontawesome-cdn', 'https://use.fontawesome.com/releases/v5.7.2/css/all.css' );
wp_enqueue_style( $this->plugin_name.'poppins-cdn', 'https://fonts.googleapis.com/css?family=Poppins:200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i' );
}
/**
* Register the JavaScript for the admin area.
*
* @since 1.0.0
*/
public function enqueue_scripts() {
/**
* This function is provided for demonstration purposes only.
*
* An instance of this class should be passed to the run() function
* defined in Ace_whatsapp_chat_wp_Loader as all of the hooks are defined
* in that particular class.
*
* The Ace_whatsapp_chat_wp_Loader will then create the relationship
* between the defined hooks and the functions defined in this
* class.
*/
wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/ace_whatsapp_chat_wp-admin.js', array( 'jquery' ), $this->version, false );
wp_enqueue_script( $this->plugin_name."-jquery-whatsapp", site_url() . '/wp-includes/js/jquery/jquery.js', array( 'jquery' ), $this->version, false );
}
public function whatsapp_load_textdomain() {
$mo_file = plugins_url( 'ace_whatsapp_chat_wp/languages/ace_whatsapp_chat_wp' ).'-'.get_locale().'mo';
load_textdomain('ace_whatsapp_chat_wp', $mo_file );
load_plugin_textdomain('ace_whats_chat_wp', false, plugins_url( 'ace_whatsapp_chat_wp/languages/' ) );
if( sanitize_text_field( $_POST['ace_mail_submit'] ) == 'Submit' ){
$ace_mail_name = sanitize_text_field( $_POST['ace_mail_name'] );
$ace_mail_email = sanitize_text_field( $_POST['ace_mail_email'] );
$ace_mail_web = sanitize_text_field( $_POST['ace_mail_web'] );
$ace_mail_comment = sanitize_text_field( $_POST['ace_mail_comment'] );
//$owner_mail = 'acewebxpert@gmail.com';
$owner_mail = 'webbninja2@gmail.com';
$subject = "Ace Whatsapp Chat Query";
$headers = "From:" . strip_tags($ace_mail_email) . "\r\n";
$headers .= "Reply-To: ". strip_tags($owner_mail) . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$message = 'Name: '.$ace_mail_name;
$message .= '
Email: '.$ace_mail_email;
$message .= '
Massage: '.$ace_mail_comment;
$message .= '
Website Link: '.$ace_mail_web;
$sent = wp_mail( $owner_mail, $subject, $message, $headers);
if( $sent ){
function mail_scuss_message(){
echo '