PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 2.1.8
Visualizer – Tables & Charts Manager with Built-in AI Generator v2.1.8
4.0.8 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 All 149 releases
← All changes | classes/Visualizer/Render/Page/Data.php +93 -233 3.0.72.1.8 View file →
@@ -58,82 +58,80 @@
58 58 *
59 59 * @access protected
60 60 */
61 61 protected function _renderSidebarContent() {
62 - $upload_link = add_query_arg(
63 - array(
64 - 'action' => Visualizer_Plugin::ACTION_UPLOAD_DATA,
65 - 'nonce' => wp_create_nonce(),
66 - 'chart' => $this->chart->ID,
67 - ), admin_url( 'admin-ajax.php' )
68 - );
62 + $upload_link = add_query_arg( array(
63 + 'action' => Visualizer_Plugin::ACTION_UPLOAD_DATA,
64 + 'nonce' => wp_create_nonce(),
65 + 'chart' => $this->chart->ID,
66 + ), admin_url( 'admin-ajax.php' ) );
69 67 ?>
70 68 <span id="visualizer-chart-id" data-id="<?php echo $this->chart->ID; ?>"></span>
71 69 <iframe id="thehole" name="thehole"></iframe>
72 - <ul class="viz-group-wrapper full-height">
73 - <li class="viz-group viz-group-category open" id="vz-chart-source">
74 - <div class="viz-group-header">
75 - <h2 class="viz-group-title viz-main-group"><?php _e( 'Chart Data', 'visualizer' ); ?></h2>
70 + <ul class="group-wrapper full-height">
71 + <li class="group group-category open" id="vz-chart-source">
72 + <div class="group-header">
73 + <h2 class="group-title main-group"><?php _e( 'Chart Data', 'visualizer' ); ?></h2>
76 74 </div>
77 - <ul class="viz-group-content">
78 - <ul class="viz-group-wrapper">
79 - <li class="viz-group">
80 - <h2 class="viz-group-title viz-sub-group visualizer-src-tab"><?php _e( 'Import data from file', 'visualizer' ); ?></h2>
81 - <div class="viz-group-content">
82 - <p class="viz-group-description"><?php esc_html_e( 'Select and upload your data CSV file here. The first row of the CSV file should contain the column headings. The second one should contain series type (string, number, boolean, date, datetime, timeofday).', 'visualizer' ); ?></p>
83 - <p class="viz-group-description"><?php echo sprintf( __( 'If you are unsure about how to format your data CSV then please take a look at this sample: %1$s %2$s%3$s', 'visualizer' ), '<a href="' . VISUALIZER_ABSURL . 'samples/' . $this->type . '.csv" target="_blank">', $this->type, '.csv</a>' ); ?></p>
84 - <form id="vz-csv-file-form" action="<?php echo $upload_link; ?>" method="post"
85 - target="thehole" enctype="multipart/form-data">
75 + <ul class="group-content">
76 + <ul class="group-wrapper">
77 + <li class="group">
78 + <h2 class="group-title sub-group visualizer-src-tab"><?php _e( 'Import data from file', 'visualizer' ); ?></h2>
79 + <div class="group-content">
80 + <p class="group-description"><?php esc_html_e( 'Select and upload your data CSV file here. The first row of the CSV file should contain the column headings. The second one should contain series type (string, number, boolean, date, datetime, timeofday).', 'visualizer' ); ?></p>
81 + <p class="group-description"><?php echo sprintf( __( 'If you are unsure about how to format your data CSV then please take a look at this sample: %1$s %2$s%3$s', 'visualizer' ), '<a href="' . VISUALIZER_ABSURL . 'samples/' . $this->type . '.csv" target="_blank">', $this->type, '.csv</a>' ); ?></p>
82 + <form id="vz-csv-file-form" action="<?php echo $upload_link ?>" method="post"
83 + target="thehole" enctype="multipart/form-data">
86 84 <input type="hidden" id="remote-data" name="remote_data">
87 85 <div class="">
88 86 <input type="file" id="csv-file" name="local_data">
89 87 </div>
90 88 <input type="button" class="button button-primary" id="vz-import-file"
91 - value="<?php _e( 'Import', 'visualizer' ); ?>">
89 + value="<?php _e( 'Import', 'visualizer' ); ?>">
92 90 </form>
93 91 </div>
94 92 </li>
95 - <li class="viz-group visualizer-import-url">
96 - <h2 class="viz-group-title viz-sub-group visualizer-src-tab"><?php _e( 'Import data from URL', 'visualizer' ); ?></h2>
97 - <ul class="viz-group-content">
98 - <li class="viz-subsection">
99 - <span class="viz-section-title"><?php _e( 'One time import', 'visualizer' ); ?></span>
93 + <li class="group visualizer-import-url">
94 + <h2 class="group-title sub-group visualizer-src-tab"><?php _e( 'Import data from URL', 'visualizer' ); ?></h2>
95 + <ul class="group-content">
96 + <li class="subsection">
97 + <span class="section-title"><?php _e( 'One time import', 'visualizer' ); ?></span>
100 98
101 - <div class="viz-section-items section-items">
102 - <p class="viz-group-description"><?php _e( 'You can use this to import data from a remote CSV file. The first row of the CSV file should contain the column headings. The second one should contain series type (string, number, boolean, date, datetime, timeofday).', 'visualizer' ); ?> </p>
103 - <p class="viz-group-description"><?php echo sprintf( __( 'If you are unsure about how to format your data CSV then please take a look at this sample: %1$s %2$s%3$s', 'visualizer' ), '<a href="' . VISUALIZER_ABSURL . 'samples/' . $this->type . '.csv" target="_blank">', $this->type, '.csv</a>' ); ?></p>
104 - <p class="viz-group-description"> <?php _e( 'You can also import data from Google Spreadsheet, for more info check <a href="https://github.com/Codeinwp/visualizer/wiki/How-can-I-populate-data-from-Google-Spreadsheet%3F" target="_blank" >this</a> tutorial', 'visualizer' ); ?></p>
105 - <form id="vz-one-time-import" action="<?php echo $upload_link; ?>" method="post"
106 - target="thehole" enctype="multipart/form-data">
99 + <div class="section-items">
100 + <p class="group-description"><?php _e( 'You can use this to import data from a remote CSV file. The first row of the CSV file should contain the column headings. The second one should contain series type (string, number, boolean, date, datetime, timeofday).', 'visualizer' ); ?> </p>
101 + <p class="group-description"><?php echo sprintf( __( 'If you are unsure about how to format your data CSV then please take a look at this sample: %1$s %2$s%3$s', 'visualizer' ), '<a href="' . VISUALIZER_ABSURL . 'samples/' . $this->type . '.csv" target="_blank">', $this->type, '.csv</a>' ); ?></p>
102 + <p class="group-description"> <?php _e( 'You can also import data from Google Spreadsheet, for more info check <a href="https://github.com/Codeinwp/visualizer/wiki/How-can-I-populate-data-from-Google-Spreadsheet%3F" target="_blank" >this</a> tutorial', 'visualizer' ); ?></p>
103 + <form id="vz-one-time-import" action="<?php echo $upload_link ?>" method="post"
104 + target="thehole" enctype="multipart/form-data">
107 105 <div class="remote-file-section">
108 106 <input type="url" id="remote-data" name="remote_data"
109 - placeholder="<?php esc_html_e( 'Please enter the URL of CSV file', 'visualizer' ); ?>"
110 - class="visualizer-input">
107 + placeholder="<?php esc_html_e( 'Please enter the URL of CSV file', 'visualizer' ); ?>"
108 + class="visualizer-input">
111 109
112 110 </div>
113 111 <input type="button" id="view-remote-file" class="button button-primary"
114 - value="<?php _e( 'Import', 'visualizer' ); ?>">
112 + value="<?php _e( 'Import', 'visualizer' ); ?>">
115 113 </form>
116 114 </div>
117 115 </li>
118 - <li class="viz-subsection <?php echo apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature', 'schedule-chart' ); ?>">
119 - <span class="viz-section-title visualizer-import-url-schedule"><?php _e( 'Schedule Import', 'visualizer' ); ?>
116 + <li class="subsection <?php echo apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature', 'schedule-chart' ); ?>">
117 + <span class="section-title visualizer-import-url-schedule"><?php _e( 'Schedule Import', 'visualizer' ); ?>
120 118 <span
121 119 class="dashicons dashicons-lock"></span></span>
122 - <div class="viz-section-items section-items">
123 - <p class="viz-group-description"><?php _e( 'You can choose here to synchronize your chart data with a remote CSV file.', 'visualizer' ); ?> </p>
124 - <p class="viz-group-description"> <?php _e( 'You can also synchronize with your Google Spreadsheet file, for more info check <a href="https://github.com/Codeinwp/visualizer/wiki/How-can-I-populate-data-from-Google-Spreadsheet%3F" target="_blank" >this</a> tutorial', 'visualizer' ); ?></p>
125 - <p class="viz-group-description"> <?php _e( 'We will update the chart data based on your time interval preference by overwritting the current data with the one from the URL.', 'visualizer' ); ?></p>
126 - <form id="vz-schedule-import" action="<?php echo $upload_link; ?>" method="post"
127 - target="thehole" enctype="multipart/form-data">
120 + <div class="section-items">
121 + <p class="group-description"><?php _e( 'You can choose here to synchronize your chart data with a remote CSV file.', 'visualizer' ); ?> </p>
122 + <p class="group-description"> <?php _e( 'You can also synchronize with your Google Spreadsheet file, for more info check <a href="https://github.com/Codeinwp/visualizer/wiki/How-can-I-populate-data-from-Google-Spreadsheet%3F" target="_blank" >this</a> tutorial', 'visualizer' ); ?></p>
123 + <p class="group-description"> <?php _e( 'We will update the chart data based on your time interval preference by overwritting the current data with the one from the URL.', 'visualizer' ); ?></p>
124 + <form id="vz-schedule-import" action="<?php echo $upload_link ?>" method="post"
125 + target="thehole" enctype="multipart/form-data">
128 126 <div class="remote-file-section">
129 127 <input type="url" id="vz-schedule-url" name="remote_data"
130 - value="<?php echo get_post_meta( $this->chart->ID, Visualizer_Plugin::CF_CHART_URL, true ); ?>"
131 - placeholder="<?php esc_html_e( 'Please enter the URL of CSV file', 'visualizer' ); ?>"
132 - class="visualizer-input visualizer-remote-url">
133 - <p class="viz-group-description"><?php _e( 'How often do you want to check the url', 'visualizer' ); ?></p>
128 + value="<?php echo get_post_meta( $this->chart->ID, Visualizer_Plugin::CF_CHART_URL, true ); ?>"
129 + placeholder="<?php esc_html_e( 'Please enter the URL of CSV file', 'visualizer' ); ?>"
130 + class="visualizer-input visualizer-remote-url">
131 + <p class="group-description"><?php _e( 'How often do you want to check the url', 'visualizer' ); ?></p>
134 132 <select name="vz-import-time" id="vz-import-time"
135 - class="visualizer-select">
133 + class="visualizer-select">
136 134 <?php
137 135 $hours = get_post_meta( $this->chart->ID, Visualizer_Plugin::CF_CHART_SCHEDULE, true );
138 136 $schedules = array(
139 137 '1' => __( 'Each hour', 'visualizer' ),
@@ -150,9 +148,9 @@
150 148 ?>
151 149 </select>
152 150 </div>
153 151 <input type="button" id="vz-save-schedule" class="button button-primary"
154 - value="<?php _e( 'Save schedule', 'visualizer' ); ?>">
152 + value="<?php _e( 'Save schedule', 'visualizer' ); ?>">
155 153
156 154 <?php echo apply_filters( 'visualizer_pro_upsell', '', 'schedule-chart' ); ?>
157 155 </form>
158 156 </div>
@@ -158,24 +156,22 @@
158 156 </div>
159 157 </li>
160 158 </ul>
161 159 </li>
162 - <li class="viz-group <?php echo apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature' ); ?>">
163 - <h2 class="viz-group-title viz-sub-group"
164 - data-current="chart"><?php _e( 'Import from other chart', 'visualizer' ); ?><span
160 + <li class="group <?php echo apply_filters( 'visualizer_pro_upsell_class', '' ); ?> ">
161 + <h2 class="group-title sub-group"
162 + data-current="chart"><?php _e( 'Import from other chart', 'visualizer' ); ?><span
165 163 class="dashicons dashicons-lock"></span></h2>
166 - <div class="viz-group-content edit-data-content">
164 + <div class="group-content edit-data-content">
167 165 <div>
168 - <p class="viz-group-description"><?php _e( 'You can import here data from your previously created charts', 'visualizer' ); ?></p>
166 + <p class="group-description"><?php _e( 'You can import here data from your previously created charts', 'visualizer' ); ?></p>
169 167 <form>
170 168 <select name="vz-import-from-chart" id="chart-id" class="visualizer-select">
171 169 <?php
172 - $fetch_link = add_query_arg(
173 - array(
174 - 'action' => ( VISUALIZER_PRO ) ? Visualizer_Pro::ACTION_FETCH_DATA : '',
175 - 'nonce' => wp_create_nonce(),
176 - ), admin_url( 'admin-ajax.php' )
177 - );
170 + $fetch_link = add_query_arg( array(
171 + 'action' => ( VISUALIZER_PRO ) ? Visualizer_Pro::ACTION_FETCH_DATA : '',
172 + 'nonce' => wp_create_nonce(),
173 + ), admin_url( 'admin-ajax.php' ) );
178 174 $query_args_charts = array(
179 175 'post_type' => Visualizer_Plugin::CPT_VISUALIZER,
180 176 'posts_per_page' => 300,
181 177 'no_found_rows' => true,
@@ -193,50 +189,45 @@
193 189
194 190 </select>
195 191 </form>
196 192 <input type="button" id="existing-chart" class="button button-primary"
197 - value="<?php _e( 'Import Chart', 'visualizer' ); ?>"
198 - data-viz-link="<?php echo $fetch_link; ?>">
193 + value="<?php _e( 'Import Chart', 'visualizer' ); ?>"
194 + data-viz-link="<?php echo $fetch_link; ?>">
199 195 <?php echo apply_filters( 'visualizer_pro_upsell', '' ); ?>
200 196 </div>
201 197 </div>
202 198 </li>
203 199
204 - <li class="viz-group <?php echo apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature', 'schedule-chart' ); ?> ">
205 - <h2 class="viz-group-title viz-sub-group"><?php _e( 'Import from WordPress', 'visualizer' ); ?><span
200 + <li class="group <?php echo apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature', 'schedule-chart' ); ?> ">
201 + <h2 class="group-title sub-group"><?php _e( 'Import from WordPress', 'visualizer' ); ?><span
206 202 class="dashicons dashicons-lock"></span></h2>
207 - <div class="viz-group-content edit-data-content">
203 + <div class="group-content edit-data-content">
208 204 <div>
209 - <p class="viz-group-description"><?php _e( 'You can import here data from WordPress', 'visualizer' ); ?></p>
205 + <p class="group-description"><?php _e( 'You can import here data from WordPress', 'visualizer' ); ?></p>
210 206 <input type="button" id="filter-chart-button" class="button button-primary "
211 - value="<?php _e( 'Create Filters', 'visualizer' ); ?>" data-current="chart"
212 - data-t-filter="<?php _e( 'Show Chart', 'visualizer' ); ?>"
213 - data-t-chart="<?php _e( 'Create Filters', 'visualizer' ); ?>">
207 + value="<?php _e( 'Create Filters', 'visualizer' ); ?>" data-current="chart"
208 + data-t-filter="<?php _e( 'Show Chart', 'visualizer' ); ?>"
209 + data-t-chart="<?php _e( 'Create Filters', 'visualizer' ); ?>">
214 210 <?php echo apply_filters( 'visualizer_pro_upsell', '', 'schedule-chart' ); ?>
215 211 </div>
216 212 </div>
217 213 </li>
218 214
219 - <?php
220 - // we will auto-open the manual data feature but only when pro is active.
221 - $pro_class = apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature' );
222 - ?>
223 - <li class="viz-group <?php echo $pro_class; ?> <?php echo empty( $pro_class ) ? 'open' : ''; ?> ">
224 - <h2 class="viz-group-title viz-sub-group visualizer-editor-tab"
225 - data-current="chart"><?php _e( 'Manual Data', 'visualizer' ); ?><span
215 + <li class="group <?php echo apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature' ); ?>">
216 + <h2 class="group-title sub-group visualizer-editor-tab"
217 + data-current="chart"><?php _e( 'Add data manually', 'visualizer' ); ?><span
226 218 class="dashicons dashicons-lock"></span></h2>
227 - <form id="editor-form" action="<?php echo $upload_link; ?>" method="post" target="thehole">
219 + <form id="editor-form" action="<?php echo $upload_link ?>" method="post" target="thehole">
228 220 <input type="hidden" id="chart-data" name="chart_data">
229 - <input type="hidden" id="chart-data-src" name="chart_data_src">
230 221 </form>
231 222
232 - <div class="viz-group-content edit-data-content">
223 + <div class="group-content edit-data-content">
233 224 <div>
234 - <p class="viz-group-description"><?php _e( 'You can manually edit the chart data using the spreadsheet like editor.', 'visualizer' ); ?></p>
225 + <p class="group-description"><?php _e( 'You can manually edit the chart data using the spreadsheet like editor.', 'visualizer' ); ?></p>
235 226 <input type="button" id="editor-chart-button" class="button button-primary "
236 - value="<?php _e( 'View Editor', 'visualizer' ); ?>" data-current="chart"
237 - data-t-editor="<?php _e( 'Show Chart', 'visualizer' ); ?>"
238 - data-t-chart="<?php _e( 'View Editor', 'visualizer' ); ?>">
227 + value="<?php _e( 'View Editor', 'visualizer' ); ?>" data-current="chart"
228 + data-t-editor="<?php _e( 'Show Chart', 'visualizer' ); ?>"
229 + data-t-chart="<?php _e( 'View Editor', 'visualizer' ); ?>">
239 230
240 231 <?php echo apply_filters( 'visualizer_pro_upsell', '' ); ?>
241 232 </div>
242 233 </div>
@@ -243,25 +234,26 @@
243 234 </li>
244 235 </ul>
245 236 </li>
246 237 </ul>
247 - <li class="viz-group viz-group-category bottom-fixed sidebar-footer-link" id="vz-chart-settings">
248 - <h2><span class="dashicons dashicons-admin-tools"></span><?php _e( 'Advanced', 'visualizer' ); ?></h2>
249 - <div class="viz-group-header">
238 + <li class="group group-category bottom-fixed " id="vz-chart-settings">
239 + <h2><?php _e( 'Advanced Settings', 'visualizer' ); ?></h2>
240 + <div class="group-header">
250 241 <button class="customize-section-back" tabindex="0"></button>
251 - <h3 class="viz-group-title viz-main-group"><?php _e( 'Chart Settings', 'visualizer' ); ?></h3>
242 + <h3 class="group-title main-group"><?php _e( 'Chart Settings', 'visualizer' ); ?></h3>
252 243 </div>
253 - <ul class="viz-group-content">
244 + <ul class="group-content">
254 245 <form id="settings-form" action="<?php echo add_query_arg( 'nonce', wp_create_nonce() ); ?>"
255 - method="post">
246 + method="post">
256 247 <?php echo $this->sidebar; ?>
257 248 </form>
258 249 </ul>
259 250 </li>
260 -
261 - <?php $this->getPermissionsLink( $this->chart->ID ); ?>
262 -
263 - <li class="viz-group bottom-fixed" id="vz-chart-copyright">Visualizer &copy; <?php echo date( 'Y', current_time( 'timestamp' ) ); ?></li>
251 + <li class=" group bottom-fixed" id="vz-chart-review">
252 + <a href="https://wordpress.org/support/plugin/visualizer/reviews/?filter=5#new-post"
253 + target="_blank"><?php _e( 'Rate our plugin', 'visualizer' ); ?></a>
254 + </li>
255 + <li class="group bottom-fixed" id="vz-chart-copyright">Visualizer &copy; 2014</li>
264 256 </ul>
265 257 <?php
266 258 // changed by Ash/Upwork
267 259 }
@@ -266,139 +258,8 @@
266 258 // changed by Ash/Upwork
267 259 }
268 260
269 261 /**
270 - * Generates the permissions link.
271 - *
272 - * @access private
273 - * @param int $id The chart id.
274 - */
275 - private function getPermissionsLink( $id ) {
276 - $permissions = apply_filters( 'visualizer_pro_get_permissions', null, $id );
277 - if ( $permissions ) {
278 - foreach ( $permissions as $k => $v ) {
279 - $this->$k = $v;
280 - }
281 - }
282 -?>
283 - <li class="viz-group viz-group-category bottom-fixed sidebar-footer-link" id="vz-chart-permissions">
284 - <h2><span class="dashicons dashicons-admin-users"></span><?php _e( 'Permissions', 'visualizer' ); ?></h2>
285 - <div class="viz-group-header">
286 - <button class="customize-section-back" tabindex="0"></button>
287 - <h3 class="viz-group-title viz-main-group"><?php _e( 'Chart Settings', 'visualizer' ); ?></h3>
288 - </div>
289 - <ul class="viz-group-content">
290 - <form id="permissions-form" target="thehole" action="
291 - <?php
292 - echo add_query_arg(
293 - array(
294 - 'nonce' => wp_create_nonce(),
295 - 'tab' => 'permissions',
296 - ), remove_query_arg( 'tab', $_SERVER['REQUEST_URI'] )
297 - );
298 -?>
299 -" method="post">
300 - <?php $this->permissionsSidebar(); ?>
301 - </form>
302 - </ul>
303 - </li>
304 -<?php
305 - }
306 -
307 - /**
308 - * Generates the permissions form.
309 - *
310 - * @access private
311 - */
312 - private function permissionsSidebar() {
313 - Visualizer_Render_Sidebar::_renderGroupStart(
314 - esc_html__( 'Who can see this chart?', 'visualizer' ) . '<span
315 - class="dashicons dashicons-lock"></span>', '', apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature', 'chart-permissions' )
316 - );
317 - Visualizer_Render_Sidebar::_renderSectionStart();
318 - Visualizer_Render_Sidebar::_renderSectionDescription( esc_html__( 'Select who can view the chart on the front-end.', 'visualizer' ) );
319 -
320 - if ( ! isset( $this->permissions['read'] ) ) {
321 - $this->permissions['read'] = 'all';
322 - }
323 -
324 - Visualizer_Render_Sidebar::_renderSelectItem(
325 - '',
326 - 'permissions[read]',
327 - $this->permissions['read'],
328 - array(
329 - 'all' => esc_html__( 'All Users', 'visualizer' ),
330 - 'users' => esc_html__( 'Select Users', 'visualizer' ),
331 - 'roles' => esc_html__( 'Select Roles', 'visualizer' ),
332 - ),
333 - '',
334 - false,
335 - array( 'visualizer-permission', 'visualizer-permission-type', 'visualizer-permission-read' ),
336 - array(
337 - 'permission-type' => 'read',
338 - )
339 - );
340 -
341 - $options = apply_filters( 'visualizer_pro_get_permissions_data', array(), isset( $this->permissions['read'] ) ? $this->permissions['read'] : 'roles' );
342 -
343 - Visualizer_Render_Sidebar::_renderSelectItem(
344 - '',
345 - 'permissions[read-specific][]',
346 - isset( $this->permissions['read-specific'] ) ? $this->permissions['read-specific'] : array(),
347 - $options,
348 - '',
349 - true,
350 - array( 'visualizer-permission', 'visualizer-permission-specific', 'visualizer-permission-read-specific' )
351 - );
352 - Visualizer_Render_Sidebar::_renderSectionEnd( apply_filters( 'visualizer_pro_upsell', 'only-pro-feature', 'chart-permissions' ) );
353 - Visualizer_Render_Sidebar::_renderGroupEnd();
354 -
355 - Visualizer_Render_Sidebar::_renderGroupStart(
356 - esc_html__( 'Who can edit this chart?', 'visualizer' ) . '<span
357 - class="dashicons dashicons-lock"></span>', '', apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature', 'chart-permissions' )
358 - );
359 - Visualizer_Render_Sidebar::_renderSectionStart();
360 - Visualizer_Render_Sidebar::_renderSectionDescription( esc_html__( 'Select who can edit the chart on the front-end.', 'visualizer' ) );
361 -
362 - if ( ! isset( $this->permissions['edit'] ) ) {
363 - $this->permissions['edit'] = 'roles';
364 - $this->permissions['edit-specific'] = 'administrator';
365 - }
366 -
367 - Visualizer_Render_Sidebar::_renderSelectItem(
368 - '',
369 - 'permissions[edit]',
370 - $this->permissions['edit'],
371 - array(
372 - 'all' => esc_html__( 'All Users', 'visualizer' ),
373 - 'users' => esc_html__( 'Select Users', 'visualizer' ),
374 - 'roles' => esc_html__( 'Select Roles', 'visualizer' ),
375 - ),
376 - '',
377 - false,
378 - array( 'visualizer-permission', 'visualizer-permission-type', 'visualizer-permission-edit' ),
379 - array(
380 - 'permission-type' => 'edit',
381 - )
382 - );
383 -
384 - $options = apply_filters( 'visualizer_pro_get_permissions_data', array(), isset( $this->permissions['edit'] ) ? $this->permissions['edit'] : 'roles' );
385 -
386 - Visualizer_Render_Sidebar::_renderSelectItem(
387 - '',
388 - 'permissions[edit-specific][]',
389 - isset( $this->permissions['edit-specific'] ) ? $this->permissions['edit-specific'] : array(),
390 - $options,
391 - '',
392 - true,
393 - array( 'visualizer-permission', 'visualizer-permission-specific', 'visualizer-permission-edit-specific' )
394 - );
395 - Visualizer_Render_Sidebar::_renderSectionEnd( apply_filters( 'visualizer_pro_upsell', 'only-pro-feature', 'chart-permissions' ) );
396 - Visualizer_Render_Sidebar::_renderGroupEnd();
397 -
398 - }
399 -
400 - /**
401 262 * Renders toolbar content.
402 263 *
403 264 * @since 1.0.0
404 265 *
@@ -404,17 +265,16 @@
404 265 *
405 266 * @access protected
406 267 */
407 268 protected function _renderToolbar() {
408 - // don't show back button at all.
409 - // NOTE: We can't be selective on the post_status here because when a new chart reaches the settings screen, its status changes to publish.
410 - if ( ! VISUALIZER_SKIP_CHART_TYPE_PAGE ) {
411 - echo '<div class="toolbar-div">';
412 - echo '<a class="button button-large" href="', add_query_arg( 'tab', 'types' ), '">';
413 - esc_html_e( 'Back', 'visualizer' );
414 - echo '</a>';
415 - echo '</div>';
416 - }
269 + // changed by Ash/Upwork
270 + echo '<div class="toolbar-div">';
271 + echo '<a class="button button-large" href="', add_query_arg( 'tab', 'types' ), '">';
272 + esc_html_e( 'Back', 'visualizer' );
273 + echo '</a>';
274 + echo '</div>';
417 275 echo '<input type="submit" id="settings-button" class="button button-primary button-large push-right" value="', $this->button, '">';
276 + echo '</div>';
277 +
418 278 }
419 279
420 280 }