| Server IP : 121.121.20.254 / Your IP : 216.73.217.64 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/wst2024/wp-content/plugins/url-shortify/lite/includes/ |
Upload File : |
<?php
/**
* The public-facing functionality of the plugin.
*
* @link http://example.com
* @since 1.0.0
*
* @package Plugin_Name
* @subpackage Plugin_Name/Frontend
*/
namespace Kaizen_Coders\Url_Shortify;
/**
* The public-facing functionality of the plugin.
*
* Defines the plugin name, version, and two examples hooks for how to
* enqueue the dashboard-specific stylesheet and JavaScript.
*
* @package Url_Shortify
* @subpackage Url_Shortify/Frontend
* @author Kaizen Coders <hello@kaizencoders.com>
*/
class Frontend {
/**
* The plugin's instance.
*
* @since 1.0.0
* @access private
* @var Plugin $plugin This plugin's instance.
*/
private $plugin;
/**
* Initialize the class and set its properties.
*
* @since 1.0.0
*
* @param Plugin $plugin This plugin's instance.
*/
public function __construct( Plugin $plugin ) {
$this->plugin = $plugin;
}
/**
* Register the stylesheets for the public-facing side of the site.
*
* @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 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->get_plugin_name(),
\plugin_dir_url( dirname( __FILE__ ) ) . 'dist/styles/url-shortify.css',
array(),
$this->plugin->get_version(),
'all' );
}
/**
* Register the stylesheets for the public-facing side of the site.
*
* @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 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->get_plugin_name(),
\plugin_dir_url( dirname( __FILE__ ) ) . 'dist/scripts/url-shortify.js',
array( 'jquery' ),
$this->plugin->get_version(),
false );
wp_localize_script(
'url-shortify',
'usParams',
array(
'ajaxurl' => admin_url( 'admin-ajax.php' )
)
);
}
}