WordPress Charts and Graphs Lite - Version 1.6.0

Version Description

  • Fixed security issue when importing charts
  • Removed pointer for the pro version
  • Fixed charts import from media library
  • Added support to show legend on the left side
Download this release

Release Info

Developer codeinwp
Plugin Icon WordPress Charts and Graphs Lite
Version 1.6.0
Comparing to
See all releases

Code changes from version 1.5.6 to 1.6.0

classes/Visualizer/Module/Admin.php CHANGED
@@ -58,76 +58,10 @@ class Visualizer_Module_Admin extends Visualizer_Module {
58
  $this->_addAction( 'admin_footer', 'renderTempaltes' );
59
  $this->_addAction( 'admin_enqueue_scripts', 'enqueueLibraryScripts' );
60
  $this->_addAction( 'admin_menu', 'registerAdminMenu' );
61
- // Added by Ash/Upwork for feedback
62
- $this->_addAction( 'admin_init', 'visualizerInitFeedback' );
63
- // Added by Ash/Upwork for feedback
64
 
65
  $this->_addFilter( 'media_view_strings', 'setupMediaViewStrings' );
66
  $this->_addFilter( 'plugin_action_links', 'getPluginActionLinks', 10, 2 );
67
  $this->_addFilter( 'plugin_row_meta', 'getPluginMetaLinks', 10, 2 );
68
- $this->_addFilter( 'visualizer_admin_pointers', 'visualizerAdminPointers', 10, 2 );
69
- // Added by Ash/Upwork for feedback
70
- $this->_addFilter( 'visualizer_feedback_enqueue', 'visualizerFeedbackEnqueue', 10, 2 );
71
- $this->_addFilter( 'visualizer_feedback', 'visualizerFeedback', 10, 2 );
72
- $this->_addFilter( 'visualizer_feedback_config', 'visualizerFeedbackConfig', 10, 2 );
73
- $this->_addFilter( 'visualizer_feedback_action', 'visualizerFeedbackAction', 10, 2 );
74
- // Added by Ash/Upwork for feedback
75
- }
76
-
77
- // Added by Ash/Upwork for feedback
78
- function visualizerFeedbackConfig(){
79
- return array(
80
- "title" => "TITLE",
81
- "description" => "Message that will ask the user for review",
82
- "yes_btn_txt" => "Text to show on yes btn ",
83
- "no_btn_txt" => "txt to show on no btn",
84
- "yes_btn_link" => "link to redirect when click on the yes btn",
85
- );
86
- }
87
-
88
- function visualizerFeedbackAction(){
89
- return array("type"=>"splash","action"=>array("type"=>"click","target"=>".add-new-h2"));
90
- }
91
-
92
- function visualizerFeedback(){
93
- return true;
94
- }
95
-
96
- function visualizerInitFeedback(){
97
- $file = trailingslashit(VISUALIZER_ABSPATH) . "feedback/PluginFeedbackTI.php";
98
- if (file_exists($file)) {
99
- include_once $file;
100
- new PluginFeedbackTI(Visualizer_Plugin::NAME, 1, Visualizer_Plugin::VERSION, "visualizer_feedback", "visualizer_feedback_config", "visualizer_feedback_action", "visualizer_feedback_enqueue");
101
- }
102
- }
103
-
104
- function visualizerFeedbackEnqueue(){
105
- wp_register_script("ti-feedback-func", VISUALIZER_ABSURL . 'js/feedback-func.js');
106
- wp_enqueue_script("ti-feedback-func");
107
- }
108
- // Added by Ash/Upwork for feedback
109
-
110
- /**
111
- * Returns wp pointers for visualizer
112
- *
113
- * @since 1.5
114
- *
115
- * @static
116
- * @access private
117
- * @return array The associated array of pointer
118
- */
119
- function visualizerAdminPointers( $p ) {
120
- $p['visualizer'] = array(
121
- 'target' => '#menu-media',
122
- 'options' => array(
123
- 'content' => sprintf( '<h3> %s </h3> <p> %s </p>',
124
- __( 'Visualizer New Features ' , Visualizer_Plugin::NAME),
125
- __( 'Right now the Visualizer Charts and Graphics plugin integrates a live editor and a new importing option for your charts. ',Visualizer_Plugin::NAME)
126
- ),
127
- 'position' => array( 'edge' => 'top', 'align' => 'middle' )
128
- )
129
- );
130
- return $p;
131
  }
132
 
133
  /**
@@ -175,7 +109,7 @@ class Visualizer_Module_Admin extends Visualizer_Module {
175
 
176
  wp_enqueue_script( 'visualizer-google-jsapi-new', '//www.gstatic.com/charts/loader.js', array( 'media-editor' ), null, true );
177
  wp_enqueue_script( 'visualizer-google-jsapi-old', '//www.google.com/jsapi', array( 'visualizer-google-jsapi-new' ), null, true );
178
- wp_enqueue_script( 'visualizer-media-model', VISUALIZER_ABSURL . 'js/media/model.js', array( 'visualizer-google-jsapi' ), Visualizer_Plugin::VERSION, true );
179
  wp_enqueue_script( 'visualizer-media-collection', VISUALIZER_ABSURL . 'js/media/collection.js', array( 'visualizer-media-model' ), Visualizer_Plugin::VERSION, true );
180
  wp_enqueue_script( 'visualizer-media-controller', VISUALIZER_ABSURL . 'js/media/controller.js', array( 'visualizer-media-collection' ), Visualizer_Plugin::VERSION, true );
181
  wp_enqueue_script( 'visualizer-media-view', VISUALIZER_ABSURL . 'js/media/view.js', array( 'visualizer-media-controller' ), Visualizer_Plugin::VERSION, true );
@@ -258,46 +192,6 @@ class Visualizer_Module_Admin extends Visualizer_Module {
258
  wp_enqueue_script( 'google-jsapi-old', '//www.google.com/jsapi', array('google-jsapi-new'), null, true );
259
  wp_enqueue_script( 'visualizer-render', VISUALIZER_ABSURL . 'js/render.js', array( 'google-jsapi-old', 'visualizer-library' ), Visualizer_Plugin::VERSION, true );
260
  }
261
- if ( get_bloginfo( 'version' ) < '3.3' )
262
- return;
263
-
264
-
265
- // Get pointers for this screen
266
- $pointers = apply_filters( 'visualizer_admin_pointers', array() );
267
-
268
- if ( ! $pointers || ! is_array( $pointers ) )
269
- return;
270
-
271
- // Get dismissed pointers
272
- $dismissed = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );
273
- $valid_pointers =array();
274
- // Check pointers and remove dismissed ones.
275
- foreach ( $pointers as $pointer_id => $pointer ) {
276
-
277
- // Sanity check
278
- if ( in_array( $pointer_id, $dismissed ) || empty( $pointer ) || empty( $pointer_id ) || empty( $pointer['target'] ) || empty( $pointer['options'] ) )
279
- continue;
280
-
281
- $pointer['pointer_id'] = $pointer_id;
282
-
283
- // Add the pointer to $valid_pointers array
284
- $valid_pointers['pointers'][] = $pointer;
285
- }
286
-
287
- // No valid pointers? Stop here.
288
- if ( empty( $valid_pointers ) )
289
- return;
290
-
291
- // Add pointers style to queue.
292
- wp_enqueue_style( 'wp-pointer' );
293
- // Add pointers script to queue. Add custom script.
294
- wp_enqueue_script( 'visualizer-pointer', VISUALIZER_ABSURL."js/visualizer-pointer.js", array( 'wp-pointer' ),Visualizer_Plugin::VERSION );
295
-
296
- // Add pointer options to script.
297
- wp_localize_script( 'visualizer-pointer', 'visualizer', $valid_pointers );
298
-
299
-
300
-
301
  }
302
 
303
  /**
58
  $this->_addAction( 'admin_footer', 'renderTempaltes' );
59
  $this->_addAction( 'admin_enqueue_scripts', 'enqueueLibraryScripts' );
60
  $this->_addAction( 'admin_menu', 'registerAdminMenu' );
 
 
 
61
 
62
  $this->_addFilter( 'media_view_strings', 'setupMediaViewStrings' );
63
  $this->_addFilter( 'plugin_action_links', 'getPluginActionLinks', 10, 2 );
64
  $this->_addFilter( 'plugin_row_meta', 'getPluginMetaLinks', 10, 2 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  }
66
 
67
  /**
109
 
110
  wp_enqueue_script( 'visualizer-google-jsapi-new', '//www.gstatic.com/charts/loader.js', array( 'media-editor' ), null, true );
111
  wp_enqueue_script( 'visualizer-google-jsapi-old', '//www.google.com/jsapi', array( 'visualizer-google-jsapi-new' ), null, true );
112
+ wp_enqueue_script( 'visualizer-media-model', VISUALIZER_ABSURL . 'js/media/model.js', array( 'visualizer-google-jsapi-old' ), Visualizer_Plugin::VERSION, true );
113
  wp_enqueue_script( 'visualizer-media-collection', VISUALIZER_ABSURL . 'js/media/collection.js', array( 'visualizer-media-model' ), Visualizer_Plugin::VERSION, true );
114
  wp_enqueue_script( 'visualizer-media-controller', VISUALIZER_ABSURL . 'js/media/controller.js', array( 'visualizer-media-collection' ), Visualizer_Plugin::VERSION, true );
115
  wp_enqueue_script( 'visualizer-media-view', VISUALIZER_ABSURL . 'js/media/view.js', array( 'visualizer-media-controller' ), Visualizer_Plugin::VERSION, true );
192
  wp_enqueue_script( 'google-jsapi-old', '//www.google.com/jsapi', array('google-jsapi-new'), null, true );
193
  wp_enqueue_script( 'visualizer-render', VISUALIZER_ABSURL . 'js/render.js', array( 'google-jsapi-old', 'visualizer-library' ), Visualizer_Plugin::VERSION, true );
194
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  }
196
 
197
  /**
classes/Visualizer/Module/Chart.php CHANGED
@@ -132,7 +132,7 @@ class Visualizer_Module_Chart extends Visualizer_Module {
132
  ) )
133
  );
134
 
135
- $filter = filter_input( INPUT_GET, 'filter' );
136
  if ( $filter && in_array( $filter, Visualizer_Plugin::getChartTypes() ) ) {
137
  $query_args['meta_query'] = array(
138
  array(
132
  ) )
133
  );
134
 
135
+ $filter = filter_input( INPUT_GET, 'filter', FILTER_SANITIZE_STRING );
136
  if ( $filter && in_array( $filter, Visualizer_Plugin::getChartTypes() ) ) {
137
  $query_args['meta_query'] = array(
138
  array(
classes/Visualizer/Plugin.php CHANGED
@@ -30,7 +30,7 @@
30
  class Visualizer_Plugin {
31
 
32
  const NAME = 'visualizer';
33
- const VERSION = '1.5.5';
34
 
35
  // custom post types
36
  const CPT_VISUALIZER = 'visualizer';
30
  class Visualizer_Plugin {
31
 
32
  const NAME = 'visualizer';
33
+ const VERSION = '1.6.0';
34
 
35
  // custom post types
36
  const CPT_VISUALIZER = 'visualizer';
classes/Visualizer/Render/Library.php CHANGED
@@ -91,7 +91,6 @@ class Visualizer_Render_Library extends Visualizer_Render {
91
  if(isset($_GET["filter"]) && strlen($_GET["filter"]) > 0){
92
  $filterBy = filter_input( INPUT_GET, "filter", FILTER_SANITIZE_STRING );
93
  }
94
- $action = $_SERVER["REQUEST_URI"];
95
  echo '<div id="visualizer-search"><form action="" method="get">
96
  <input type="text" name="filter" value="' . $filterBy . '">
97
  <input type="hidden" name="page" value="visualizer">
@@ -104,11 +103,11 @@ class Visualizer_Render_Library extends Visualizer_Render {
104
  foreach ( $this->types as $type => $label ) {
105
  echo '<li class="visualizer-list-item">';
106
  if ( $type == $this->type ) {
107
- echo '<a class="page-numbers current" href="', add_query_arg( 'vpage', false ), '">';
108
  echo $label;
109
  echo '</a>';
110
  } else {
111
- echo '<a class="page-numbers" href="', add_query_arg( array( 'type' => $type, 'vpage' => false ) ), '">';
112
  echo $label;
113
  echo '</a>';
114
  }
91
  if(isset($_GET["filter"]) && strlen($_GET["filter"]) > 0){
92
  $filterBy = filter_input( INPUT_GET, "filter", FILTER_SANITIZE_STRING );
93
  }
 
94
  echo '<div id="visualizer-search"><form action="" method="get">
95
  <input type="text" name="filter" value="' . $filterBy . '">
96
  <input type="hidden" name="page" value="visualizer">
103
  foreach ( $this->types as $type => $label ) {
104
  echo '<li class="visualizer-list-item">';
105
  if ( $type == $this->type ) {
106
+ echo '<a class="page-numbers current" href="', esc_url(add_query_arg( 'vpage', false )), '">';
107
  echo $label;
108
  echo '</a>';
109
  } else {
110
+ echo '<a class="page-numbers" href="', esc_url(add_query_arg( array( 'type' => $type, 'vpage' => false ) )), '">';
111
  echo $label;
112
  echo '</a>';
113
  }
classes/Visualizer/Render/Sidebar.php CHANGED
@@ -98,6 +98,7 @@ abstract class Visualizer_Render_Sidebar extends Visualizer_Render {
98
 
99
  $this->_legendPositions = array(
100
  '' => '',
 
101
  'right' => esc_html__( 'Right of the chart', Visualizer_Plugin::NAME ),
102
  'top' => esc_html__( 'Above the chart', Visualizer_Plugin::NAME ),
103
  'bottom' => esc_html__( 'Below the chart', Visualizer_Plugin::NAME ),
98
 
99
  $this->_legendPositions = array(
100
  '' => '',
101
+ 'left' => esc_html__( 'Left of the chart', Visualizer_Plugin::NAME ),
102
  'right' => esc_html__( 'Right of the chart', Visualizer_Plugin::NAME ),
103
  'top' => esc_html__( 'Above the chart', Visualizer_Plugin::NAME ),
104
  'bottom' => esc_html__( 'Below the chart', Visualizer_Plugin::NAME ),
css/media.css CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  #visualizer-library-view {
2
  padding: 30px 10px 10px 30px;
3
  }
1
+ /*
2
+ Version: 1.5.6
3
+ */
4
  #visualizer-library-view {
5
  padding: 30px 10px 10px 30px;
6
  }
index.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
3
- Plugin Name: Visualizer: Charts and Graphs
4
- Plugin URI: https://themeisle.com/plugins/visualizer-charts-and-graphs/
5
  Description: A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages. The plugin uses Google Visualization API to render charts, which supports cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
6
- Version: 1.5.6
7
  Author: Themeisle
8
  Author URI: http://themeisle.com
9
  License: GPL v2.0 or later
@@ -109,9 +109,6 @@ function visualizer_launch() {
109
  if ( $doing_ajax ) {
110
  // set ajax modules
111
  $plugin->setModule( Visualizer_Module_Chart::NAME );
112
- // Added by Ash/Upwork for feedback
113
- $plugin->setModule( Visualizer_Module_Admin::NAME );
114
- // Added by Ash/Upwork for feedback
115
  } else {
116
  if ( is_admin() ) {
117
  // set admin modules
1
  <?php
2
  /*
3
+ Plugin Name: Visualizer: Charts and Graphs Lite
4
+ Plugin URI: https://themeisle.com/plugins/visualizer-charts-and-graphs-lite/
5
  Description: A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages. The plugin uses Google Visualization API to render charts, which supports cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
6
+ Version: 1.6.0
7
  Author: Themeisle
8
  Author URI: http://themeisle.com
9
  License: GPL v2.0 or later
109
  if ( $doing_ajax ) {
110
  // set ajax modules
111
  $plugin->setModule( Visualizer_Module_Chart::NAME );
 
 
 
112
  } else {
113
  if ( is_admin() ) {
114
  // set admin modules
js/feedback-func.js DELETED
@@ -1,3 +0,0 @@
1
- function visualizer154(funcOnSuccess){
2
- // do something?
3
- }
 
 
 
js/render.js CHANGED
@@ -53,6 +53,11 @@
53
  }
54
  }
55
  }
 
 
 
 
 
56
  break;
57
  case 'geo':
58
  if (settings.region != undefined && settings.region.replace(/^\s+|\s+$/g, '') == '') {
@@ -87,6 +92,11 @@
87
  }
88
  }
89
  }
 
 
 
 
 
90
  break;
91
  default:
92
  return;
53
  }
54
  }
55
  }
56
+
57
+ if (settings.series && settings.legend && settings.legend.position == "left")
58
+ {
59
+ settings.targetAxisIndex = 1;
60
+ }
61
  break;
62
  case 'geo':
63
  if (settings.region != undefined && settings.region.replace(/^\s+|\s+$/g, '') == '') {
92
  }
93
  }
94
  }
95
+
96
+ if (settings.series && settings.legend && settings.legend.position == "left")
97
+ {
98
+ settings.targetAxisIndex = 1;
99
+ }
100
  break;
101
  default:
102
  return;
js/visualizer-pointer.js DELETED
@@ -1,17 +0,0 @@
1
- jQuery(document).ready( function($) {
2
- visualizer_pointer_open_pointer(0);
3
- function visualizer_pointer_open_pointer(i) {
4
- if(visualizer.pointers[i]) {
5
- pointer = visualizer.pointers[i];
6
- options = $.extend(pointer.options, {
7
- close: function () {
8
- $.post(ajaxurl, {
9
- pointer: pointer.pointer_id,
10
- action: 'dismiss-wp-pointer'
11
- });
12
- }
13
- });
14
- $(pointer.target).pointer(options).pointer('open');
15
- }
16
- }
17
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,8 +1,8 @@
1
- === WordPress Charts and Graphs ===
2
  Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle
3
  Tags: chart, charts, charting, graph, graphs, graphing, visualisation, visualise data, visualization, visualize data, HTML5, canvas, pie chart, line chart, bar chart, column chart, gauge chart, area chart, scatter chart, candlestick chart, geo chart, google visualization api
4
  Requires at least: 3.5
5
- Tested up to: 4.5.3
6
  Stable tag: trunk
7
  License: GPL v2.0 or later
8
  License URI: http://www.opensource.org/licenses/gpl-license.php
@@ -11,7 +11,7 @@ A simple and quite powerful WordPress chart plugin to create, manage and embed i
11
 
12
  == Description ==
13
 
14
- <a href="http://themeisle.com/plugins/visualizer-charts-and-graphs/" rel="friend">WordPress Visualizer plugin</a> is a simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages.
15
 
16
  The plugin uses Google Visualization API to add charts, which support cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
17
 
@@ -70,6 +70,13 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
70
 
71
  == Changelog ==
72
 
 
 
 
 
 
 
 
73
  = 1.5.6 =
74
  * Added support for 3 more chart types
75
  * Fixed issue with charts not saving
1
+ === WordPress Charts and Graphs Lite ===
2
  Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle
3
  Tags: chart, charts, charting, graph, graphs, graphing, visualisation, visualise data, visualization, visualize data, HTML5, canvas, pie chart, line chart, bar chart, column chart, gauge chart, area chart, scatter chart, candlestick chart, geo chart, google visualization api
4
  Requires at least: 3.5
5
+ Tested up to: 4.6
6
  Stable tag: trunk
7
  License: GPL v2.0 or later
8
  License URI: http://www.opensource.org/licenses/gpl-license.php
11
 
12
  == Description ==
13
 
14
+ <a href="http://themeisle.com/plugins/visualizer-charts-and-graphs-lite/" rel="friend">WordPress Visualizer plugin</a> is a simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages.
15
 
16
  The plugin uses Google Visualization API to add charts, which support cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
17
 
70
 
71
  == Changelog ==
72
 
73
+ = 1.6.0 =
74
+ * Fixed security issue when importing charts
75
+ * Removed pointer for the pro version
76
+ * Fixed charts import from media library
77
+ * Added support to show legend on the left side
78
+
79
+
80
  = 1.5.6 =
81
  * Added support for 3 more chart types
82
  * Fixed issue with charts not saving