PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 1.7.1
Visualizer – Tables & Charts Manager with Built-in AI Generator v1.7.1
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 3.10.4 All 148 releases
← All changes | classes/Visualizer/Plugin.php +36 -76 3.1.31.7.1 View file →
@@ -1,5 +1,6 @@
1 1 <?php
2 +
2 3 // +----------------------------------------------------------------------+
3 4 // | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
4 5 // +----------------------------------------------------------------------+
5 6 // | This program is free software; you can redistribute it and/or modify |
@@ -26,61 +27,40 @@
26 27 * @since 1.0.0
27 28 */
28 29 class Visualizer_Plugin {
29 30
30 - const NAME = 'visualizer';
31 - const VERSION = '3.1.3';
31 + const NAME = 'visualizer';
32 + const VERSION = '1.7.1';
32 33
33 34 // custom post types
34 35 const CPT_VISUALIZER = 'visualizer';
35 36
36 37 // custom meta fields
37 - const CF_CHART_TYPE = 'visualizer-chart-type';
38 - const CF_SOURCE = 'visualizer-source';
39 - const CF_SERIES = 'visualizer-series';
38 + const CF_CHART_TYPE = 'visualizer-chart-type';
39 + const CF_SOURCE = 'visualizer-source';
40 + const CF_SERIES = 'visualizer-series';
40 41 const CF_DEFAULT_DATA = 'visualizer-default-data';
41 - const CF_SETTINGS = 'visualizer-settings';
42 + const CF_SETTINGS = 'visualizer-settings';
42 43
43 - const CF_SOURCE_FILTER = 'visualizer-source-filter';
44 - const CF_FILTER_CONFIG = 'visualizer-filter-config';
45 -
46 44 // custom actions
47 - const ACTION_GET_CHARTS = 'visualizer-get-charts';
45 + const ACTION_GET_CHARTS = 'visualizer-get-charts';
48 46 const ACTION_CREATE_CHART = 'visualizer-create-chart';
49 - const ACTION_EDIT_CHART = 'visualizer-edit-chart';
50 - const ACTION_CLONE_CHART = 'visualizer-clone-chart';
47 + const ACTION_EDIT_CHART = 'visualizer-edit-chart';
48 + const ACTION_CLONE_CHART = 'visualizer-clone-chart';
51 49 const ACTION_DELETE_CHART = 'visualizer-delete-chart';
52 - const ACTION_UPLOAD_DATA = 'visualizer-upload-data';
53 - const ACTION_EXPORT_DATA = 'visualizer-export-data';
50 + const ACTION_UPLOAD_DATA = 'visualizer-upload-data';
51 + // Added by Ash/Upwork
52 + const ACTION_EXPORT_DATA = 'visualizer-export-data';
54 53
55 - /**
56 - *Action used for fetching specific users/roles for permissions.
57 - */
58 - const ACTION_FETCH_PERMISSIONS_DATA = 'visualizer-fetch-permissions-data';
59 -
60 - /**
61 - *Action used for fetching db import data.
62 - */
63 - const ACTION_FETCH_DB_DATA = 'visualizer-fetch-db-data';
64 - const ACTION_SAVE_DB_QUERY = 'visualizer-save-db-query';
65 - const ACTION_SAVE_FILTER_QUERY = 'visualizer-save-filter-query';
66 -
67 54 // custom filters
68 55 const FILTER_CHART_WRAPPER_CLASS = 'visualizer-chart-wrapper-class';
69 - const FILTER_GET_CHART_SERIES = 'visualizer-get-chart-series';
70 - const FILTER_GET_CHART_DATA = 'visualizer-get-chart-data';
71 - const FILTER_GET_CHART_SETTINGS = 'visualizer-get-chart-settings';
72 - const FILTER_UNDO_REVISIONS = 'visualizer-undo-revisions';
73 - const FILTER_HANDLE_REVISIONS = 'visualizer-handle-revisions';
56 + const FILTER_GET_CHART_SERIES = 'visualizer-get-chart-series';
57 + const FILTER_GET_CHART_DATA = 'visualizer-get-chart-data';
58 + const FILTER_GET_CHART_SETTINGS = 'visualizer-get-chart-settings';
74 59
75 - const CF_DB_SCHEDULE = 'visualizer-db-schedule';
76 - const CF_DB_QUERY = 'visualizer-db-query';
77 -
78 - const CF_CHART_URL = 'visualizer-chart-url';
79 - const CF_CHART_SCHEDULE = 'visualizer-chart-schedule';
80 60 // Added by Ash/Upwork
81 - const PRO_TEASER_URL = 'http://themeisle.com/plugins/visualizer-charts-and-graphs-pro-addon/';
82 - const PRO_TEASER_TITLE = 'Check PRO version ';
61 + const PRO_TEASER_URL = 'http://themeisle.com/plugins/visualizer-charts-and-graphs-pro-addon/';
62 + const PRO_TEASER_TITLE = 'Check PRO version ';
83 63 // Added by Ash/Upwork
84 64 /**
85 65 * Singletone instance of the plugin.
86 66 *
@@ -107,15 +87,20 @@
107 87 * @since 1.0.0
108 88 *
109 89 * @access private
110 90 */
111 - private function __construct() {
112 - if ( VISUALIZER_DEBUG ) {
113 - add_action( 'themeisle_log_event', array( $this, 'themeisle_log_event_debug' ), 10, 5 );
114 - }
115 - }
91 + private function __construct() {}
116 92
117 93 /**
94 + * Private clone method.
95 + *
96 + * @since 1.0.0
97 + *
98 + * @access private
99 + */
100 + private function __clone() {}
101 +
102 + /**
118 103 * Returns singletone instance of the plugin.
119 104 *
120 105 * @since 1.0.0
121 106 *
@@ -131,31 +116,14 @@
131 116 return self::$_instance;
132 117 }
133 118
134 119 /**
135 - * Returns chart types.
136 - *
137 - * @since 1.0.0
138 - *
139 - * @static
140 - * @access public
141 - * @return array
142 - */
143 - public static function getChartTypes() {
144 - $array = array_keys( Visualizer_Module_Admin::_getChartTypesLocalized() );
145 -
146 - return $array;
147 - }
148 -
149 - /**
150 120 * Returns a module if it was registered before. Otherwise NULL.
151 121 *
152 122 * @since 1.0.0
153 123 *
154 124 * @access public
155 - *
156 125 * @param string $name The name of the module to return.
157 - *
158 126 * @return Visualizer_Module|null Returns a module if it was registered or NULL.
159 127 */
160 128 public function getModule( $name ) {
161 129 return isset( $this->_modules[ $name ] ) ? $this->_modules[ $name ] : null;
@@ -166,11 +134,9 @@
166 134 *
167 135 * @since 1.0.0
168 136 *
169 137 * @access public
170 - *
171 138 * @param string $name The name of a module to check.
172 - *
173 139 * @return boolean TRUE if the module has been registered. Otherwise FALSE.
174 140 */
175 141 public function hasModule( $name ) {
176 142 return isset( $this->_modules[ $name ] );
@@ -181,9 +147,8 @@
181 147 *
182 148 * @since 1.0.0
183 149 *
184 150 * @access public
185 - *
186 151 * @param string $class The name of the module to use in the plugin.
187 152 */
188 153 public function setModule( $class ) {
189 154 $this->_modules[ $class ] = new $class( $this );
@@ -189,24 +154,19 @@
189 154 $this->_modules[ $class ] = new $class( $this );
190 155 }
191 156
192 157 /**
193 - * Private clone method.
158 + * Returns chart types.
194 159 *
195 160 * @since 1.0.0
196 161 *
197 - * @access private
162 + * @static
163 + * @access public
164 + * @return array
198 165 */
199 - private function __clone() {
200 - }
201 -
202 - /**
203 - * For local testing, overrides the 'themeisle_log_event' hook and redirects to error.log.
204 - */
205 - final function themeisle_log_event_debug( $name, $message, $type, $file, $line ) {
206 - if ( Visualizer_Plugin::NAME !== $name ) {
207 - return;
208 - }
209 - error_log( sprintf( '%s (%s): %s in %s:%s', $name, $type, $message, $file, $line ) );
166 + public static function getChartTypes() {
167 + $array = array_keys( Visualizer_Module_Admin::_getChartTypesLocalized() );
168 + unset( $array[0] ); // all
169 + return $array;
210 170 }
211 171
212 172 }