| @@ -132,9 +132,9 @@ | ||
| 132 | 132 | /** |
| 133 | 133 | * Plugin Version |
| 134 | 134 | * @var string |
| 135 | 135 | */ |
| 136 | - public $version = '4.9.1'; | |
| 136 | + public $version = '4.9.2'; | |
| 137 | 137 | |
| 138 | 138 | /** |
| 139 | 139 | * WriteWithAI Class |
| 140 | 140 | * @var string |
| @@ -151,9 +151,9 @@ | ||
| 151 | 151 | /** |
| 152 | 152 | * Plugin DB Version |
| 153 | 153 | * @var string |
| 154 | 154 | */ |
| 155 | - public $db_version = '1.0.2'; | |
| 155 | + public $db_version = '1.0.3'; | |
| 156 | 156 | |
| 157 | 157 | public function __construct() { |
| 158 | 158 | $this->define_constants(); |
| 159 | 159 | |
| @@ -511,8 +511,36 @@ | ||
| 511 | 511 | public function show_glossary_teaser() { |
| 512 | 512 | return ! $this->is_pro_active() && ! $this->has_glossaries(); |
| 513 | 513 | } |
| 514 | 514 | |
| 515 | + /** | |
| 516 | + * Whether Pro provides the real Content Intelligence screen. | |
| 517 | + * | |
| 518 | + * Pro flips this via `betterdocs_pro_has_content_intelligence`; the | |
| 519 | + * class_exists() default keeps the gate correct against a Pro build that | |
| 520 | + * predates that filter. | |
| 521 | + * | |
| 522 | + * @return bool | |
| 523 | + */ | |
| 524 | + public function has_content_intelligence() { | |
| 525 | + return (bool) apply_filters( | |
| 526 | + 'betterdocs_pro_has_content_intelligence', | |
| 527 | + class_exists( '\\WPDeveloper\\BetterDocsPro\\Core\\ContentIntelligenceService' ) | |
| 528 | + ); | |
| 529 | + } | |
| 530 | + | |
| 531 | + /** | |
| 532 | + * Whether Free should show its locked Content Intelligence teaser. | |
| 533 | + * | |
| 534 | + * Only without Pro. An older Pro has already paid, so they get nothing here — | |
| 535 | + * they need a plugin update, not an upsell. | |
| 536 | + * | |
| 537 | + * @return bool | |
| 538 | + */ | |
| 539 | + public function show_content_intelligence_teaser() { | |
| 540 | + return ! $this->is_pro_active() && ! $this->has_content_intelligence(); | |
| 541 | + } | |
| 542 | + | |
| 515 | 543 | public function pro_version() { |
| 516 | 544 | if ( ! $this->is_pro_active() ) { |
| 517 | 545 | return false; |
| 518 | 546 | } |
| @@ -564,8 +592,9 @@ | ||
| 564 | 592 | 'toplevel_page_betterdocs-admin', |
| 565 | 593 | 'admin_page_betterdocs-admin', |
| 566 | 594 | 'betterdocs_page_betterdocs-admin', |
| 567 | 595 | 'betterdocs_page_betterdocs-analytics', |
| 596 | + 'betterdocs_page_betterdocs-content-iq', | |
| 568 | 597 | 'betterdocs_page_betterdocs-settings', |
| 569 | 598 | 'betterdocs_page_betterdocs-mcp', |
| 570 | 599 | 'betterdocs_page_betterdocs-faq', |
| 571 | 600 | 'betterdocs_page_betterdocs-glossaries', |