Changeset 1401430
- Timestamp:
- 04/21/2016 03:41:16 PM (10 years ago)
- Location:
- wp-d3/trunk
- Files:
-
- 1 added
- 3 deleted
- 3 edited
-
js/d3.3.4.13.min.js (deleted)
-
js/d3.3.5.16.min.js (added)
-
js/d3.3.5.5.min.js (deleted)
-
js/d3.v3.min.js (deleted)
-
readme.txt (modified) (4 diffs)
-
utils.php (modified) (1 diff)
-
wp-d3.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-d3/trunk/readme.txt
r1110778 r1401430 4 4 Tags: d3, visualization, javascript, svg, charts 5 5 Requires at least: 3.0 6 Tested up to: 4. 17 Stable tag: 2. 26 Tested up to: 4.5 7 Stable tag: 2.3 8 8 License: GPL2 9 9 … … 51 51 Added Preview button and minor fixes. 52 52 53 = 2.3 = 54 Fixed accidental enablement of 'wpautop' plugin. 55 D3.js version updated to v3.5.15. 56 53 57 == Screenshots == 54 58 … … 59 63 60 64 == Changelog == 61 = 1.0.0 = 62 * First commit. Basic tag functionality, [d3-link], [d3 canvas="canvas"] 63 = 1.1 = 64 * Fixed d3 snippet insertion, now the code output is shown where it has been inserted inside the post. 65 = 2.3 = 66 * Fixed a bug that enabled 'wpautop' and 'wptexturize' plugins. 67 * Updated D3 library to D3 v3.5.16 68 * Validated up to Wordpress v4.5 69 = 2.2 = 70 * Added Preview button to the Wp-D3 editor. 71 * Fixed bug that made generated code not to be valid when the chart contains "p" (HTML paragraph) hardcoded strings. 72 * Updated D3 library to D3 v3.5.5 73 * Validated up to Wordpress v4.1 74 = 2.1.2 = 75 * Removed nasty bug that made charts overlap when multiple charts had same javascript variables. 76 = 2.1.1 = 77 * Added WPD3_CHART_ID feature: the constant WPD3_CHART_ID can be used instead of the chart title and the 78 plugin will generate an ID automatically. 79 * Updated D3.js to version 3.4.13 80 * Updated ACE editor to version 1.1.7 81 * Validation of the Wp-D3 plugin with Wordpress 4.0 82 = 2.0 = 83 * New interface added to edit and save D3 code without interfering with post content by means of a 84 * javascript editor providing syntax highlightning, syntax error warnings and tab indentation. 85 = 1.2.2 = 86 * Fixed plugin initialization bug that generated a wrong js script include. 87 * The [d3-link] tag is now optional and can be skipped if nothing needs to be included. 88 * The shipped d3.js version has been updated to D3 v3.3.10 89 = 1.2.1 = 90 * Implemented workaround to keep '&' symbols inside javascript code without unicode conversion. 65 91 = 1.2 = 66 92 * Fixed bug that provoked wpautop and wptexturize to be disabled permanently. … … 69 95 * Updated D3 shipped version to last 3.3.3 70 96 * The plugin now uses the lighter d3.v3.min.js (instead of d3.v3.js). 71 = 1.2.1 = 72 * Implemented workaround to keep '&' symbols inside javascript code without unicode conversion. 73 = 1.2.2 = 74 * Fixed plugin initialization bug that generated a wrong js script include. 75 * The [d3-link] tag is now optional and can be skipped if nothing needs to be included. 76 * The shipped d3.js version has been updated to D3 v3.3.10 77 = 2.0 = 78 * New interface added to edit and save D3 code without interfering with post content by means of a 79 * javascript editor providing syntax highlightning, syntax error warnings and tab indentation. 80 = 2.1.1 = 81 * Added WPD3_CHART_ID feature: the constant WPD3_CHART_ID can be used instead of the chart title and the 82 plugin will generate an ID automatically. 83 * Updated D3.js to version 3.4.13 84 * Updated ACE editor to version 1.1.7 85 * Validation of the Wp-D3 plugin with Wordpress 4.0 86 = 2.1.2 = 87 * Removed nasty bug that made charts overlap when multiple charts had same javascript variables. 88 = 2.2 = 89 * Added Preview button to the Wp-D3 editor. 90 * Fixed bug that made generated code not to be valid when the chart contains "<p>" hardcoded strings. 91 * Updated D3 library to D3 v3.5.5 92 * Validated up to Wordpress v4.1 97 = 1.1 = 98 * Fixed d3 snippet insertion, now the code output is shown where it has been inserted inside the post. 99 = 1.0.0 = 100 * First commit. Basic tag functionality, [d3-link], [d3 canvas="canvas"] -
wp-d3/trunk/utils.php
r1110778 r1401430 139 139 } 140 140 echo "<html><head>" 141 . getJavaScriptInclude (plugins_url('wp-d3/js/d3.3.5. 5.min.js'))141 . getJavaScriptInclude (plugins_url('wp-d3/js/d3.3.5.16.min.js')) 142 142 . $result 143 143 . "</head>" -
wp-d3/trunk/wp-d3.php
r1110778 r1401430 1 1 <?php 2 2 /* 3 Plugin Name: W ordpress-d3.js3 Plugin Name: Wp-D3 4 4 Plugin URI: http://wordpress.org/extend/plugins/wp-d3/ 5 5 Description: D3 is a very popular visualization library written in Javascript. This plugins provides a set of tags to link page/post content to d3.js libraries in order to visualize the javascript snippets inside Wordpress. 6 6 All javascript code can be added directly to the posts by means of a custom javascript code editor (Wp-D3 Chart Manager) 7 Version: 2. 27 Version: 2.3 8 8 Author: Ruben Afonso 9 9 Author URI: http://www.figurebelow.com … … 18 18 */ 19 19 function wordpressd3_init() { 20 wp_enqueue_script ('d3', plugins_url('/js/d3.3.5. 5.min.js',__FILE__), array(), '1.0.0', false);20 wp_enqueue_script ('d3', plugins_url('/js/d3.3.5.16.min.js',__FILE__), array(), '1.0.0', false); 21 21 } 22 22 … … 98 98 /* 99 99 * This function restores the ampersand that the inner wordpress behaviour changed somehow. 100 * In the end, no forums nor docs seem to agree how to fix this, but this workaround works.100 * In the end, no forums nor docs seem to agree on how to fix this, but this workaround works. 101 101 * The first ampersand code is replaced when the post is edited in Visual Mode. 102 102 * The second ampersand code is replaced by wordpress itself. … … 114 114 add_action( 'wp_ajax_wpd3dialog_action', 'dialog'); 115 115 116 // remove wpautop and wptexturize for a while 117 remove_filter('the_content', 'wptexturize'); 118 remove_filter('the_content', 'wpautop' ); 116 // remove wpautop and wptexturize for a while if they were enabled 117 118 $isWpAutoEnabled = has_filter ('the_content', 'wpautop'); 119 if (isWpAutoEnabled) { 120 remove_filter('the_content', 'wpautop' ); 121 } 122 123 $isWpTexturizeEnabled = has_filter('the_content', 'wptexturize'); 124 if (isWpTexturizeEnabled) { 125 remove_filter('the_content', 'wptexturize'); 126 } 119 127 120 128 add_action( 'init', 'buttons_init'); 121 122 129 add_action('init', 'wordpressd3_init'); 123 130 add_shortcode("d3-link", "include_resources"); … … 125 132 126 133 // and added again with less priority. 127 add_filter( 'the_content', 'wpautop' , 90); 128 add_filter( 'the_content', 'wptexturize' , 90); 134 if (isWpAutoEnabled) { 135 add_filter( 'the_content', 'wpautop' , 90); 136 } 137 if (isWpTexturizeEnabled) { 138 add_filter( 'the_content', 'wptexturize' , 90); 139 } 129 140 130 141 /* Added with even less priority to make sure it's executed at the end
Note: See TracChangeset
for help on using the changeset viewer.