| 1 |
<?php |
| 2 |
/** |
| 3 |
* Notice assets. |
| 4 |
* |
| 5 |
* @package ULTP\Notice |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace ULTP\Includes\Notice; |
| 9 |
|
| 10 |
defined( 'ABSPATH' ) || exit; |
| 11 |
|
| 12 |
/** |
| 13 |
* The stylesheet and script shared by every notice. Queue them only when a notice will show. |
| 14 |
*/ |
| 15 |
final class Notice_Assets { |
| 16 |
|
| 17 |
/** |
| 18 |
* Handle of the stylesheet shared by every notice. |
| 19 |
*/ |
| 20 |
const STYLESHEET = 'ultp-notice'; |
| 21 |
|
| 22 |
/** |
| 23 |
* Handle of the countdown script. |
| 24 |
*/ |
| 25 |
const COUNTDOWN_SCRIPT = 'ultp-notice-countdown'; |
| 26 |
|
| 27 |
/** |
| 28 |
* Queue assets/css/ultp-notice.css. |
| 29 |
* |
| 30 |
* @return void |
| 31 |
*/ |
| 32 |
public static function enqueue_stylesheet() { |
| 33 |
wp_enqueue_style( self::STYLESHEET, ULTP_URL . 'assets/css/ultp-notice.css', array(), ULTP_VER ); |
| 34 |
} |
| 35 |
|
| 36 |
/** |
| 37 |
* Queue the countdown script in the footer. |
| 38 |
* |
| 39 |
* @return void |
| 40 |
*/ |
| 41 |
public static function enqueue_countdown_script() { |
| 42 |
wp_enqueue_script( self::COUNTDOWN_SCRIPT, ULTP_URL . 'assets/js/ultp-notice-countdown.js', array( 'jquery' ), ULTP_VER, true ); |
| 43 |
} |
| 44 |
} |
| 45 |
|