Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Commit

Permalink
Merge pull request #94 from Codeinwp/develop
Browse files Browse the repository at this point in the history
Adds tested up with WordPress 5.3
  • Loading branch information
selul authored Nov 14, 2019
2 parents cce6fd7 + 3836dac commit 14276d6
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 7 deletions.
2 changes: 1 addition & 1 deletion css/frontend.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Version: 2.3.1
* Version: 2.3.2
*/

.intergeo_map_canvas img {
Expand Down
54 changes: 54 additions & 0 deletions css/library.css
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,57 @@
margin: 10px 20px 15px;
list-style-type: disc;
}

.intergeo_lbrr_item.intergeo_otter .intergeo_lbrr_wrapper {
background: #ffffff;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
margin-bottom: 20px;
padding: 15px;
flex-direction: column;
}


.intergeo_lbrr_item.intergeo_otter .intergeo_lbrr_wrapper img {
width: 128px;
height: 128px;
margin: auto;
}

.intergeo_lbrr_item.intergeo_otter .intergeo_lbrr_wrapper .intergeo_otter_details {
padding: 5px;
}

.intergeo_lbrr_item.intergeo_otter .intergeo_lbrr_wrapper .intergeo_otter_details .intergeo_otter_title {
text-align: center;
font-size: 14px;
font-weight: bold;
text-transform: uppercase;
}

.intergeo_lbrr_item.intergeo_otter .intergeo_lbrr_wrapper .intergeo_otter_details .intergeo_otter_info {
display: block;
margin-bottom: 10px;
font-size: 13px;
color: #777;
line-height: 1.6;
}

.intergeo_lbrr_item.intergeo_otter .intergeo_lbrr_wrapper .intergeo_otter_actions {
display: flex;
justify-content: center;
}

.intergeo_lbrr_item.intergeo_otter .intergeo_lbrr_wrapper .intergeo_otter_actions .button:first-child {
margin-right: 5px;
}

.intergeo_lbrr_item.intergeo_otter .intergeo_lbrr_wrapper .intergeo_otter_actions .button:last-child {
margin-left: 5px;
}

.intergeo_lbrr_item.intergeo_otter .intergeo_lbrr_wrapper .intergeo_otter_actions .dashicons {
margin-top: 2px;
margin-right: 7px;
}
23 changes: 20 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: Intergeo - Google Maps Plugin
* Plugin URI: http://themeisle.com/plugins/intergeo-maps-lite/
* Description: A simple, easy and quite powerful Google Map tool to create, manage and embed custom Google Maps into your WordPress posts and pages. The plugin allows you to deeply customize look and feel of a map, add overlays like markers, rectangles, circles, polylines and polygons to your map. It could even be integraded with your Google Adsense account and show ad on your maps.
* Version: 2.3.1
* Version: 2.3.2
* Author: Themeisle
* Author URI: http://themeisle.com
* License: GPL v2.0 or later
Expand All @@ -17,7 +17,7 @@

define( 'INTERGEO_PLUGIN_NAME', 'intergeo' );
define( 'TI_INTERGEO_PLUGIN_NAME', 'intergeo_maps' );
define( 'INTERGEO_VERSION', '2.3.1' );
define( 'INTERGEO_VERSION', '2.3.2' );
define( 'INTERGEO_ABSPATH', dirname( __FILE__ ) );
define( 'INTERGEO_ABSURL', plugins_url( '/', __FILE__ ) );
defined( 'WPLANG' ) || define( 'WPLANG', '' );
Expand Down Expand Up @@ -308,7 +308,7 @@ function intergeo_map_popup_init() {
} else {
$args = array(
'page' => INTERGEO_PLUGIN_NAME,
'updated' => date( 'YmdHis' ),
'updated' => current_time( 'mysql' ),
);
wp_redirect( add_query_arg( $args, admin_url( 'upload.php' ) ) );
exit;
Expand Down Expand Up @@ -1233,6 +1233,15 @@ function intergeo_library() {
if ( filter_input( INPUT_GET, 'do' ) == 'delete' ) {
intergeo_library_delete();
}

if ( filter_input( INPUT_GET, 'do' ) == 'dismiss-notice' && current_user_can( 'manage_options' ) ) {
if ( wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), 'dismiss-notice' . filter_input( INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP ) ) ) {
update_option( 'intergeo_maps_otter_notice', true );
wp_redirect( add_query_arg( 'page', INTERGEO_PLUGIN_NAME, admin_url( 'upload.php' ) ) );
exit;
}
}

$query = new WP_Query(
array(
'orderby' => 'ID',
Expand Down Expand Up @@ -1354,6 +1363,14 @@ function intergeo_print_messages() {
update_option( 'intergeo_messages', $messages );
}

/**
* Add options.
*/
function intergeo_register_settings() {
add_option( 'intergeo_maps_otter_notice', false );
}
add_action( 'admin_init', 'intergeo_register_settings' );

/**
* Show message.
*
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "intergeo-maps",
"version": "2.3.1",
"version": "2.3.2",
"description": "Intergeo Maps plugin",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: codeinwp,intergeomaps,hardeepasrani,themeisle,Madalin_ThemeIsle,uriahs-victor,contactashish13
Tags: directions, easy map, google, google map, google map plugin, google maps, latitude, location, longitude, map, map directions, map markers, map plugin, map widget, maps, marker, polygons, polylines, routes, store locator, streetview, wp google map, wp google maps, wp maps,plugin,admin,widget,shortcode,google maps, maps, map, map markers, google, google map, maps api, wp maps, wp google maps, easy map, embed, marker, placemark, icon, geocode, shortcode, custom post type, multisite, marker clustering
Requires at least: 3.5
Tested up to: 5.2
Tested up to: 5.3
Stable tag: trunk
License: GPL v2.0 or later
License URI: http://www.opensource.org/licenses/gpl-license.php
Expand Down
51 changes: 50 additions & 1 deletion templates/library/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,59 @@ class="add-new-h2"><?php _e( 'Maps Settings', 'intergeo-maps' ); ?></a>

<div id="intergeo_lbrr_items" class="intergeo_sidebar_left">

<?php if ( ! defined( 'OTTER_BLOCKS_VERSION' ) && current_user_can( 'manage_options' ) && version_compare( get_bloginfo( 'version' ), '5.0', '>=' ) && ! get_option( 'intergeo_maps_otter_notice', false ) ) : ?>

<?php
$index = 0;

$url = add_query_arg(
array(
'tab' => 'plugin-information',
'plugin' => 'otter-blocks',
'TB_iframe' => true,
'width' => 800,
'height' => 800,
),
network_admin_url( 'plugin-install.php' )
);

$dismiss = add_query_arg(
array(
'do' => 'dismiss-notice',
'noheader' => 'true',
'nonce' => wp_create_nonce( 'dismiss-notice' . filter_input( INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP ) ),
)
);

$index ++;
?>
<div class="intergeo_lbrr_item intergeo_otter">
<div class="intergeo_lbrr_wrapper">
<img src="https://ps.w.org/otter-blocks/assets/icon-256x256.png?rev=2019293"/>

<div class="intergeo_otter_details">
<p class="intergeo_otter_title"><?php _e( 'Intergeo recommends Otter', 'intergeo-maps' ); ?></p>
<p class="intergeo_otter_info"><?php _e( 'Intergeo recommends Otter for best in class Google Maps Builder for WordPress\'s new Block Editor.', 'intergeo-maps' ); ?></p>
</div>

<div class="intergeo_otter_actions">
<a class="button button-default" href="<?php echo $dismiss; ?>"><?php _e( 'Dismiss', 'intergeo-maps' ); ?></a>

<a class="button button-primary thickbox open-plugin-details-modal" href="<?php echo $url; ?>">
<span class="dashicons dashicons-external"></span><?php _e( 'More details', 'intergeo-maps' ); ?>
</a>
</div>
</div>
</div>
<?php endif; ?>

<?php if ( $query->have_posts() ) : ?>

<?php
$index = 0;
if ( ! isset( $index ) ) {
$index = 0;
}

while ( $query->have_posts() ) :
$post = $query->next_post();

Expand Down

0 comments on commit 14276d6

Please sign in to comment.