| @@ -158,9 +158,9 @@ | ||
| 158 | 158 | </div> |
| 159 | 159 | </li> |
| 160 | 160 | </ul> |
| 161 | 161 | </li> |
| 162 | - <li class="viz-group <?php echo apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature' ); ?>"> | |
| 162 | + <li class="viz-group <?php echo apply_filters( 'visualizer_pro_upsell_class', '' ); ?> "> | |
| 163 | 163 | <h2 class="viz-group-title viz-sub-group" |
| 164 | 164 | data-current="chart"><?php _e( 'Import from other chart', 'visualizer' ); ?><span |
| 165 | 165 | class="dashicons dashicons-lock"></span></h2> |
| 166 | 166 | <div class="viz-group-content edit-data-content"> |
| @@ -215,15 +215,11 @@ | ||
| 215 | 215 | </div> |
| 216 | 216 | </div> |
| 217 | 217 | </li> |
| 218 | 218 | |
| 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' : ''; ?> "> | |
| 219 | + <li class="viz-group <?php echo apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature' ); ?>"> | |
| 224 | 220 | <h2 class="viz-group-title viz-sub-group visualizer-editor-tab" |
| 225 | - data-current="chart"><?php _e( 'Manual Data', 'visualizer' ); ?><span | |
| 221 | + data-current="chart"><?php _e( 'Add data manually', 'visualizer' ); ?><span | |
| 226 | 222 | class="dashicons dashicons-lock"></span></h2> |
| 227 | 223 | <form id="editor-form" action="<?php echo $upload_link; ?>" method="post" target="thehole"> |
| 228 | 224 | <input type="hidden" id="chart-data" name="chart_data"> |
| 229 | 225 | <input type="hidden" id="chart-data-src" name="chart_data_src"> |
| @@ -253,13 +249,9 @@ | ||
| 253 | 249 | <ul class="viz-group-content"> |
| 254 | 250 | <form id="settings-form" action="<?php echo add_query_arg( 'nonce', wp_create_nonce() ); ?>" |
| 255 | 251 | method="post"> |
| 256 | 252 | <?php echo $this->sidebar; ?> |
| 257 | - <input type="hidden" name="save" value="1"> | |
| 258 | 253 | </form> |
| 259 | - <form id="cancel-form" action="<?php echo add_query_arg( 'nonce', wp_create_nonce() ); ?>" method="post"> | |
| 260 | - <input type="hidden" name="cancel" value="1"> | |
| 261 | - </form> | |
| 262 | 254 | </ul> |
| 263 | 255 | </li> |
| 264 | 256 | |
| 265 | 257 | <?php $this->getPermissionsLink( $this->chart->ID ); ?> |
| @@ -313,12 +305,8 @@ | ||
| 313 | 305 | * |
| 314 | 306 | * @access private |
| 315 | 307 | */ |
| 316 | 308 | private function permissionsSidebar() { |
| 317 | - // ignore for unit tests because Travis throws the error "Indirect modification of overloaded property Visualizer_Render_Page_Data::$permissions has no effect". | |
| 318 | - if ( defined( 'WP_TESTS_DOMAIN' ) ) { | |
| 319 | - return; | |
| 320 | - } | |
| 321 | 309 | Visualizer_Render_Sidebar::_renderGroupStart( |
| 322 | 310 | esc_html__( 'Who can see this chart?', 'visualizer' ) . '<span |
| 323 | 311 | class="dashicons dashicons-lock"></span>', '', apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature', 'chart-permissions' ) |
| 324 | 312 | ); |
| @@ -412,20 +400,16 @@ | ||
| 412 | 400 | * |
| 413 | 401 | * @access protected |
| 414 | 402 | */ |
| 415 | 403 | protected function _renderToolbar() { |
| 416 | - // don't show back button at all. | |
| 417 | - // 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. | |
| 418 | - if ( ! VISUALIZER_SKIP_CHART_TYPE_PAGE ) { | |
| 419 | - echo '<div class="toolbar-div">'; | |
| 420 | - echo '<a class="button button-large" href="', add_query_arg( 'tab', 'types' ), '">'; | |
| 421 | - esc_html_e( 'Back', 'visualizer' ); | |
| 422 | - echo '</a>'; | |
| 423 | - echo '</div>'; | |
| 424 | - } | |
| 404 | + // changed by Ash/Upwork | |
| 405 | + echo '<div class="toolbar-div">'; | |
| 406 | + echo '<a class="button button-large" href="', add_query_arg( 'tab', 'types' ), '">'; | |
| 407 | + esc_html_e( 'Back', 'visualizer' ); | |
| 408 | + echo '</a>'; | |
| 409 | + echo '</div>'; | |
| 425 | 410 | echo '<input type="submit" id="settings-button" class="button button-primary button-large push-right" value="', $this->button, '">'; |
| 426 | - if ( isset( $this->cancel_button ) ) { | |
| 427 | - echo '<input type="submit" id="cancel-button" class="button button-secondary button-large push-right" value="', $this->cancel_button, '">'; | |
| 428 | - } | |
| 411 | + echo '</div>'; | |
| 412 | + | |
| 429 | 413 | } |
| 430 | 414 | |
| 431 | 415 | } |