Gruby refaktor
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up admin-specific hooks.
|
||||
*/
|
||||
function mystat_admin_init_setup() {
|
||||
add_filter( 'upload_mimes', 'mystat_add_gpx_mime_type' );
|
||||
add_filter( 'wp_check_filetype_and_ext', 'mystat_fix_gpx_upload_permission', 10, 4 );
|
||||
mystat_register_settings();
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue admin-specific CSS.
|
||||
*
|
||||
* @param string $hook The current admin page hook.
|
||||
*/
|
||||
function mystat_enqueue_admin_styles( $hook ) {
|
||||
global $mystat_plugin_hooks;
|
||||
|
||||
if ( in_array( $hook, $mystat_plugin_hooks, true ) ) {
|
||||
$plugin_version = '1.0'; // You can use filemtime() for cache-busting in development
|
||||
wp_enqueue_style( 'mystat-admin-styles', MYSTAT_PLUGIN_URL . 'assets/css/admin.css', array(), $plugin_version );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user