Changeset 1839607
- Timestamp:
- 03/13/2018 08:36:31 PM (8 years ago)
- Location:
- lf-hiker/trunk
- Files:
-
- 9 added
- 7 deleted
- 8 edited
-
Controller/Front.php (modified) (6 diffs)
-
Model/Map.php (modified) (1 diff)
-
css/lfh-style.css (modified) (1 diff)
-
css/lfh-style.less (modified) (1 diff)
-
dist/helper-min.1.6.0.js (deleted)
-
dist/helper-min.1.7.0.js (added)
-
dist/helper.1.6.0.css (deleted)
-
dist/helper.1.7.0.css (added)
-
dist/lfh-front-min.1.6.0.js (deleted)
-
dist/lfh-front-min.1.7.0.js (added)
-
dist/lfh-post-editor-min.1.6.0.js (deleted)
-
dist/lfh-post-editor-min.1.7.0.js (added)
-
dist/lfh-post-editor.1.6.0.css (deleted)
-
dist/lfh-post-editor.1.7.0.css (added)
-
dist/lfh-style-min.1.6.0.css (deleted)
-
dist/lfh-style-min.1.7.0.css (added)
-
dist/tinymce-lfh-plugin-min.1.6.0.js (deleted)
-
dist/tinymce-lfh-plugin-min.1.7.0.js (added)
-
gulpfile.js (modified) (1 diff)
-
languages/lfh-de_DE.mo (added)
-
languages/lfh-de_DE.po (added)
-
lf-hiker.php (modified) (2 diffs)
-
package.json (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lf-hiker/trunk/Controller/Front.php
r1833277 r1839607 6 6 */ 7 7 if ( ! defined( 'ABSPATH' ) ) exit; 8 $lfh_shortcode_done = array(); 8 9 9 10 Class Lfh_Controller_Front 10 11 { 12 11 13 private static $_instance = null; 12 14 private static $_lfh_map_count =0; … … 22 24 add_shortcode('lfh-marker', array(&$this, 'marker_shortcode')); 23 25 add_shortcode('lfh-gpx', array(&$this, 'gpx_shortcode')); 24 add_shortcode('lfh-kml', array(&$this, 'kml_shortcode'));26 // add_shortcode('lfh-kml', array(&$this, 'kml_shortcode')); 25 27 if(!function_exists('shortcode_empty_paragraph_fix')){ 26 28 add_filter( 'the_content', array(&$this,'shortcode_empty_paragraph_fix' )); … … 66 68 67 69 public function map_shortcode($atts, $html =null){ 70 if( $this->is_divi_get_thumbnail()){ 71 return ""; 72 } 68 73 if(!is_array($atts)){ 69 74 $atts = array(); 70 75 } 76 71 77 $options = Lfh_Model_Map::filter_map_data($atts); 72 78 … … 96 102 $this->add_map_scripts( $options ); 97 103 98 return$this->get_view()->render('map', array(104 $map = $this->get_view()->render('map', array( 99 105 'options' => $options, 100 106 'is_connected' => wp_get_current_user()->ID 101 107 )); 108 109 return $map; 102 110 } 103 111 104 112 105 113 public function gpx_shortcode($atts, $html=''){ 106 114 if( $this->is_divi_get_thumbnail()){ 115 return ""; 116 } 107 117 $options = Lfh_Model_Map::filter_gpx_data($atts); 108 118 if(is_null($options)){ … … 123 133 'html' => $html 124 134 )); 135 125 136 return $content; 126 137 } 127 138 128 139 public function marker_shortcode ( $atts, $html = '') { 140 if( $this->is_divi_get_thumbnail()){ 141 return ""; 142 } 129 143 $options = Lfh_Model_Map::filter_marker_data($atts); 130 144 if(is_null($options)){ … … 151 165 public function add_div_fadable(){ 152 166 echo '<div id="lfh-fade"></div>'; 167 } 168 private function is_divi_get_thumbnail(){ 169 global $shortname; 170 if( $shortname != "divi"){ 171 return false; 172 } 173 $functions = debug_backtrace(); 174 $find = false; 175 $i = 5; 176 while( $i < count( $functions) && !$find){ 177 if( $functions[$i]["function"] === "get_thumbnail"){ 178 $find = true; 179 } 180 $i++; 181 } 182 return $find; 153 183 } 154 184 private function add_map_scripts($options){ -
lf-hiker/trunk/Model/Map.php
r1833277 r1839607 51 51 // 'url' => 'https://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.jpg', 52 52 'url' => '//stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg', 53 'attribution' => ' © <a href="http://openstreetmap.org">OpenStreetMap</a>Contributors & <a href="http://stamen.com">Stamen Design</a>',53 'attribution' => 'by <a href="http://stamen.com">Stamen Design</a> Data © <a href="http://openstreetmap.org">OpenStreetMap</a> Contributors | <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>', 54 54 'max_zoom' => 13, 55 'need_key' => false), 56 'stamen_terrain'=> array( 57 'label' => 'Stamen Terrain', 58 'url' => '//stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.jpg', 59 'attribution' => 'by <a href="http://stamen.com">Stamen Design</a> Data © <a href="http://openstreetmap.org">OpenStreetMap</a> Contributors | <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>', 60 'min_zoom' => 1, 61 'max_zoom' => 14, 55 62 'need_key' => false) 56 63 ); -
lf-hiker/trunk/css/lfh-style.css
r1833277 r1839607 1222 1222 margin-bottom: 2px; 1223 1223 } 1224 svg.leaflet-zoom-animated { 1225 max-height: none; 1226 } 1224 1227 @media screen and (max-width: 768px) { 1225 1228 /*.lfh-control-fullscreen{ -
lf-hiker/trunk/css/lfh-style.less
r1833277 r1839607 900 900 } 901 901 902 902 svg.leaflet-zoom-animated{ 903 max-height: none; 904 } 903 905 904 906 @media screen and (max-width: 768px) -
lf-hiker/trunk/gulpfile.js
r1833277 r1839607 2 2 //there are in files readme others version numbers: for releases, tested browsers, and the most important wordpress 3 3 4 var old_version = '1. 5.1';5 var version = '1. 6.0';4 var old_version = '1.6.0'; 5 var version = '1.7.0'; 6 6 var gulp = require('gulp'); 7 7 var less = require('gulp-less'); -
lf-hiker/trunk/lf-hiker.php
r1833277 r1839607 6 6 Author: epointal 7 7 Author URI: http://elisabeth.pointal.org/ 8 Version: 1. 6.08 Version: 1.7.0 9 9 License: GPL2 10 10 Text domain: lfh … … 12 12 13 13 if ( ! defined( 'ABSPATH' ) ) exit; 14 14 if( ! function_exists( "boolval")){ 15 function boolval( $var ){ 16 if( is_null( $var )){ 17 return false; 18 } 19 switch( gettype( $var)){ 20 case "boolean": 21 return $var; 22 break; 23 case "integer": 24 case "double": 25 if($var >0){ 26 return true; 27 }else{ 28 return false; 29 } 30 break; 31 case "string": 32 if( $var === "" || $var === "0" || $var === "false"){ 33 return false; 34 }else{ 35 return true; 36 } 37 break; 38 case "array": 39 if( count($var)>0){ 40 return true; 41 }else{ 42 return false; 43 } 44 break; 45 default: 46 return true; 47 } 48 } 49 } 15 50 16 51 class Lf_Hiker_Plugin 17 52 { 18 const VERSION = '1. 6.0';53 const VERSION = '1.7.0'; 19 54 20 55 private static $_controller; -
lf-hiker/trunk/package.json
r1833277 r1839607 1 1 { 2 2 "name": "lf-hiker", 3 "version": "1. 6.0",3 "version": "1.7.0", 4 4 "description": "plugin for wordpress for display track with profil elevation", 5 5 "main": "index.js", -
lf-hiker/trunk/readme.txt
r1833277 r1839607 7 7 Tested up to: 4.9 8 8 Stable tag: 1.0 9 Version: 1. 6.09 Version: 1.7.0 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 97 97 * Français (fr_FR) 98 98 * English (en_US) 99 * Deutsch (de_DE) 99 100 100 101 If you need language of **Lf Hiker** which is not included. You can easily translate with poedit from the file : … … 134 135 135 136 == Changelog == 137 = 1.7.0 = 138 * Fixed: no path displayed with mesmerize theme 139 * Evolution: add tiles Stamen Terrain 140 * Evolution: add german translation 141 * Fixed: conflict with divi theme and option Grab the first post image 142 * Fixed: function boolval do not exists (version php <5.5) 143 136 144 = 1.6.0 = 137 145 * Ability to choose the default map tiles
Note: See TracChangeset
for help on using the changeset viewer.