WS_OK_7.4.33
<?php
/**
* Plugin Name: WP Google Maps Tools
* Description: A collection of tools to help with google maps
* Plugin URI: https://zephyr-one.com
* Version: 1.0.0
* Author: Dylan J. Kotze
* License: GPLv2 or later
*/
if ( !defined( 'ABSPATH' ) ) {
die;
}
define( 'WPGMZA_MT_PLUGIN_PATH', plugin_dir_url( __FILE__ ) );
add_action( 'admin_menu', 'wpgmza_tools_pages' );
function wpgmza_tools_pages() {
add_menu_page( 'WP Google Maps Tools', 'WP Google Maps Tools', 'manage_options', 'wp_google_maps_tools', 'wpgmza_geojson_converter_page' );
add_submenu_page( 'wp_google_maps_tools', 'GeoJSON to Polygon Data', 'GeoJSON to Polygon Data', 'manage_options', 'wp_google_maps_tools', 'wpgmza_geojson_converter_page' );
}
function wpgmza_geojson_converter_page() {
include('pages/geo-to-polygon.php');
}
function wpgmza_mt_admin_scripts() {
wp_register_style( 'wpgmza-mt-admin-styles', WPGMZA_MT_PLUGIN_PATH . '/assets/css/admin-styles.css', false, '1.0.0' );
wp_enqueue_style( 'wpgmza-mt-admin-styles' );
wp_enqueue_script( 'wpgmza-mt-admin-script', WPGMZA_MT_PLUGIN_PATH . '/assets/js/admin-script.js', array( 'jquery' ) );
}
add_action( 'admin_enqueue_scripts', 'wpgmza_mt_admin_scripts' );