| 1 |
<?php defined('ABSPATH') or die();?> |
| 2 |
|
| 3 |
<!DOCTYPE html> |
| 4 |
<html |
| 5 |
xmlns="http://www.w3.org/1999/xhtml" |
| 6 |
lang="<?php get_locale(); ?>"> |
| 7 |
<head> |
| 8 |
<meta |
| 9 |
http-equiv="Content-Type" |
| 10 |
content="text/html; charset=UTF-8"> |
| 11 |
<title></title> |
| 12 |
<?php |
| 13 |
wp_enqueue_script( |
| 14 |
'wcpn-admin', |
| 15 |
WCPOST()->plugin_url() . '/assets/js/wcpn-admin.js', |
| 16 |
['jquery', 'thickbox'], |
| 17 |
WC_POSTNL_VERSION |
| 18 |
); |
| 19 |
wp_localize_script( |
| 20 |
'wcpn-admin', |
| 21 |
'wc_postnl', |
| 22 |
[ |
| 23 |
'ajax_url' => admin_url('admin-ajax.php'), |
| 24 |
'nonce' => wp_create_nonce(WCPOST::NONCE_ACTION), |
| 25 |
WCPOST_Settings::SETTING_DOWNLOAD_DISPLAY => WCPOST()->setting_collection->getByName( |
| 26 |
WCPOST_Settings::SETTING_DOWNLOAD_DISPLAY |
| 27 |
) ? WCPOST()->setting_collection->getByName(WCPOST_Settings::SETTING_DOWNLOAD_DISPLAY) : '', |
| 28 |
] |
| 29 |
); |
| 30 |
|
| 31 |
wp_enqueue_style( |
| 32 |
'wcpn-admin-styles', |
| 33 |
WCPOST()->plugin_url() . '/assets/css/wcpn-admin-styles.css', |
| 34 |
[], |
| 35 |
WC_POSTNL_VERSION, |
| 36 |
'all' |
| 37 |
); |
| 38 |
|
| 39 |
// Legacy styles (WC 2.1+ introduced MP6 style with larger buttons) |
| 40 |
if (version_compare(WOOCOMMERCE_VERSION, '2.1', '<=')) { |
| 41 |
wp_enqueue_style( |
| 42 |
'wcpn-admin-styles-legacy', |
| 43 |
WCPOST()->plugin_url() . '/assets/css/wcpn-admin-styles-legacy.css', |
| 44 |
[], |
| 45 |
WC_POSTNL_VERSION, |
| 46 |
'all' |
| 47 |
); |
| 48 |
} |
| 49 |
|
| 50 |
wp_enqueue_style('wcpostnl-admin-styles'); |
| 51 |
wp_enqueue_style('colors'); |
| 52 |
wp_enqueue_style('media'); |
| 53 |
wp_enqueue_script('jquery'); |
| 54 |
do_action('admin_print_styles'); |
| 55 |
do_action('admin_print_scripts'); |
| 56 |
?> |
| 57 |
</head> |
| 58 |
<body style="padding:10px 20px;"> |
| 59 |
|