PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.3
Elementor Website Builder – more than just a page builder v4.3.3
4.3.3 4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 All 456 releases
← All changes | modules/ai/module.php +0 -49 4.0.9 → 4.3.3 View file →
@@ -4,9 +4,8 @@
4 4 use Elementor\Controls_Manager;
5 5 use Elementor\Core\Base\Module as BaseModule;
6 6 use Elementor\Core\Common\Modules\Connect\Module as ConnectModule;
7 7 use Elementor\Element_Base;
8 -use Elementor\Modules\Ai\Feature_Intro\Product_Image_Unification_Intro;
9 8 use Elementor\Plugin;
10 9 use Elementor\Core\Utils\Collection;
11 10 use Elementor\Modules\Ai\Connect\Ai;
12 11 use Elementor\User;
@@ -28,10 +27,8 @@
28 27 self::HISTORY_TYPE_CODE,
29 28 self::HISTORY_TYPE_IMAGE,
30 29 self::HISTORY_TYPE_BLOCK,
31 30 ];
32 - const MIN_PAGES_FOR_CREATE_WITH_AI_BANNER = 10;
33 -
34 31 public function get_name() {
35 32 return 'ai';
36 33 }
37 34
@@ -48,10 +45,8 @@
48 45 if ( ! $this->is_ai_enabled() ) {
49 46 return;
50 47 }
51 48
52 - add_filter( 'elementor/core/admin/homescreen', [ $this, 'add_create_with_ai_banner_to_homescreen' ] );
53 -
54 49 add_action( 'elementor/connect/apps/register', function ( ConnectModule $connect_module ) {
55 50 $connect_module->register_app( 'ai', Ai::get_class_name() );
56 51 } );
57 52
@@ -124,9 +119,8 @@
124 119 add_action( 'admin_init', [ $this, 'enqueue_ai_products_page_scripts' ] );
125 120 add_action( 'current_screen', [ $this, 'enqueue_ai_single_product_page_scripts' ] );
126 121 add_action( 'wp_ajax_elementor-ai-get-product-images', [ $this, 'get_product_images_ajax' ] );
127 122 add_action( 'wp_ajax_elementor-ai-set-product-images', [ $this, 'set_product_images_ajax' ] );
128 - Product_Image_Unification_Intro::add_hooks();
129 123 }
130 124 }
131 125
132 126 add_action( 'enqueue_block_editor_assets', function() {
@@ -1549,49 +1543,6 @@
1549 1543 }
1550 1544
1551 1545 $product->set_gallery_image_ids( $gallery_image_ids );
1552 1546 $product->save();
1553 - }
1554 -
1555 - private function should_display_create_with_ai_banner() {
1556 - $elementor_pages = new \WP_Query( [
1557 - 'post_type' => 'page',
1558 - 'post_status' => 'publish',
1559 - 'fields' => 'ids',
1560 - 'posts_per_page' => self::MIN_PAGES_FOR_CREATE_WITH_AI_BANNER + 1,
1561 - ] );
1562 -
1563 - if ( $elementor_pages->post_count > self::MIN_PAGES_FOR_CREATE_WITH_AI_BANNER ) {
1564 - return false;
1565 - }
1566 -
1567 - if ( Utils::is_custom_kit_applied() ) {
1568 - return false;
1569 - }
1570 -
1571 - return true;
1572 - }
1573 -
1574 - private function get_create_with_ai_banner_data() {
1575 - return [
1576 - 'title' => 'Create and launch your site faster with AI',
1577 - 'description' => 'Share your vision with our AI Chat and watch as it becomes a brief, sitemap, and wireframes in minutes:',
1578 - 'input_placeholder' => 'Start describing the site you want to create...',
1579 - 'button_title' => 'Create with AI',
1580 - 'button_cta_url' => 'http://planner.elementor.com/chat.html',
1581 - 'background_image' => ELEMENTOR_ASSETS_URL . 'images/app/ai/ai-site-creator-homepage-bg.svg',
1582 - 'utm_source' => 'editor-home',
1583 - 'utm_medium' => 'wp-dash',
1584 - 'utm_campaign' => 'generate-with-ai',
1585 - ];
1586 - }
1587 -
1588 - public function add_create_with_ai_banner_to_homescreen( $home_screen_data ) {
1589 - if ( $this->should_display_create_with_ai_banner() ) {
1590 - $home_screen_data['create_with_ai'] = $this->get_create_with_ai_banner_data();
1591 - } else {
1592 - $home_screen_data['create_with_ai'] = null;
1593 - }
1594 -
1595 - return $home_screen_data;
1596 1547 }
1597 1548 }