Commit realizado el 12:13:52 08-04-2024

This commit is contained in:
Pagina Web Monito
2024-04-08 12:13:55 -04:00
commit 0c33094de9
7815 changed files with 1365694 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
## DIVI AI - Frontend APP
-----
-----
:smiley:
> How to trigger the AI app:
On a click event, we can hook the below statement:
```jQuery(window).trigger('et_ai_container_ready', [preferences, 'et-ai-app']);```
Param 1: Object **--->** preferences
```
const preferences = {
context: 'section',
date: new Date(),
};
```
This is just an example, you can pass any configuration you need.
Param 2: String **--->** 'container ID'
_We just have to pass a string as an ID, and the AI app will automatically create the element in the DOM_
> How the AI app starts:
AI app listens for the event and runs the _<APP />_ component.
```
$(window).on('et_ai_container_ready', (event, preferences, container) => {
...
...
<Provider store={store}>
<App />
</Provider>
...
});
```
We can pass the preferences like this, if necessary: (Index.tsx)
```
<Provider store={store}>
<App preferences={preferences} />
</Provider>
```
> How to start the test server:
Run `yarn` in the root to install packages
Run `yarn json-server` to start the JSON server
There is a db.json file included in the root directory for data.
Enjoy!

View File

@@ -0,0 +1,301 @@
<?php
if ( ! defined( 'ET_AI_SERVER_URL' ) ) {
define( 'ET_AI_SERVER_URL', 'https://ai.elegantthemes.com/api/v1' );
}
class ET_AI_App {
/**
* @var ET_AI_App
*/
private static $_instance;
/**
* Get the class instance.
*
* @since ??
*
* @return ET_AI_App
*/
public static function instance() {
if ( ! self::$_instance ) {
self::$_instance = new self();
self::init_hooks();
}
return self::$_instance;
}
/**
* Update ET Account.
*
* @since ??
*
* @return void
*/
public static function et_builder_update_et_account_local() {
// Username and API saved shall be reflected in Theme Options.
// Hence, using the same cap used in Theme Options.
et_core_security_check( 'edit_theme_options', 'et_builder_update_et_account', 'wp_nonce' );
$username = isset( $_POST['et_username'] ) ? sanitize_text_field( $_POST['et_username'] ) : '';
$api_key = isset( $_POST['et_api_key'] ) ? sanitize_text_field( $_POST['et_api_key'] ) : '';
$result = update_site_option(
'et_automatic_updates_options',
[
'username' => $username,
'api_key' => $api_key,
]
);
if ( $result ) {
wp_send_json_success();
} else {
wp_send_json_error();
}
}
/**
* Update AJAX calls list.
*
* @since ??
*
* @return Array
*/
public static function update_ajax_calls_list() {
return [ 'action' => array( 'et_builder_update_et_account_local', 'et_ai_upload_image' ) ];
}
/**
* AJAX Callback: Upload thumbnail and assign it to specified post.
*
* @since 4.17.0
*
* @global $_FILES['imageFile'] File to upload.
* @global $_POST['postId'] Post id to set thumbnail for.
*
* @return void
*/
public static function et_ai_upload_image() {
et_core_security_check( 'edit_posts', 'et_ai_upload_image', 'wp_nonce' );
// Get image URL from POST data
$image_url_raw = isset( $_POST['imageURL'] ) ? esc_url_raw( $_POST['imageURL'] ) : '';
// Check if image URL is valid
if ( $image_url_raw && '' !== $image_url_raw ) {
// Download image and add it to Media Library
$upload = media_sideload_image( $image_url_raw, get_the_id(), null, 'id' );
// Check for errors while downloading image
if ( is_wp_error( $upload ) ) {
wp_send_json_error( [ 'message' => $upload->get_error_message() ] );
}
// Get attachment ID and image URL
$attachment_id = is_wp_error( $upload ) ? 0 : $upload;
$image_url = get_attached_file( $attachment_id );
// Convert image to JPG and compress with quality of 80
$image_editor = wp_get_image_editor( $image_url );
if ( ! is_wp_error( $image_editor ) ) {
$image_editor->set_quality( 80 );
$saved = $image_editor->save( null, 'image/jpeg' );
if ( ! is_wp_error( $saved ) ) {
wp_delete_attachment( $attachment_id, true );
$attachment_id = wp_insert_attachment([
'post_mime_type' => 'image/jpeg',
'post_title' => preg_replace('/\.[^.]+$/', '', basename($saved['path'])),
'post_content' => '',
'post_status' => 'inherit'
], $saved['path']);
wp_update_attachment_metadata($attachment_id, wp_generate_attachment_metadata($attachment_id, $saved['path']));
}
}
// Send success response with attachment ID and URL
wp_send_json_success([
'localImageID' => $attachment_id,
'localImageURL' => wp_get_attachment_url( $attachment_id ),
]);
}
}
/**
* Initialize hooks.
*
* @since ??
*
* @return void
*/
public static function init_hooks() {
add_filter( 'et_builder_load_requests', [ 'ET_AI_App', 'update_ajax_calls_list' ] );
add_action( 'wp_ajax_et_builder_update_et_account_local', [ 'ET_AI_App', 'et_builder_update_et_account_local' ] );
add_action( 'wp_ajax_et_ai_upload_image', [ 'ET_AI_App', 'et_ai_upload_image' ] );
}
/**
* Gets the available languages.
*
* @return array Available languages.
*/
public static function get_available_languages() {
$translations = get_site_transient( 'available_translations' );
$available_languages = [];
if ( ! $translations ) {
/** Load WordPress Translation Install API */
require_once ABSPATH . 'wp-admin/includes/translation-install.php';
$translations = wp_get_available_translations();
}
foreach ( $translations as $translation => $translation_data ) {
if ( ! isset( $translation_data['english_name'] ) ) {
continue;
}
$english_name = $translation_data['english_name'];
$available_languages[ $english_name ] = $english_name;
}
return $available_languages;
}
/**
* Gets the language name in English.
*
* @return string Language name in English. Otherwise the locale.
*/
public static function get_language_english_name() {
$current_locale = get_locale();
$translations = get_site_transient( 'available_translations' );
if ( ! $translations ) {
/** Load WordPress Translation Install API */
require_once ABSPATH . 'wp-admin/includes/translation-install.php';
$translations = wp_get_available_translations();
}
// Output the language name.
return isset( $translations[ $current_locale ]['english_name'] )
? $translations[ $current_locale ]['english_name']
: $current_locale;
}
/**
* ET_AI_App helpers.
*
* @since ??
*/
public static function get_ai_app_helpers() {
if ( ! defined( 'ET_AI_PLUGIN_DIR' ) ) {
define( 'ET_AI_PLUGIN_DIR', get_template_directory() . '/ai-app' );
}
$attributes = array(
'i18n' => [
'userPrompt' => require ET_AI_PLUGIN_DIR . '/i18n/user-prompt.php',
'authorization' => require ET_AI_PLUGIN_DIR . '/i18n/authorization.php',
'aiCode' => require ET_AI_PLUGIN_DIR . '/i18n/ai-code.php',
],
'ajaxurl' => is_ssl() ? admin_url( 'admin-ajax.php' ) : admin_url( 'admin-ajax.php', 'http' ),
'nonces' => [
'et_builder_update_et_account' => wp_create_nonce( 'et_builder_update_et_account' ),
'et_ai_upload_image' => wp_create_nonce( 'et_ai_upload_image' ),
],
'site_name' => '',
'site_description' => '',
'site_language' => self::get_language_english_name(),
'available_languages' => self::get_available_languages(),
'images_uri' => ET_AI_PLUGIN_URI . '/app/images',
'ai_server_url' => ET_AI_SERVER_URL,
);
if ( get_post_type() === 'page' ) {
if ( is_multisite() ) {
$sample_tagline = sprintf( __( 'Just another %s site' ), get_network()->site_name );
} else {
$sample_tagline = __( 'Just another WordPress site' );
}
if ( get_bloginfo( 'description' ) !== $sample_tagline ) {
$attributes['site_description'] = get_bloginfo( 'description' );
}
$attributes['site_name'] = get_bloginfo( 'name' );
}
return $attributes;
}
/**
* Load the Cloud App scripts.
*
* @since ??
*
* @return void
*/
public static function load_js( $enqueue_prod_scripts = true, $skip_react_loading = false ) {
if ( defined( 'ET_BUILDER_PLUGIN_ACTIVE' ) ) {
if ( ! defined( 'ET_AI_PLUGIN_URI' ) ) {
define( 'ET_AI_PLUGIN_URI', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
}
if ( ! defined( 'ET_AI_PLUGIN_DIR' ) ) {
define( 'ET_AI_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
}
} else {
if ( ! defined( 'ET_AI_PLUGIN_URI' ) ) {
define( 'ET_AI_PLUGIN_URI', get_template_directory_uri() . '/ai-app' );
}
if ( ! defined( 'ET_AI_PLUGIN_DIR' ) ) {
define( 'ET_AI_PLUGIN_DIR', get_template_directory() . '/ai-app' );
}
}
$CORE_VERSION = defined( 'ET_CORE_VERSION' ) ? ET_CORE_VERSION : '';
$ET_DEBUG = defined( 'ET_DEBUG' ) && ET_DEBUG;
$DEBUG = $ET_DEBUG;
$home_url = wp_parse_url( get_site_url() );
$build_dir_uri = ET_AI_PLUGIN_URI . '/build';
$common_scripts = ET_COMMON_URL . '/scripts';
$cache_buster = $DEBUG ? mt_rand() / mt_getrandmax() : $CORE_VERSION;
$asset_path = ET_AI_PLUGIN_DIR . '/build/et-ai-app.bundle.js';
if ( file_exists( $asset_path ) ) {
wp_enqueue_style( 'et-ai-styles', "{$build_dir_uri}/et-ai-app.bundle.css", [], (string) $cache_buster );
}
wp_enqueue_script( 'es6-promise', "{$common_scripts}/es6-promise.auto.min.js", [], '4.2.2', true );
$BUNDLE_DEPS = [
'jquery',
'react',
'react-dom',
'es6-promise',
];
if ( $DEBUG || $enqueue_prod_scripts || file_exists( $asset_path ) ) {
$BUNDLE_URI = ! file_exists( $asset_path ) ? "{$home_url['scheme']}://{$home_url['host']}:31498/et-ai-app.bundle.js" : "{$build_dir_uri}/et-ai-app.bundle.js";
// Skip the React loading if we already have React ( Gutenberg editor for example ) to avoid conflicts.
if ( ! $skip_react_loading ) {
if ( function_exists( 'et_fb_enqueue_react' ) ) {
et_fb_enqueue_react();
}
}
wp_enqueue_script( 'et-ai-app', $BUNDLE_URI, $BUNDLE_DEPS, (string) $cache_buster, true );
wp_localize_script( 'et-ai-app', 'et_ai_data', ET_AI_App::get_ai_app_helpers());
}
}
}
ET_AI_App::instance();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,118 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
CSSLint v1.0.4
Copyright (c) 2016 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the 'Software'), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/*! This minified app bundle contains open source software from several third party developers. Please review the LICENSE.txt in the current directory for complete licensing, copyright and patent information. This file and the included code may not be redistributed without the attributions listed in LICENSE.txt, including associate copyright notices and licensing information. */
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* use-sync-external-store-shim.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* use-sync-external-store-shim/with-selector.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* Copyright 2015, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.14.0
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

View File

@@ -0,0 +1,6 @@
<?php
return [
'Replace Existing Content' => esc_html__( 'Replace Existing Code', 'Divi' ),
'Insert Code at Cursor' => esc_html__( 'Insert Code at Cursor', 'Divi' ),
];

View File

@@ -0,0 +1,13 @@
<?php
return array(
'$apiKeyPromptHint' => esc_html__( 'Enter your ET Account API Key.', 'Divi' ),
'$usernamePromptHint' => esc_html__( 'Enter your ET Account Username.', 'Divi' ),
'API Key' => esc_html__( 'API Key', 'Divi' ),
'Authentication Required' => esc_html__( 'Authentication Required', 'Divi' ),
'Username' => esc_html__( 'Username', 'Divi' ),
'Submit' => esc_html__( 'Submit', 'Divi' ),
'Authentication' => esc_html__( 'Authentication', 'Divi' ),
'$authErrorMessage' => esc_html__( 'Invalid API Key or Username', 'Divi' ),
'$authenticationPrompt' => esc_html__( 'Before you can generate Text using the Divi AI you must authenticate your Elegant Themes subscription.', 'Divi' ),
);

View File

@@ -0,0 +1,207 @@
<?php
return array(
'Added Context' => esc_html__( 'Added Context', 'Divi' ),
'Advanced Settings' => esc_html__( 'Advanced Settings', 'Divi' ),
'Change Image Style' => esc_html__( 'Change Image Style', 'Divi' ),
'Change Tone' => esc_html__( 'Change Tone', 'Divi' ),
'Choose Type' => esc_html__( 'Choose Type', 'Divi' ),
'Choose Style' => esc_html__( 'Choose Style', 'Divi' ),
'Content Results' => esc_html__( 'Content Results', 'Divi' ),
'Content Type' => esc_html__( 'Content Type', 'Divi' ),
'Generate' => esc_html__( 'Generate', 'Divi' ),
'Generate Image With AI' => esc_html__( 'Generate Image With AI', 'Divi' ),
'Generate More Like This One' => esc_html__( 'Generate More Like This One', 'Divi' ),
'Generate Prompt With AI' => esc_html__( 'Generate Prompt With AI', 'Divi' ),
'Generate Text' => esc_html__( 'Generate Text', 'Divi' ),
'Generate Code' => esc_html__( 'Generate Code', 'Divi' ),
'Generating' => esc_html__( 'Generating', 'Divi' ),
'Generating Images' => esc_html__( 'Generating Images', 'Divi' ),
'Guide Me' => esc_html__( 'Guide Me', 'Divi' ),
'Height' => esc_html__( 'Height', 'Divi' ),
'Image Description' => esc_html__( 'Image Description', 'Divi' ),
'Image Size' => esc_html__( 'Image Size', 'Divi' ),
'Image Style' => esc_html__( 'Image Style', 'Divi' ),
'Image Type' => esc_html__( 'Image Type', 'Divi' ),
'Modify Selected Image' => esc_html__( 'Modify Selected Image', 'Divi' ),
'Modify With AI' => esc_html__( 'Modify With AI', 'Divi' ),
'Mood & Lighting' => esc_html__( 'Mood & Lighting', 'Divi' ),
'Aspect Ratio' => esc_html__( 'Aspect Ratio', 'Divi' ),
'Size' => esc_html__( 'Size', 'Divi' ),
'Width' => esc_html__( 'Width', 'Divi' ),
'Height' => esc_html__( 'Height', 'Divi' ),
'More Options' => esc_html__( 'More Options', 'Divi' ),
'Must Use Keywords' => esc_html__( 'Must Use Keywords', 'Divi' ),
'New Description' => esc_html__( 'New Description', 'Divi' ),
'Refine Result' => esc_html__( 'Refine Result', 'Divi' ),
'Refine your prompt' => esc_html__( 'Refine your prompt', 'Divi' ),
'Regenerate' => esc_html__( 'Regenerate', 'Divi' ),
'Results' => esc_html__( 'Results', 'Divi' ),
'Rewrite to be more engaging' => esc_html__( 'Rewrite to be more engaging', 'Divi' ),
'Rewrite With AI' => esc_html__( 'Rewrite With AI', 'Divi' ),
'Select Mood' => esc_html__( 'Select Mood', 'Divi' ),
'Tone of Voice' => esc_html__( 'Tone of Voice', 'Divi' ),
'Use This Image' => esc_html__( 'Use This Image', 'Divi' ),
'Use This Text' => esc_html__( 'Use This Text', 'Divi' ),
'What are you writing about?' => esc_html__( 'What are you writing about?', 'Divi' ),
'Width' => esc_html__( 'Width', 'Divi' ),
'Write %s With AI' => esc_html__( 'Write %s With AI', 'Divi' ),
'Close' => esc_html__( 'Close', 'Divi' ),
'Error' => esc_html__( 'Error', 'Divi' ),
'What would you like to create using custom code?' => esc_html__( 'What would you like to create using custom code?', 'Divi' ),
'How would you like to change the style of this element?' => esc_html__( 'How would you like to change the style of this element?', 'Divi' ),
'Use This Code' => esc_html__( 'Use This Code', 'Divi' ),
'length' => [
'ContentLength' => esc_html__( 'Content Length', 'Divi' ),
'Exactly' => esc_html__( 'Exactly', 'Divi' ),
'Maximum' => esc_html__( 'Maximum', 'Divi' ),
'AtLeast' => esc_html__( 'At Least', 'Divi' ),
'About' => esc_html__( 'About', 'Divi' ),
'Words' => esc_html__( 'Words', 'Divi' ),
'Characters' => esc_html__( 'Characters', 'Divi' ),
'Sentences' => esc_html__( 'Sentences', 'Divi' ),
'Paragraphs' => esc_html__( 'Paragraphs', 'Divi' ),
'ListItems' => esc_html__( 'List Items', 'Divi' ),
],
'tags' => [
'Retry' => esc_html__( 'Retry', 'Divi' ),
'Lengthen' => esc_html__( 'Lengthen', 'Divi' ),
'Shorten' => esc_html__( 'Shorten', 'Divi' ),
'Simplify' => esc_html__( 'Simplify', 'Divi' ),
'GenerateMore' => esc_html__( 'Generate Four More', 'Divi' ),
],
'tones' => [
'informative' => esc_html__( 'Informative', 'Divi' ),
'humorous' => esc_html__( 'Humorous', 'Divi' ),
'formal' => esc_html__( 'Formal', 'Divi' ),
'respectful' => esc_html__( 'Respectful', 'Divi' ),
],
'imageStyles' => [
'photo' => [
'label' => esc_html__( 'Photo', 'Divi' ),
'thumbnail' => 'https://www.elegantthemes.com/images/vb/ai/photo.jpg',
],
'digitalPainting' => [
'label' => esc_html__( 'Digital Painting', 'Divi' ),
'thumbnail' => 'https://www.elegantthemes.com/images/vb/ai/digitalPainting.jpg',
],
'conceptArt' => [
'label' => esc_html__( 'Concept Art', 'Divi' ),
'thumbnail' => 'https://www.elegantthemes.com/images/vb/ai/conceptArt.jpg',
],
'vector' => [
'label' => esc_html__( 'Vector Graphic', 'Divi' ),
'thumbnail' => 'https://www.elegantthemes.com/images/vb/ai/vector.jpg',
],
'threeD' => [
'label' => esc_html__( '3D Render', 'Divi' ),
'thumbnail' => 'https://www.elegantthemes.com/images/vb/ai/threeD.jpg',
],
'drawing' => [
'label' => esc_html__( 'Drawing', 'Divi' ),
'thumbnail' => 'https://www.elegantthemes.com/images/vb/ai/drawing.jpg',
],
'abstract' => [
'label' => esc_html__( 'Abstract Art', 'Divi' ),
'thumbnail' => 'https://www.elegantthemes.com/images/vb/ai/abstract.jpg',
],
'comicBook' => [
'label' => esc_html__( 'Comic Book', 'Divi' ),
'thumbnail' => 'https://www.elegantthemes.com/images/vb/ai/comicBook.jpg',
],
'watercolor' => [
'label' => esc_html__( 'Watercolor', 'Divi' ),
'thumbnail' => 'https://www.elegantthemes.com/images/vb/ai/watercolor.jpg',
],
'painting' => [
'label' => esc_html__( 'Painting', 'Divi' ),
'thumbnail' => 'https://www.elegantthemes.com/images/vb/ai/painting.jpg',
],
'anime' => [
'label' => esc_html__( 'Anime', 'Divi' ),
'thumbnail' => 'https://www.elegantthemes.com/images/vb/ai/anime.jpg',
],
'cartoon' => [
'label' => esc_html__( 'Cartoon', 'Divi' ),
'thumbnail' => 'https://www.elegantthemes.com/images/vb/ai/cartoon.jpg',
],
'none' => [
'label' => esc_html__( 'None', 'Divi' ),
'thumbnail' => 'https://www.elegantthemes.com/images/vb/ai/none.png',
],
],
'contextTypes' => [
'page' => esc_html__( 'This Page Content', 'Divi' ),
'section' => esc_html__( 'This Section Content', 'Divi' ),
'module' => esc_html__( 'This Module Content', 'Divi' ),
'empty' => esc_html__( 'No Context', 'Divi' ),
],
'toneOfVoice' => [
'creative' => esc_html__( 'Creative', 'Divi' ),
'informative' => esc_html__( 'Informative', 'Divi' ),
'funny' => esc_html__( 'Funny', 'Divi' ),
],
'fieldTypes' => [
'paragraph' => esc_html__( 'Paragraph', 'Divi' ),
'title' => esc_html__( 'Title', 'Divi' ),
'button' => esc_html__( 'Button', 'Divi' ),
'blog_post' => esc_html__( 'Blog Post', 'Divi' ),
'social_post' => esc_html__( 'Social Media Post', 'Divi' ),
],
'aspectRatio' => [
'square' => esc_html__( 'Square (1:1)', 'Divi' ),
'landscape' => esc_html__( 'Landscape (8:5)', 'Divi' ),
'portrait' => esc_html__( 'Portrait (3:4)', 'Divi' ),
'custom' => esc_html__( 'Custom Size', 'Divi' ),
],
'$contentPromptHint' => esc_html__( 'Tell Divi AI what you want it to write about. Talk to it like you would a person.', 'Divi' ),
'$codePromptHint' => esc_html__( 'Tell Divi AI what you want to achieve using custom code. Divi AI will respond appropriately based on the element and code field you are editing.', 'Divi' ),
'$contentTypeHint' => esc_html__( 'What type of content are you writing? This will help Divi AI tailor the output to your desired format.', 'Divi' ),
'$contextHint' => esc_html__( 'Supply Divi AI with additional context. The chosen context will alter the results and help Divi AI create relevant content.', 'Divi' ),
'$imagePromptHint' => esc_html__( 'Tell Divi AI what kind of image you want it to create. Be as descriptive as you like!', 'Divi' ),
'$aspectRatioHint' => esc_html__( 'Choose the aspect ratio that will be used for the generated image.', 'Divi' ),
'$imageWidthHint' => esc_html__( 'Set the width of image in pixels.', 'Divi' ),
'$imageHeightHint' => esc_html__( 'Set the height of image in pixels.', 'Divi' ),
'$imageStyleHint' => esc_html__( 'Choose what style of image you would like to create. Or, select none and describe the style of image in your prompt.', 'Divi' ),
'$mustUseHint' => esc_html__( 'These words will be forced to appear in the content. This is useful for SEO when optimizing for specific keywords, for example.', 'Divi' ),
'$numberWordsHint' => esc_html__( 'Tell Divi AI how long you want the content it generates to be. The output will be close to, but not exactly equal to, the length you define.', 'Divi' ),
'$refineHint' => esc_html__( 'You can continue to alter and improve the content that was generated by giving AI further instructions.', 'Divi' ),
'$contentPlaceholder' => esc_html__( 'Tell Divi AI about the content you would like it to write.', 'Divi' ),
'$imagePlaceholder' => esc_html__( 'Tell Divi AI about the image you would like it to create.', 'Divi' ),
'Generating' => esc_html__( 'Generating', 'Divi' ),
'Generate Prompt With AI' => esc_html__( 'Generate Prompt With AI', 'Divi' ),
'More Options' => esc_html__( 'More Options', 'Divi' ),
'language' => [
'Language' => esc_html__( 'Language', 'Divi' ),
'LanugageOfPrompt' => esc_html__( 'Language of Prompt', 'Divi' ),
'LanguageOfWebsite' => esc_html__( 'Language of Website', 'Divi' ),
'$languageHint' => esc_html__( 'What language should Divi AI write in? Divi AI can write in over 26 languages!', 'Divi' ),
],
'$toneHint' => esc_html__( 'Give you content a unique spin by telling Divi AI what tone of voice to use.', 'Divi' ),
'Something went wrong' => esc_html__( 'Something went wrong. Please try again later or try different request.', 'Divi' ),
'$unable_to_render_reference' => esc_html__( 'Images stored on a different website cannot be used as reference. The issue can be resolved by uploading the image to the WordPress media library.', 'Divi' ),
'Learn More' => esc_html__( 'Learn More', 'Divi' ),
'AI Unlimited' => esc_html__( 'AI Unlimited', 'Divi' ),
'Free Trial' => esc_html__( 'Free Trial', 'Divi' ),
'Upgrade' => esc_html__( 'Upgrade', 'Divi' ),
'upgradeTipPart1' => esc_html__( 'You can try out Divi AI 100 times', 'Divi' ),
'upgradeTipPart2' => esc_html__( 'for free. Upgrade to enjoy', 'Divi' ),
'upgradeTipPart3' => esc_html__( 'unlimited usage.', 'Divi' ),
'Level up your efficiency' => esc_html__( 'Level up your efficiency with limitless AI content and image requests.', 'Divi' ),
'Purchase Membership' => esc_html__( 'Your free Divi AI usage limit has been exceeded. Purchase a Divi AI membership to use Divi AI without any limits!', 'Divi' ),
'Upgrade Membership' => esc_html__( 'Your Divi AI usage limit has been exceeded. Upgrade Divi AI membership to use Divi AI without any limits!', 'Divi' ),
'$serverBusy' => esc_html__( 'Divi AI Server is too busy right now. Please try again in a few minutes.', 'Divi' ),
'$finalizeImage' => esc_html__( 'Divi AI is finalizing your images! Please stand by.', 'Divi' ),
'$imagesETAMessage' => esc_html__( 'About %s seconds remaining', 'Divi' ),
'Upload a Reference Image' => esc_html__( 'Upload a Reference Image', 'Divi' ),
'Reference Image (Optional)' => esc_html__( 'Reference Image (Optional)', 'Divi' ),
'$referenceImageHint' => esc_html__( 'Supply Divi AI with a reference image. This image will be combined with your image description to create the final image. Reference images are a great way to inform Divi AI about a desired composition or style while altering the subject matter of the reference image using your image description.', 'Divi' ),
'Reference Image Influence' => esc_html__( 'Reference Image Influence', 'Divi' ),
'$referenceImageInfluenceHint' => esc_html__( 'Define how much influence your reference image has over the generated image. The less influence you give to the reference image, the more impact your image description will have.', 'Divi' ),
'Upgrade to Divi AI Unlimited' => esc_html__( 'Upgrade to Divi AI Unlimited', 'Divi' ),
'The size of the image must be less than 10MB' => esc_html__( 'The size of the image must be less than 10MB.', 'Divi' ),
'You have to update Divi in order to use AI' => esc_html__( 'You have to update Divi in order to use AI.', 'Divi' ),
'Purchase A Divi AI Membership' => et_esc_html_once( 'Purchase A Divi AI Membership', 'Divi' ),
);