Changeset 1531035
- Timestamp:
- 11/09/2016 02:44:19 PM (9 years ago)
- Location:
- charty/trunk
- Files:
-
- 4 edited
-
charty.php (modified) (8 diffs)
-
languages/charty-fr_FR.mo (modified) (previous)
-
languages/charty-fr_FR.po (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
charty/trunk/charty.php
r1529960 r1531035 4 4 Description: Create and manage google geographic charts and maps. It's a useful tool to display demographic data on geographic charts but also on google maps (there is a Map display mode). 5 5 You can also customize your geographic charts (title, content, context, background, color gradient...). 6 Version: 1. 06 Version: 1.1 7 7 Author: Paul-Adrien Bru 8 8 Author URI: https://www.pa-bru.fr/ … … 57 57 protected $continents_and_subs; 58 58 const DESCRIPTION_MAX_LENGTH = 200; 59 const DEFAULT_HEIGHT = 600; 59 60 60 61 public static function get_instance(){ … … 105 106 $this->plugin_path = plugin_dir_path( __FILE__ ); 106 107 $this->plugin_url = plugin_dir_url( __FILE__ ); 107 $this->plugin_version = '1. 0';108 $this->plugin_version = '1.1'; 108 109 $this->plugin_l10n = 'charty'; 109 110 $this->countries = require_once( $this->plugin_path . 'inc/countries.php'); … … 196 197 $charty_maps_api_key = get_post_meta($post->ID,'_charty_maps_api_key',true); 197 198 $charty_type = get_post_meta($post->ID,'_charty_type',true); 199 $charty_height = get_post_meta($post->ID,'_charty_height',true); 198 200 199 201 //map type : … … 234 236 </div> 235 237 <!-- END CHARTY GOOGLE MAPS API KEY --> 238 239 <!-- START CHARTY HEIGHT --> 240 <div class="meta-box-item-title"> 241 <h4> 242 <?php 243 _e('The height of the chart (in pixel)', $this->plugin_l10n); 244 ?> 245 </h4> 246 </div> 247 248 <div class="meta-box-item-content"> 249 <input style="width:20%" type="number" name="charty_height" id="charty_height" value="<?php echo $charty_height;?>" required /> 250 </div> 251 <!-- END CHARTY HEIGHT --> 236 252 237 253 <!-- START CHARTY DESCRIPTION --> … … 480 496 update_post_meta($post_ID,'_charty_type', sanitize_text_field($_POST['charty_type'])); 481 497 update_post_meta($post_ID,'_charty_description', sanitize_text_field($_POST['charty_description'])); 498 update_post_meta($post_ID,'_charty_height', sanitize_text_field($_POST['charty_height'])); 482 499 483 500 $charty_labels = $_POST['charty_labels']; … … 547 564 //Charty type : 548 565 $charty_type = get_post_meta($atts['id'],'_charty_type',true); 566 567 //Charty height : 568 if(!empty(get_post_meta($atts['id'],'_charty_height',true))){ 569 $charty_height = get_post_meta($atts['id'],'_charty_height',true) . "px"; 570 } else{ 571 $charty_height = self::DEFAULT_HEIGHT . "px"; 572 } 573 549 574 550 575 //title : … … 666 691 */ 667 692 $display_charty = '<h2>'.$charty_title.'</h2>' 668 .'<div id="charty_'.$atts['id'].'" style="height: 600px;"></div>'693 .'<div id="charty_'.$atts['id'].'" style="height: '. $charty_height .';"></div>' 669 694 .'<p style="text-align:center;font-style:italic;">'.$charty_description.'</p>'; 670 695 -
charty/trunk/languages/charty-fr_FR.po
r1529960 r1531035 234 234 msgid "A new default Google Maps API Key is successfully added" 235 235 msgstr "Une nouvelle clé d'API Google Maps a bien été enregistrée" 236 237 msgid "The height of the chart (in pixel)" 238 msgstr "La hauteur du schéma/de la carte (en pixel)" -
charty/trunk/readme.txt
r1529960 r1531035 77 77 == Frequently Asked Questions == 78 78 79 = Can I insert several charts with charty on the same page ? =79 = Can I insert several charts with charty on the same page ? = 80 80 81 81 NO. But in the next version you will be able to add several charties on the same page. 82 83 = Chart Height ? width ? responsive charts ? whats going on ? =84 85 Soon. At the moment it's static :86 * width: automatic87 * height: 600px88 82 89 83 == Screenshots == … … 95 89 == Changelog == 96 90 91 = 1.1 = 92 * Added height parameter. Now you can choose a height for your chart box. 93 97 94 = 1.0 = 98 95 * Initial Version
Note: See TracChangeset
for help on using the changeset viewer.