Gruby refaktor

This commit is contained in:
2026-02-05 12:06:38 +01:00
parent 998f4348f3
commit af828068a9
18 changed files with 3093 additions and 2696 deletions
+27
View File
@@ -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 );
}
}