<?php
add_action('dslc_hook_register_modules',
    create_function('', 'return dslc_register_module( "Ainex_Map" );')
);

class Ainex_Map extends DSLC_Module {

 	// Module Attributes
    var $module_id = 'Ainex_Map';
    var $module_title = 'Map';
    var $module_icon = 'map-marker';
    var $module_category = 'Ainex - Blocks';

 	// Module Options
    function options() {
    	// The options array
    	$dslc_options = array(
            array(
                'label' => 'Map - Embed Map',
                'id' => 'embed',
                'std' => '<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d3223.6355179653888!2d-115.17455600000001!3d36.102371999999995!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80c8c5ccc25c8967%3A0xedac8aad053f7cee!2sNew+York-New+York+Hotel+%26+Casino!5e0!3m2!1svi!2s!4v1403756229008" height="600" frameborder="0" style="border:0"></iframe>',
                'type' => 'textarea',
            ),
		);

        $dslc_options = array_merge( $dslc_options, $this->shared_options('animation_options') );

    	// Return the array
    	return apply_filters( 'dslc_module_options', $dslc_options, $this->module_id );

    }

 	// Module Output
    function output( $options ) {

    	global $dslc_active;

		if ( $dslc_active && is_user_logged_in() && current_user_can( DS_LIVE_COMPOSER_CAPABILITY ) )
			$dslc_is_admin = true;
		else
			$dslc_is_admin = false;

		//REQUIRED
		$this->module_start( $options );

?>
        <div class="map-container">
            <?php echo stripslashes($options['embed']); ?>
        </div>

<?php
    	// REQUIRED
    	$this->module_end( $options );

    }

}