Changeset 3330608
- Timestamp:
- 07/19/2025 11:45:57 AM (9 months ago)
- Location:
- my-maps
- Files:
-
- 28 added
- 5 edited
-
assets/banner-1544x500.png (added)
-
assets/banner-772x250.png (modified) (previous)
-
assets/icon-128x128.png (modified) (previous)
-
assets/icon-256x256.png (modified) (previous)
-
assets/screenshot-1.png (added)
-
assets/screenshot-2.png (added)
-
trunk/actions.php (added)
-
trunk/assets/css (added)
-
trunk/assets/css/admin-style.css (added)
-
trunk/assets/javascript (added)
-
trunk/assets/javascript/admin-javascript.js (added)
-
trunk/bootstrap.php (added)
-
trunk/includes (added)
-
trunk/includes/class-admin-menu.php (added)
-
trunk/includes/class-assets.php (added)
-
trunk/includes/class-controller-form.php (added)
-
trunk/includes/class-controller-settings.php (added)
-
trunk/includes/class-controller-table.php (added)
-
trunk/includes/class-dependency.php (added)
-
trunk/includes/class-flash.php (added)
-
trunk/includes/class-plugin.php (added)
-
trunk/includes/class-shortcode.php (added)
-
trunk/includes/class-singleton.php (added)
-
trunk/includes/class-table-maps.php (added)
-
trunk/languages/my-maps-ru_RU.mo (added)
-
trunk/languages/my-maps-ru_RU.po (added)
-
trunk/license.txt (added)
-
trunk/my-maps.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/templates (added)
-
trunk/templates/admin (added)
-
trunk/templates/admin/form.php (added)
-
trunk/templates/admin/settings.php (added)
Legend:
- Unmodified
- Added
- Removed
-
my-maps/trunk/my-maps.php
r1805195 r3330608 1 1 <?php 2 /* 3 Plugin Name: My Maps 4 Plugin URI: http://wordpress.org/plugins/my-maps/ 5 Description: Creating shortcode maps, using friendly interface 6 Version: 1.0 7 Author: Pavel 8 Author URI: http://plance.top/ 9 */ 2 /** 3 * Main plugin file. 4 * 5 * @package Plance\Plugin\My_Maps 6 * 7 * Plugin Name: My Maps 8 * Description: Creating shortcode maps, using friendly interface 9 * Plugin URI: https://plance.top/ 10 * Version: 1.1.0 11 * Author: plance 12 * Author URI: http://plance.top/ 13 * License: GPL v2 or later 14 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 15 * Text Domain: my-maps 16 * Domain Path: /languages/ 17 */ 10 18 11 defined('ABSPATH') or die('No script kiddies please!');19 namespace Plance\Plugin\My_Maps; 12 20 13 //Include language 14 load_plugin_textdomain('plance', false, basename(__DIR__).'/languages/'); 21 defined( 'ABSPATH' ) || exit; 15 22 16 if(class_exists('Plance_Include') == false)17 {18 require_once(plugin_dir_path(__FILE__).'vendor/plance/wp-plugin-library/include.php');19 }20 23 21 Plance_Include::load(array( 22 'index' => array( 23 array( 24 'class'=> 'Plance_Registry', 25 'path' => plugin_dir_path(__FILE__).'vendor/plance/wp-plugin-library/registry.php', 26 'call' => function() { 27 add_action('plugins_loaded', function() { 28 Plance_Registry::setPlugin(basename(__DIR__)); 29 Plance_Registry::set('path_to_plugin', plugin_dir_path(__FILE__)); 30 Plance_Registry::set('url_to_plugin', plugin_dir_url(__FILE__)); 31 }); 32 } 33 ), 34 array( 35 'class' => 'Plance_Flash', 36 'path' => plugin_dir_path(__FILE__).'vendor/plance/wp-plugin-library/flash.php', 37 'call' => function() { 38 Plance_Flash::instance() -> init(); 39 } 40 ), 41 'Plance_Validate' => plugin_dir_path(__FILE__).'vendor/plance/library/validate.php', 42 'Plance_View' => plugin_dir_path(__FILE__).'vendor/plance/library/view.php', 43 'Plance_Request' => plugin_dir_path(__FILE__).'vendor/plance/library/request.php', 44 45 /*InIt*/ 46 plugin_dir_path(__FILE__).'app/index_init.php', 47 ), 48 'admin' => array( 49 /* System */ 50 'WP_List_Table' => ABSPATH.'wp-admin/includes/class-wp-list-table.php', 51 52 'Plance_Interface' => plugin_dir_path(__FILE__).'vendor/plance/wp-plugin-library/interface.php', 53 'Plance_Controller' => plugin_dir_path(__FILE__).'vendor/plance/wp-plugin-library/controller.php', 54 'Plance_Validate' => plugin_dir_path(__FILE__).'vendor/plance/library/validate.php', 55 56 /* InIt */ 57 plugin_dir_path(__FILE__).'app/db.php', 58 plugin_dir_path(__FILE__).'app/admin_init.php', 59 60 /* Controllers */ 61 plugin_dir_path(__FILE__).'app/controller/admin/Data.php', 62 63 /* View */ 64 plugin_dir_path(__FILE__).'app/view/admin/data/index.php', 65 ), 66 )); 24 /** 25 * Bootstrap. 26 */ 27 require_once __DIR__ . '/bootstrap.php'; 67 28 68 add_action('plugins_loaded', function() { 69 if(is_admin() == TRUE) 70 { 71 new Plance_MSM_Admin_INIT(); 72 } 73 else 74 { 75 new Plance_MSM_Index_INIT(); 76 } 77 }); 78 79 if(is_admin() == TRUE) 80 { 81 register_activation_hook(__FILE__, 'Plance_MSM_DB::activate'); 82 register_uninstall_hook(__FILE__, 'Plance_MSM_DB::uninstall'); 83 } 84 85 Plance_Registry::clean(); 29 /** 30 * Actions. 31 */ 32 require_once __DIR__ . '/actions.php'; -
my-maps/trunk/readme.txt
r1402788 r3330608 1 1 === My Maps === 2 2 Contributors: plance 3 Tags: shortcode, map, google 3 Tags: shortcode, map, google maps, location, embed 4 4 Requires at least: 4.0.0 5 Tested up to: 4.56 Stable tag: 1. 05 Tested up to: 6.8 6 Stable tag: 1.1.0 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 9 10 My Maps is a simple and lightweight WordPress plugin that allows you to easily embed Google Maps on your site using shortcodes. 11 10 12 == Description == 11 The plugin 13 My Maps is a simple and lightweight WordPress plugin that allows you to easily embed Google Maps on your site using shortcodes. 12 14 13 Using this plugin you can create shortcode maps and set them in your posts or pages. 15 With this plugin, you can: 16 - Create custom maps and assign them to shortcodes. 17 - Add a single location to the map by specifying a valid address. 18 - Display the map anywhere on your site using the shortcode: `[my-map id="8"]`, where `id` is the unique identifier of the map. 14 19 15 Используя данный плагин, вы сможете создавать шорткоды карт и размещать их на своем сайте. 16 17 20 Perfect for contact pages, location previews, or any situation where a map with a single address pin is required. 18 21 19 22 == Installation == 20 * Use standart WordPress instalator 21 * Or extract archive into "/wp-content/plugins/" folder 23 1. Upload the plugin to the `/wp-content/plugins/` directory or install it using the WordPress plugin installer. 24 2. Activate the plugin through the 'Plugins' menu in WordPress. 25 3. Go to the "My Maps" menu in the admin panel to create your maps and generate shortcodes. 26 27 == Frequently Asked Questions == 28 29 = How do I embed a map on my site? = 30 Use the shortcode `[my-map id="X"]` where `X` is the ID of the map you've created. 31 32 = Can I add more than one location to the map? = 33 Currently, the plugin supports only one location per map based on an address. 34 35 == Screenshots == 36 1. Admin table listing all created map shortcodes. 37 2. Map creation form where you enter the map title and address. 22 38 23 39 == Changelog == 24 40 41 = 1.1.0 = 42 * Complete code refactoring. 43 25 44 = 1.0 = 26 First version plugin 45 * Initial release – allows creation of maps with single address markers and embedding via shortcode.
Note: See TracChangeset
for help on using the changeset viewer.