/
/
home
/
melaqxso
/
nymetrocualumni.com
/
wp-content
/
plugins
/
give-square
/
includes
Server: server63.web-hosting.com (198.54.116.184)
You: 216.73.216.61
PHP 7.4.33
Dir:
/home/melaqxso/nymetrocualumni.com/wp-content/plugins/give-square/includes
Edit:
/home/melaqxso/nymetrocualumni.com/wp-content/plugins/give-square/includes/scripts.php
<?php /** * Enqueue and Dequeue Scripts * * @package Give-Square * @since 1.0.0 * @license https://opensource.org/licenses/gpl-license GNU Public License * @copyright Copyright (c) 2018, GiveWP */ // Exit if accessed directly. if (!defined('ABSPATH')) { exit; } /** * Add Scripts to FrontEnd. * * @since 1.0.0 */ function give_square_add_scripts() { // Bail out, if Square gateway is not active. if (!give_is_gateway_active('square')) { return; } $host = give_is_test_mode() ? 'sandbox.' : ''; wp_register_script( 'give-square-payment-form', "https://{$host}web.squarecdn.com/v1/square.js", [], GIVE_SQUARE_VERSION ); wp_enqueue_script('give-square-payment-form'); wp_register_script( 'give-square-frontend', GIVE_SQUARE_PLUGIN_URL . 'assets/dist/js/frontend.js', ['wp-i18n', 'jquery', 'give-square-payment-form'], GIVE_SQUARE_VERSION ); wp_enqueue_script('give-square-frontend'); wp_set_script_translations( 'give-square-frontend', 'give-square', trailingslashit(GIVE_SQUARE_PLUGIN_DIR) . '/languages' ); $localise_vars = apply_filters( 'give_square_localise_vars', [ 'applicationID' => give_square_get_application_id(), 'locationID' => give_square_get_location_id(), 'inputStyles' => give_square_get_input_styles(), ] ); wp_localize_script('give-square-frontend', 'giveSquareLocaliseVars', $localise_vars); } add_action('wp_enqueue_scripts', 'give_square_add_scripts'); /** * Add Stylesheets. * * @since 1.0.0 */ function give_square_add_stylesheets() { // Bail out, if Square gateway is not active. if (!give_is_gateway_active('square')) { return; } wp_register_style( 'give-square-frontend', GIVE_SQUARE_PLUGIN_URL . 'assets/dist/css/frontend.css', '', GIVE_SQUARE_VERSION ); wp_enqueue_style('give-square-frontend'); } add_action('wp_enqueue_scripts', 'give_square_add_stylesheets'); /** * Add Stylesheets to Admin. * * @since 1.0.0 */ function give_square_add_admin_stylesheets() { wp_register_style( 'give-square-admin', GIVE_SQUARE_PLUGIN_URL . 'assets/dist/css/admin.css', '', GIVE_SQUARE_VERSION ); wp_enqueue_style('give-square-admin'); } add_action('admin_enqueue_scripts', 'give_square_add_admin_stylesheets'); /** * Add Scripts to Admin. * * @since 1.0.0 */ function give_square_add_admin_scripts() { wp_register_script( 'give-square-admin', GIVE_SQUARE_PLUGIN_URL . 'assets/dist/js/admin.js', ['wp-i18n', 'jquery'], GIVE_SQUARE_VERSION ); wp_enqueue_script('give-square-admin'); wp_set_script_translations( 'give-square-admin', 'give-square', trailingslashit(GIVE_SQUARE_PLUGIN_DIR) . '/languages' ); $localise_vars = [ 'disconnect_square_title' => __('Confirm Disconnect?', 'give-square'), 'ajaxNonce' => wp_create_nonce('give_square_ajax_nonce'), ]; wp_localize_script('give-square-admin', 'giveSquareAdminLocaliseVars', $localise_vars); } add_action('admin_enqueue_scripts', 'give_square_add_admin_scripts');
Ukuran: 3.2 KB