| @@ -4,9 +4,9 @@ | ||
| 4 | 4 | Plugin URI: https://wordpress.org/plugins/image-map-hotspots/ |
| 5 | 5 | Description: Image hotspot lets you easily add custom tooltips to your images and add hotspot when highlighting them. Furthermore, you have the option of setting customized tooltip content, position, animation, and more. |
| 6 | 6 | Author: Sk Abul Hasan |
| 7 | 7 | Author URI: https://www.wpmart.org/ |
| 8 | - Version: 2.3 | |
| 8 | + Version: 3.4 | |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | 11 | if (!defined('ABSPATH')) |
| 12 | 12 | exit; |
| @@ -12,10 +12,10 @@ | ||
| 12 | 12 | exit; |
| 13 | 13 | |
| 14 | 14 | define('imh_6310_plugin_url', plugin_dir_path(__FILE__)); |
| 15 | 15 | define('imh_6310_plugin_dir_url', plugin_dir_url(__FILE__)); |
| 16 | -define ( 'imh_6310_PLUGIN_CURRENT_VERSION', 2.3 ); | |
| 17 | - | |
| 16 | +define('imh_6310_PLUGIN_CURRENT_VERSION', 3.4); | |
| 17 | + | |
| 18 | 18 | add_shortcode('imh_6310_image_map', 'imh_6310_image_map_shortcode'); |
| 19 | 19 | |
| 20 | 20 | function imh_6310_image_map_shortcode($atts) |
| 21 | 21 | { |
| @@ -31,12 +31,12 @@ | ||
| 31 | 31 | add_action('admin_menu', 'imh_6310_image_map_menu'); |
| 32 | 32 | |
| 33 | 33 | function imh_6310_image_map_menu() |
| 34 | 34 | { |
| 35 | - $options = imh_6310_get_user_roles(); | |
| 35 | + $options = imh_6310_get_user_roles(); | |
| 36 | 36 | add_menu_page('Image Map Hotspot', 'Image Map Hotspot', $options, 'imh-6310-image-map-hotspot', 'imh_6310_home', 'dashicons-format-image', 20); |
| 37 | 37 | add_submenu_page('imh-6310-image-map-hotspot', 'Image Map Hotspot', 'All Image Map Hotspot', $options, 'imh-6310-image-map-hotspot', 'imh_6310_home'); |
| 38 | - add_submenu_page('imh-6310-image-map-hotspot', 'Settings', 'Settings', $options, 'imh-6310-image-map-hotspot-setting', 'imh_6310_image_map_hotspot_setting'); | |
| 38 | + add_submenu_page('imh-6310-image-map-hotspot', 'Settings', 'Settings', $options, 'imh-6310-image-map-hotspot-setting', 'imh_6310_image_map_hotspot_setting'); | |
| 39 | 39 | add_submenu_page('imh-6310-image-map-hotspot', 'Import / Export Plugin', 'Import/Export Plugin', $options, 'imh-6310-image-map-hotspot-import-export', 'imh_6310_image_map_hotspot_import_export'); |
| 40 | 40 | add_submenu_page('imh-6310-image-map-hotspot', 'License', 'License', $options, 'imh-6310-image-map-hotspot-license', 'imh_6310_image_map_hotspot_lincense'); |
| 41 | 41 | add_submenu_page('imh-6310-image-map-hotspot', 'How to use', 'Help', $options, 'imh-6310-image-map-hotspot-use', 'imh_6310_image_map_hotspot_how_to_use'); |
| 42 | 42 | add_submenu_page('imh-6310-image-map-hotspot', 'WpMart Plugins', 'WpMart Plugins', $options, 'imh-6310-wpmart-plugins', 'imh_6310_wpmart_plugins'); |
| @@ -46,27 +46,30 @@ | ||
| 46 | 46 | |
| 47 | 47 | register_activation_hook(__FILE__, 'imh_6310_image_map_install'); |
| 48 | 48 | include_once(imh_6310_plugin_url . 'functions.php'); |
| 49 | 49 | |
| 50 | -function imh_6310_activation_redirect( $plugin ) { | |
| 51 | - if( $plugin == plugin_basename( __FILE__ ) ) { | |
| 52 | - exit( wp_redirect( admin_url( 'admin.php?page=imh-6310-image-map-hotspot-use' ) ) ); | |
| 50 | +function imh_6310_activation_redirect($plugin) | |
| 51 | +{ | |
| 52 | + if ($plugin == plugin_basename(__FILE__)) { | |
| 53 | + exit(wp_redirect(admin_url('admin.php?page=imh-6310-image-map-hotspot-use'))); | |
| 53 | 54 | } |
| 54 | 55 | } |
| 55 | -add_action( 'activated_plugin', 'imh_6310_activation_redirect' ); | |
| 56 | +add_action('activated_plugin', 'imh_6310_activation_redirect'); | |
| 56 | 57 | |
| 57 | -add_action( 'admin_enqueue_scripts', 'imh_6310_link_css_js' ); | |
| 58 | +add_action('admin_enqueue_scripts', 'imh_6310_link_css_js'); | |
| 58 | 59 | |
| 59 | 60 | |
| 60 | -function imh_6310_plugin_update_check() { | |
| 61 | +function imh_6310_plugin_update_check() | |
| 62 | +{ | |
| 61 | 63 | imh_6310_version_status(); |
| 62 | 64 | imh_6310_check_field_exists(); |
| 63 | 65 | } |
| 64 | -add_action('plugins_loaded', 'imh_6310_plugin_update_check'); | |
| 66 | +add_action('plugins_loaded', 'imh_6310_plugin_update_check'); | |
| 65 | 67 | |
| 66 | -function imh_6310_head_css() { | |
| 68 | +function imh_6310_head_css() | |
| 69 | +{ | |
| 67 | 70 | $custom_css = ".imh-6310-point-icons{display: none}"; |
| 68 | 71 | wp_register_style('imh-6310-head-css', ""); |
| 69 | 72 | wp_enqueue_style('imh-6310-head-css'); |
| 70 | 73 | wp_add_inline_style('imh-6310-head-css', $custom_css); |
| 71 | - } | |
| 72 | -add_action( 'wp_enqueue_scripts', 'imh_6310_head_css', 999 ); | |
| 74 | +} | |
| 75 | +add_action('wp_enqueue_scripts', 'imh_6310_head_css', 999); | |