| @@ -104,15 +104,14 @@ | ||
| 104 | 104 | $table_col_mapping = Visualizer_Source_Query_Params::get_all_db_tables_column_mapping( null, false ); |
| 105 | 105 | |
| 106 | 106 | $translation_array = array( |
| 107 | 107 | 'isPro' => $type, |
| 108 | - 'proTeaser' => tsdk_utmify( Visualizer_Plugin::PRO_TEASER_URL, 'blockupsell'), | |
| 108 | + 'proTeaser' => Visualizer_Plugin::PRO_TEASER_URL, | |
| 109 | 109 | 'absurl' => VISUALIZER_ABSURL, |
| 110 | 110 | 'charts' => Visualizer_Module_Admin::_getChartTypesLocalized(), |
| 111 | 111 | 'adminPage' => menu_page_url( 'visualizer', false ), |
| 112 | 112 | 'sqlTable' => $table_col_mapping, |
| 113 | 113 | 'chartsPerPage' => defined( 'TI_CYPRESS_TESTING' ) ? 20 : 6, |
| 114 | - 'proFeaturesLocked' => Visualizer_Module_Admin::proFeaturesLocked(), | |
| 115 | 114 | ); |
| 116 | 115 | wp_localize_script( 'visualizer-gutenberg-block', 'visualizerLocalize', $translation_array ); |
| 117 | 116 | |
| 118 | 117 | // Enqueue frontend and editor block styles |
| @@ -659,14 +658,8 @@ | ||
| 659 | 658 | ); |
| 660 | 659 | |
| 661 | 660 | wp_update_post( $chart ); |
| 662 | 661 | |
| 663 | - // Clear existing chart cache. | |
| 664 | - $cache_key = Visualizer_Plugin::CF_CHART_CACHE . '_' . $data['id']; | |
| 665 | - if ( get_transient( $cache_key ) ) { | |
| 666 | - delete_transient( $cache_key ); | |
| 667 | - } | |
| 668 | - | |
| 669 | 662 | $revisions = wp_get_post_revisions( $data['id'], array( 'order' => 'ASC' ) ); |
| 670 | 663 | |
| 671 | 664 | if ( count( $revisions ) > 1 ) { |
| 672 | 665 | $revision_ids = array_keys( $revisions ); |
| @@ -749,14 +742,10 @@ | ||
| 749 | 742 | if ( ! current_user_can( 'edit_posts' ) ) { |
| 750 | 743 | return false; |
| 751 | 744 | } |
| 752 | 745 | |
| 753 | - $remote_data = false; | |
| 754 | - if ( isset( $data['url'] ) && function_exists( 'wp_http_validate_url' ) ) { | |
| 755 | - $remote_data = wp_http_validate_url( $data['url'] ); | |
| 756 | - } | |
| 757 | - if ( false !== $remote_data && ! is_wp_error( $remote_data ) ) { | |
| 758 | - $source = new Visualizer_Source_Csv_Remote( $remote_data ); | |
| 746 | + if ( $data['url'] && ! is_wp_error( $data['url'] ) && filter_var( $data['url'], FILTER_VALIDATE_URL ) ) { | |
| 747 | + $source = new Visualizer_Source_Csv_Remote( $data['url'] ); | |
| 759 | 748 | if ( $source->fetch() ) { |
| 760 | 749 | $temp = $source->getData(); |
| 761 | 750 | if ( is_string( $temp ) && is_array( unserialize( $temp ) ) ) { |
| 762 | 751 | $content['series'] = $source->getSeries(); |