Changeset 1367321
- Timestamp:
- 03/09/2016 07:13:53 AM (10 years ago)
- Location:
- ank-google-map/trunk
- Files:
-
- 6 edited
-
ank-google-map.php (modified) (2 diffs)
-
inc/class-admin.php (modified) (2 diffs)
-
index.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
views/.htaccess (modified) (1 diff)
-
views/options_page.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ank-google-map/trunk/ank-google-map.php
r1306786 r1367321 1 1 <?php 2 /**3 * Main php file for 'Ank_Google_Map' plugin4 * Adding namespace on top, no content allowed before namespace declaration5 */6 namespace Ank91\Plugins\Ank_Google_Map;7 8 ?><?php9 2 /* 10 3 Plugin Name: Ank Google Map 11 4 Plugin URI: https://github.com/ank91/ank-google-map 12 5 Description: Simple, light weight, and non-bloated WordPress Google Map Plugin. Written in pure javascript, no jQuery at all, responsive, configurable, no ads and 100% Free of cost. 13 Version: 1.7. 46 Version: 1.7.5 14 7 Author: Ankur Kumar 15 8 Author URI: http://ank91.github.io/ … … 22 15 if (!defined('ABSPATH')) die; 23 16 24 define('AGM_PLUGIN_VERSION', '1.7. 4');17 define('AGM_PLUGIN_VERSION', '1.7.5'); 25 18 define('AGM_BASE_FILE', __FILE__); 26 19 27 /**28 * Registering class auto-loader29 * @requires php v5.3.030 */31 spl_autoload_register(__NAMESPACE__ . '\ank_google_map_autoloader');32 33 /**34 * Auto-loader for our plugin classes35 * @param $class_name36 * @throws \Exception37 */38 function ank_google_map_autoloader($class_name)39 {40 //make sure this loader work only for this plugin's related classes41 if (false !== strpos($class_name, __NAMESPACE__)) {42 $cls = strtolower(str_replace(__NAMESPACE__ . '\Ank_Google_Map_', '', $class_name));43 $cls_file = __DIR__ . "/inc/class-" . $cls . ".php";44 if (is_readable($cls_file)) {45 require_once($cls_file);46 } else {47 throw new \Exception('Class file - ' . esc_html($cls_file) . ' not found');48 }49 50 }51 }52 20 53 21 if (is_admin() && (!defined('DOING_AJAX') || !DOING_AJAX)) { 54 new Ank_Google_Map_Admin(); 22 require __DIR__ . '/inc/class-admin.php'; 23 new Ank91\Plugins\Ank_Google_Map\Ank_Google_Map_Admin(); 55 24 56 25 } else { 57 new Ank_Google_Map_FrontEnd(); 26 require __DIR__ . '/inc/class-frontend.php'; 27 new Ank91\Plugins\Ank_Google_Map\Ank_Google_Map_FrontEnd(); 58 28 } -
ank-google-map/trunk/inc/class-admin.php
r1306786 r1367321 118 118 function add_submenu_page() 119 119 { 120 $page_hook_suffix = add_submenu_page('options-general.php', 'Ank Google Map', ' AnkGoogle Map', 'manage_options', self::PLUGIN_SLUG, array($this, 'load_option_page'));120 $page_hook_suffix = add_submenu_page('options-general.php', 'Ank Google Map', 'Google Map', 'manage_options', self::PLUGIN_SLUG, array($this, 'load_option_page')); 121 121 /* 122 122 * Add the color picker js + css file to option page … … 185 185 $file_path = plugin_dir_path(AGM_BASE_FILE) . 'views/options_page.php'; 186 186 187 if ( file_exists($file_path)) {187 if (is_readable($file_path)) { 188 188 require $file_path; 189 189 } else { -
ank-google-map/trunk/index.php
r1306786 r1367321 1 1 <?php 2 2 // Silence is golden. 3 header( 'HTTP/1.0 403 Forbidden' ); -
ank-google-map/trunk/readme.txt
r1306786 r1367321 2 2 Tags: google map, responsive, light weight, ank, free, easy map 3 3 Requires at least: 3.8.0 4 Tested up to: 4.4. 05 Stable tag: 1.7. 44 Tested up to: 4.4.2 5 Stable tag: 1.7.5 6 6 License: GPLv2 or later 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
ank-google-map/trunk/views/.htaccess
r1306786 r1367321 1 # Prevent direct access ofphp files in this folder1 # Prevent direct access to php files in this folder 2 2 <FilesMatch "\.(?i:php)$"> 3 3 <IfModule !mod_authz_core.c> -
ank-google-map/trunk/views/options_page.php
r1306786 r1367321 238 238 <!--dev info ends--> 239 239 <?php if (WP_DEBUG == true) { 240 echo '<hr><p><h5>Showing Debugging Info:</h5> ';240 echo '<hr><p><h5>Showing Debugging Info:</h5><pre>'; 241 241 var_dump($options); 242 echo '</p ><hr>';242 echo '</pre></p><hr>'; 243 243 } ?> 244 244 </div><!-- end wrap--> 245 <script type="text/javascript">246 window.jQuery || console.error('Could not find jQuery. Ank Google Map option page needs jQuery to work.')247 </script>
Note: See TracChangeset
for help on using the changeset viewer.