| @@ -9,10 +9,8 @@ | ||
| 9 | 9 | add_action( 'init', [ $this, 'register_post_type' ] ); |
| 10 | 10 | add_action( 'admin_menu', [ $this, 'register_admin_menu' ] ); |
| 11 | 11 | add_action( 'pre_update_option_wpuf_general', [ $this, 'watch_wpuf_settings' ] ); |
| 12 | 12 | |
| 13 | - add_action( 'admin_notices', array( $this, 'wpuf_premium_cta' ) ); | |
| 14 | - | |
| 15 | 13 | add_filter( 'admin_footer_text', [ $this, 'admin_footer_text' ] ); |
| 16 | 14 | add_filter( 'admin_post_weforms_export_forms', [ $this, 'export_forms' ] ); |
| 17 | 15 | add_filter( 'admin_post_weforms_export_form_entries', [ $this, 'export_form_entries' ] ); |
| 18 | 16 | |
| @@ -20,9 +18,8 @@ | ||
| 20 | 18 | add_filter( 'weforms_settings_tabs', [ $this, 'set_default_settings' ], 5 ); |
| 21 | 19 | add_action( 'weforms_settings_tab_content_general', [ $this, 'settings_tab_general' ] ); |
| 22 | 20 | add_action( 'weforms_settings_tab_content_recaptcha', [ $this, 'settings_tab_recaptcha' ] ); |
| 23 | 21 | add_action( 'weforms_settings_tab_content_secure-database', [ $this, 'settings_tab_secure_database' ] ); |
| 24 | - add_action( 'weforms_settings_tab_content_humanpresence', [ $this, 'settings_tab_humanpresence' ] ); | |
| 25 | 22 | add_action( 'weforms_settings_tab_content_privacy', [ $this, 'settings_tab_privacy' ] ); |
| 26 | 23 | } |
| 27 | 24 | |
| 28 | 25 | /** |
| @@ -169,19 +166,11 @@ | ||
| 169 | 166 | * |
| 170 | 167 | * @return void |
| 171 | 168 | */ |
| 172 | 169 | public function export_form_entries() { |
| 173 | - if ( ! current_user_can( 'administrator' ) ) { | |
| 174 | - wp_die( esc_html__( 'You do not have permission to export entries', 'weforms' ) ); | |
| 175 | - } | |
| 176 | - | |
| 177 | - if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'weforms-export-entries' ) ) { | |
| 178 | - wp_die( esc_html__( 'Invalid nonce', 'weforms' ) ); | |
| 179 | - } | |
| 180 | - | |
| 181 | 170 | $form_id = isset( $_REQUEST['selected_forms'] ) ? absint( $_REQUEST['selected_forms'] ) : 0; |
| 182 | 171 | |
| 183 | - if ( ! $form_id ) { | |
| 172 | + if ( !$form_id ) { | |
| 184 | 173 | return; |
| 185 | 174 | } |
| 186 | 175 | |
| 187 | 176 | $entry_array = []; |
| @@ -345,13 +334,8 @@ | ||
| 345 | 334 | 'label' => __( 'Secure Database', 'weforms' ), |
| 346 | 335 | 'icon' => WEFORMS_ASSET_URI . '/images/integrations/secure-database.png', |
| 347 | 336 | ]; |
| 348 | 337 | |
| 349 | - $tabs['humanpresence'] = [ | |
| 350 | - 'label' => __( 'Human Presence', 'weforms' ), | |
| 351 | - 'icon' => WEFORMS_ASSET_URI . '/images/integrations/hp-shield.svg', | |
| 352 | - ]; | |
| 353 | - | |
| 354 | 338 | /* TODO: Refactor this block when more options are added in privacy settings*/ |
| 355 | 339 | if ( class_exists( 'WeForms_Pro' ) ) { |
| 356 | 340 | $tabs['privacy'] = [ |
| 357 | 341 | 'label' => __( 'Privacy', 'weforms' ), |
| @@ -393,18 +377,8 @@ | ||
| 393 | 377 | public function settings_tab_secure_database( $tab ) { |
| 394 | 378 | include __DIR__ . '/views/weforms-settings-secure-database.php'; |
| 395 | 379 | } |
| 396 | 380 | /** |
| 397 | - * Human Presence tab content | |
| 398 | - * | |
| 399 | - * @param array $tab | |
| 400 | - * | |
| 401 | - * @return void | |
| 402 | - */ | |
| 403 | - public function settings_tab_humanpresence( $tab ) { | |
| 404 | - include __DIR__ . '/views/weforms-settings-humanpresence.php'; | |
| 405 | - } | |
| 406 | - /** | |
| 407 | 381 | * Privacy tab content |
| 408 | 382 | * |
| 409 | 383 | * @param array $tab |
| 410 | 384 | * |
| @@ -412,31 +386,5 @@ | ||
| 412 | 386 | */ |
| 413 | 387 | public function settings_tab_privacy( $tab ) { |
| 414 | 388 | include __DIR__ . '/views/weforms-settings-privacy.php'; |
| 415 | 389 | } |
| 416 | - | |
| 417 | - /** | |
| 418 | - * WeForms Pro CTA notice | |
| 419 | - * | |
| 420 | - * @since 1.6.5 | |
| 421 | - */ | |
| 422 | - public function wpuf_premium_cta() { | |
| 423 | - $screen = get_current_screen(); | |
| 424 | - if ( $screen && $screen->base && 'toplevel_page_weforms' !== $screen->base ) { | |
| 425 | - return; | |
| 426 | - } | |
| 427 | - | |
| 428 | - if ( ! class_exists( 'WeForms_Pro' ) ) { | |
| 429 | - ?> | |
| 430 | - <div class="notice updated premium-cta"> | |
| 431 | - <p style="display: flex;align-items: center;"> | |
| 432 | - <img style="padding-right:15px;" src="<?php echo WEFORMS_ASSET_URI . '/images/weforms-logo.png'; ?>"> | |
| 433 | - <?php _e( 'You're using weForms Free. For more features, modules and more consider upgrading to Pro.' , 'weforms' ); ?> | |
| 434 | - </p> | |
| 435 | - <p class="submit"> | |
| 436 | - <a href="https://weformspro.com/get-premium/?utm_source=Entries&utm_medium=Button&utm_campaign=Upgrade%20Now" target="_blank" class="button-primary"><?php _e( 'UPGRADE NOW!' , 'weforms' ); ?></a> | |
| 437 | - </p> | |
| 438 | - </div> | |
| 439 | - <?php | |
| 440 | - } | |
| 441 | - } | |
| 442 | 390 | } |