| @@ -9,8 +9,10 @@ | ||
| 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 | + | |
| 13 | 15 | add_filter( 'admin_footer_text', [ $this, 'admin_footer_text' ] ); |
| 14 | 16 | add_filter( 'admin_post_weforms_export_forms', [ $this, 'export_forms' ] ); |
| 15 | 17 | add_filter( 'admin_post_weforms_export_form_entries', [ $this, 'export_form_entries' ] ); |
| 16 | 18 | |
| @@ -386,5 +388,31 @@ | ||
| 386 | 388 | */ |
| 387 | 389 | public function settings_tab_privacy( $tab ) { |
| 388 | 390 | include __DIR__ . '/views/weforms-settings-privacy.php'; |
| 389 | 391 | } |
| 392 | + | |
| 393 | + /** | |
| 394 | + * WeForms Pro CTA notice | |
| 395 | + * | |
| 396 | + * @since 1.6.5 | |
| 397 | + */ | |
| 398 | + public function wpuf_premium_cta() { | |
| 399 | + $screen = get_current_screen(); | |
| 400 | + if ( $screen && $screen->base && 'toplevel_page_weforms' !== $screen->base ) { | |
| 401 | + return; | |
| 402 | + } | |
| 403 | + | |
| 404 | + if ( ! class_exists( 'WeForms_Pro' ) ) { | |
| 405 | + ?> | |
| 406 | + <div class="notice updated premium-cta"> | |
| 407 | + <p style="display: flex;align-items: center;"> | |
| 408 | + <img style="padding-right:15px;" src="<?php echo WEFORMS_ASSET_URI . '/images/weforms-logo.png'; ?>"> | |
| 409 | + <?php _e( 'You're using weForms Free. For more features, modules and more consider upgrading to Pro.' , 'weforms' ); ?> | |
| 410 | + </p> | |
| 411 | + <p class="submit"> | |
| 412 | + <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> | |
| 413 | + </p> | |
| 414 | + </div> | |
| 415 | + <?php | |
| 416 | + } | |
| 417 | + } | |
| 390 | 418 | } |