| 1 |
<?php |
| 2 |
|
| 3 |
defined( 'ABSPATH' ) || exit; |
| 4 |
|
| 5 |
/** |
| 6 |
* Enqueue WordPress Admin Area CSS files. |
| 7 |
* |
| 8 |
* @return void |
| 9 |
*/ |
| 10 |
function dfrapi_admin_enqueue_styles() { |
| 11 |
wp_register_style( 'dfrapi_css', DFRAPI_URL . 'css/style.css', false, DFRAPI_VERSION ); |
| 12 |
wp_register_style( 'dfrapi_searchform', DFRAPI_URL . 'css/searchform.css', false, DFRAPI_VERSION ); |
| 13 |
wp_enqueue_style( 'dfrapi_css' ); |
| 14 |
wp_enqueue_style( 'dfrapi_searchform' ); |
| 15 |
} |
| 16 |
|
| 17 |
add_action( 'admin_enqueue_scripts', 'dfrapi_admin_enqueue_styles' ); |
| 18 |
|
| 19 |
/** |
| 20 |
* Enqueue WordPress Admin Area JavaScript files. |
| 21 |
* |
| 22 |
* @return void |
| 23 |
*/ |
| 24 |
function dfrapi_admin_enqueue_scripts() { |
| 25 |
wp_register_script( 'dfrapi_general_js', DFRAPI_URL . 'js/general.js', array( 'jquery' ), DFRAPI_VERSION, true ); |
| 26 |
wp_register_script( 'dfrapi_searchfilter_js', DFRAPI_URL . 'js/searchfilter.js', array( 'jquery' ), DFRAPI_VERSION ); |
| 27 |
wp_register_script( 'dfrapi_merchants_js', DFRAPI_URL . 'js/merchants.js', array( 'jquery' ), DFRAPI_VERSION ); |
| 28 |
wp_register_script( 'dfrapi_searchform_js', DFRAPI_URL . 'js/searchform.js', array( 'jquery' ), DFRAPI_VERSION ); |
| 29 |
wp_register_script( 'dfrapi_jquery_reveal_js', DFRAPI_URL . 'js/jquery.reveal.js', array( 'jquery' ), DFRAPI_VERSION ); |
| 30 |
wp_enqueue_script( 'dfrapi_general_js' ); |
| 31 |
wp_enqueue_script( 'dfrapi_searchfilter_js' ); |
| 32 |
if ( ! is_customize_preview() ) { |
| 33 |
wp_enqueue_script( 'dfrapi_merchants_js' ); |
| 34 |
} |
| 35 |
wp_enqueue_script( 'dfrapi_searchform_js' ); |
| 36 |
wp_enqueue_script( 'dfrapi_jquery_reveal_js' ); |
| 37 |
} |
| 38 |
|
| 39 |
add_action( 'admin_enqueue_scripts', 'dfrapi_admin_enqueue_scripts' ); |
| 40 |
|
| 41 |
|