Skip to content

Instantly share code, notes, and snippets.

@jahidHn
Created August 10, 2017 08:11
Show Gist options
  • Save jahidHn/02e1e9268617657cedd46ccbb0969cc6 to your computer and use it in GitHub Desktop.
Save jahidHn/02e1e9268617657cedd46ccbb0969cc6 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: JH Industry Toolkit
Plugin URI: http://github.com/jahid284
Description: Js Indusrty toolkit
Version: 1.0.0
Author: Jahid Hasan
Author URI: http://github.com/jahid284
License: GPLv2 or later
Text Domain: jh-industry
*/
function add_google_map($atts, $content = null){
$a = shortcode_atts( array(
'width' => 600,
'height' => 400,
), $atts );
$map = '<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3652.3440942360044!2d90.40837231460704!3d23.735105984596913!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3755b8f5b23ba717%3A0x70856249be26cb13!2z4Ka54KeL4Kaf4KeH4KayIOCnreCnpw!5e0!3m2!1sbn!2sbd!4v1502351908867" width="'.$a['width'].'" height="'.$a['height'].'" frameborder="0" style="border:0" allowfullscreen></iframe>';
return $map;
}
add_shortcode( 'gmap', 'add_google_map' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment