Current File : /home/pacjaorg/wpt.pacja.org/wp-content/plugins/advance-search/inc/frontend/class-frontend.php |
<?php
namespace Advance_Search\Inc\Frontend;
/**
* The public-facing functionality of the plugin.
*
* Defines the plugin name, version, and two examples hooks for how to
* enqueue the public-facing stylesheet and JavaScript.
*
* @link https://profiles.wordpress.org/mndpsingh287
* @since 1.0
*
* @author mndpsingh287
*/
class Frontend {
/**
* The ID of this plugin.
*
* @since 1.0
* @access private
* @var string $plugin_name The ID of this plugin.
*/
private $plugin_name;
/**
* The version of this plugin.
*
* @since 1.0
* @access private
* @var string $version The current version of this plugin.
*/
private $version;
/**
* The text domain of this plugin.
*
* @since 1.0
* @access private
* @var string $plugin_text_domain The text domain of this plugin.
*/
private $plugin_text_domain;
/**
* Initialize the class and set its properties.
*
* @since 1.0
* @param string $plugin_name The name of this plugin.
* @param string $version The version of this plugin.
* @param string $plugin_text_domain The text domain of this plugin.
*/
public function __construct( $plugin_name, $version, $plugin_text_domain ) {
$this->plugin_name = $plugin_name;
$this->version = $version;
$this->plugin_text_domain = $plugin_text_domain;
}
/**
* Register the stylesheets for the public-facing side of the site.
*
* @since 1.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 Loader as all of the hooks are defined
* in that particular class.
*
* The 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/advance-search-frontend.css', array(), $this->version, 'all' );
}
/**
* Register the JavaScript for the public-facing side of the site.
*
* @since 1.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 Loader as all of the hooks are defined
* in that particular class.
*
* The 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/advance-search-frontend.js', array( 'jquery' ), $this->version, false );
}
}