| @@ -52,9 +52,9 @@ | ||
| 52 | 52 | public function __construct( Visualizer_Plugin $plugin ) { |
| 53 | 53 | parent::__construct( $plugin ); |
| 54 | 54 | $this->_addFilter( Visualizer_Plugin::FILTER_GET_CHART_SERIES, 'filterChartSeries', 1, 2 ); |
| 55 | 55 | $this->_addFilter( Visualizer_Plugin::FILTER_GET_CHART_DATA, 'filterChartData', 1, 2 ); |
| 56 | - $this->_addFilter( 'visualizer_pro_upsell', 'addProUpsell', 10, 3 ); | |
| 56 | + $this->_addFilter( 'visualizer_pro_upsell', 'addProUpsell', 10, 2 ); | |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
| 60 | 60 | * Filters chart sereis. |
| @@ -128,9 +128,9 @@ | ||
| 128 | 128 | * @param string $feature What feature is this filter running for. |
| 129 | 129 | * |
| 130 | 130 | * @return string The new html code. |
| 131 | 131 | */ |
| 132 | - public function addProUpsell( $old, $feature = null, string $docs_url = '' ) { | |
| 132 | + public function addProUpsell( $old, $feature = null ) { | |
| 133 | 133 | $pro_features = Visualizer_Module::get_features_for_license( 1 ); |
| 134 | 134 | $biz_features = Visualizer_Module::get_features_for_license( 2 ); |
| 135 | 135 | $return = ''; |
| 136 | 136 | $feature = strval( $feature ); |
| @@ -137,16 +137,14 @@ | ||
| 137 | 137 | if ( empty( $feature ) || |
| 138 | 138 | ( in_array( $feature, $biz_features, true ) && ! apply_filters( 'visualizer_is_business', false ) ) || |
| 139 | 139 | ( in_array( $feature, $pro_features, true ) && ! Visualizer_Module::is_pro() ) |
| 140 | 140 | ) { |
| 141 | - // translators: $s - the name of the plan (PRO). | |
| 142 | 141 | $msg = sprintf( __( 'Upgrade to %s to activate this feature!', 'visualizer' ), 'PRO' ); |
| 143 | - // translators: $s - the name of the plan (Plus). | |
| 144 | 142 | $plus_msg = sprintf( __( 'Upgrade to %s plan to activate this feature!', 'visualizer' ), 'Plus' ); |
| 145 | 143 | if ( in_array( $feature, $biz_features, true ) && Visualizer_Module::is_pro() ) { |
| 146 | 144 | $msg = $plus_msg; |
| 147 | 145 | } |
| 148 | - if ( in_array( $feature, array( 'db-query', 'chart-permissions' ), true ) ) { | |
| 146 | + if ( in_array( $feature, [ 'db-query', 'chart-permissions' ], true ) ) { | |
| 149 | 147 | $msg = $plus_msg; |
| 150 | 148 | } |
| 151 | 149 | |
| 152 | 150 | $return = '<div class="only-pro-content">'; |
| @@ -152,12 +150,9 @@ | ||
| 152 | 150 | $return = '<div class="only-pro-content">'; |
| 153 | 151 | $return .= ' <div class="only-pro-container">'; |
| 154 | 152 | $return .= ' <div class="only-pro-inner">'; |
| 155 | 153 | $return .= ' <p>' . $msg . '</p>'; |
| 156 | - if ( ! empty( $docs_url ) ) { | |
| 157 | - $return .= ' <a target="_blank" href="' . esc_url( $docs_url ) . '" class="button button-secondary">' . esc_html__( 'Documentation', 'visualizer' ) . '</a>'; | |
| 158 | - } | |
| 159 | - $return .= ' <a target="_blank" href="' . tsdk_utmify( Visualizer_Plugin::PRO_TEASER_URL, esc_attr( $feature ) ) . '" title="' . __( 'Upgrade Now', 'visualizer' ) . '" class="button button-primary">' . __( 'Upgrade Now', 'visualizer' ) . '</a>'; | |
| 154 | + $return .= ' <a target="_blank" href="' . tsdk_utmify( Visualizer_Plugin::PRO_TEASER_URL, esc_attr( $feature ) ) . '" title="' . __( 'Upgrade Now', 'visualizer' ) . '">' . __( 'Upgrade Now', 'visualizer' ) . '</a>'; | |
| 160 | 155 | $return .= ' </div>'; |
| 161 | 156 | $return .= ' </div>'; |
| 162 | 157 | $return .= '</div>'; |
| 163 | 158 | } |
| @@ -167,5 +162,6 @@ | ||
| 167 | 162 | } |
| 168 | 163 | |
| 169 | 164 | return $return; |
| 170 | 165 | } |
| 166 | + | |
| 171 | 167 | } |