Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/aimogen-pro/res/aiomatic-youtube-list.php

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + <?php
2 + function aiomatic_youtube_panel()
3 + {
4 + $aiomatic_language_names = array(
5 + esc_html__("English", 'aiomatic-automatic-ai-content-writer'),
6 + esc_html__("Spanish", 'aiomatic-automatic-ai-content-writer'),
7 + esc_html__("French", 'aiomatic-automatic-ai-content-writer'),
8 + esc_html__("Italian", 'aiomatic-automatic-ai-content-writer'),
9 + esc_html__("Afrikaans", 'aiomatic-automatic-ai-content-writer'),
10 + esc_html__("Albanian", 'aiomatic-automatic-ai-content-writer'),
11 + esc_html__("Arabic", 'aiomatic-automatic-ai-content-writer'),
12 + esc_html__("Amharic", 'aiomatic-automatic-ai-content-writer'),
13 + esc_html__("Armenian", 'aiomatic-automatic-ai-content-writer'),
14 + esc_html__("Belarusian", 'aiomatic-automatic-ai-content-writer'),
15 + esc_html__("Bulgarian", 'aiomatic-automatic-ai-content-writer'),
16 + esc_html__("Catalan", 'aiomatic-automatic-ai-content-writer'),
17 + esc_html__("Chinese Simplified", 'aiomatic-automatic-ai-content-writer'),
18 + esc_html__("Croatian", 'aiomatic-automatic-ai-content-writer'),
19 + esc_html__("Czech", 'aiomatic-automatic-ai-content-writer'),
20 + esc_html__("Danish", 'aiomatic-automatic-ai-content-writer'),
21 + esc_html__("Dutch", 'aiomatic-automatic-ai-content-writer'),
22 + esc_html__("Estonian", 'aiomatic-automatic-ai-content-writer'),
23 + esc_html__("Filipino", 'aiomatic-automatic-ai-content-writer'),
24 + esc_html__("Finnish", 'aiomatic-automatic-ai-content-writer'),
25 + esc_html__("Galician", 'aiomatic-automatic-ai-content-writer'),
26 + esc_html__("German", 'aiomatic-automatic-ai-content-writer'),
27 + esc_html__("Greek", 'aiomatic-automatic-ai-content-writer'),
28 + esc_html__("Hebrew", 'aiomatic-automatic-ai-content-writer'),
29 + esc_html__("Hindi", 'aiomatic-automatic-ai-content-writer'),
30 + esc_html__("Hungarian", 'aiomatic-automatic-ai-content-writer'),
31 + esc_html__("Icelandic", 'aiomatic-automatic-ai-content-writer'),
32 + esc_html__("Indonesian", 'aiomatic-automatic-ai-content-writer'),
33 + esc_html__("Irish", 'aiomatic-automatic-ai-content-writer'),
34 + esc_html__("Japanese", 'aiomatic-automatic-ai-content-writer'),
35 + esc_html__("Korean", 'aiomatic-automatic-ai-content-writer'),
36 + esc_html__("Latvian", 'aiomatic-automatic-ai-content-writer'),
37 + esc_html__("Lithuanian", 'aiomatic-automatic-ai-content-writer'),
38 + esc_html__("Norwegian", 'aiomatic-automatic-ai-content-writer'),
39 + esc_html__("Macedonian", 'aiomatic-automatic-ai-content-writer'),
40 + esc_html__("Malay", 'aiomatic-automatic-ai-content-writer'),
41 + esc_html__("Maltese", 'aiomatic-automatic-ai-content-writer'),
42 + esc_html__("Persian", 'aiomatic-automatic-ai-content-writer'),
43 + esc_html__("Polish", 'aiomatic-automatic-ai-content-writer'),
44 + esc_html__("Portuguese", 'aiomatic-automatic-ai-content-writer'),
45 + esc_html__("Romanian", 'aiomatic-automatic-ai-content-writer'),
46 + esc_html__("Russian", 'aiomatic-automatic-ai-content-writer'),
47 + esc_html__("Serbian", 'aiomatic-automatic-ai-content-writer'),
48 + esc_html__("Slovak", 'aiomatic-automatic-ai-content-writer'),
49 + esc_html__("Slovenian", 'aiomatic-automatic-ai-content-writer'),
50 + esc_html__("Swahili", 'aiomatic-automatic-ai-content-writer'),
51 + esc_html__("Swedish", 'aiomatic-automatic-ai-content-writer'),
52 + esc_html__("Thai", 'aiomatic-automatic-ai-content-writer'),
53 + esc_html__("Turkish", 'aiomatic-automatic-ai-content-writer'),
54 + esc_html__("Ukrainian", 'aiomatic-automatic-ai-content-writer'),
55 + esc_html__("Vietnamese", 'aiomatic-automatic-ai-content-writer'),
56 + esc_html__("Welsh", 'aiomatic-automatic-ai-content-writer'),
57 + esc_html__("Yiddish", 'aiomatic-automatic-ai-content-writer'),
58 + esc_html__("Tamil", 'aiomatic-automatic-ai-content-writer'),
59 + esc_html__("Azerbaijani", 'aiomatic-automatic-ai-content-writer'),
60 + esc_html__("Kannada", 'aiomatic-automatic-ai-content-writer'),
61 + esc_html__("Basque", 'aiomatic-automatic-ai-content-writer'),
62 + esc_html__("Bengali", 'aiomatic-automatic-ai-content-writer'),
63 + esc_html__("Latin", 'aiomatic-automatic-ai-content-writer'),
64 + esc_html__("Chinese Traditional", 'aiomatic-automatic-ai-content-writer'),
65 + esc_html__("Esperanto", 'aiomatic-automatic-ai-content-writer'),
66 + esc_html__("Georgian", 'aiomatic-automatic-ai-content-writer'),
67 + esc_html__("Telugu", 'aiomatic-automatic-ai-content-writer'),
68 + esc_html__("Gujarati", 'aiomatic-automatic-ai-content-writer'),
69 + esc_html__("Haitian Creole", 'aiomatic-automatic-ai-content-writer'),
70 + esc_html__("Urdu", 'aiomatic-automatic-ai-content-writer'),
71 + esc_html__("Burmese", 'aiomatic-automatic-ai-content-writer'),
72 + esc_html__("Bosnian", 'aiomatic-automatic-ai-content-writer'),
73 + esc_html__("Cebuano", 'aiomatic-automatic-ai-content-writer'),
74 + esc_html__("Chichewa", 'aiomatic-automatic-ai-content-writer'),
75 + esc_html__("Corsican", 'aiomatic-automatic-ai-content-writer'),
76 + esc_html__("Frisian", 'aiomatic-automatic-ai-content-writer'),
77 + esc_html__("Scottish Gaelic", 'aiomatic-automatic-ai-content-writer'),
78 + esc_html__("Hausa", 'aiomatic-automatic-ai-content-writer'),
79 + esc_html__("Hawaian", 'aiomatic-automatic-ai-content-writer'),
80 + esc_html__("Hmong", 'aiomatic-automatic-ai-content-writer'),
81 + esc_html__("Igbo", 'aiomatic-automatic-ai-content-writer'),
82 + esc_html__("Javanese", 'aiomatic-automatic-ai-content-writer'),
83 + esc_html__("Kazakh", 'aiomatic-automatic-ai-content-writer'),
84 + esc_html__("Khmer", 'aiomatic-automatic-ai-content-writer'),
85 + esc_html__("Kurdish", 'aiomatic-automatic-ai-content-writer'),
86 + esc_html__("Kyrgyz", 'aiomatic-automatic-ai-content-writer'),
87 + esc_html__("Lao", 'aiomatic-automatic-ai-content-writer'),
88 + esc_html__("Luxembourgish", 'aiomatic-automatic-ai-content-writer'),
89 + esc_html__("Malagasy", 'aiomatic-automatic-ai-content-writer'),
90 + esc_html__("Malayalam", 'aiomatic-automatic-ai-content-writer'),
91 + esc_html__("Maori", 'aiomatic-automatic-ai-content-writer'),
92 + esc_html__("Marathi", 'aiomatic-automatic-ai-content-writer'),
93 + esc_html__("Mongolian", 'aiomatic-automatic-ai-content-writer'),
94 + esc_html__("Nepali", 'aiomatic-automatic-ai-content-writer'),
95 + esc_html__("Pashto", 'aiomatic-automatic-ai-content-writer'),
96 + esc_html__("Punjabi", 'aiomatic-automatic-ai-content-writer'),
97 + esc_html__("Samoan", 'aiomatic-automatic-ai-content-writer'),
98 + esc_html__("Sesotho", 'aiomatic-automatic-ai-content-writer'),
99 + esc_html__("Shona", 'aiomatic-automatic-ai-content-writer'),
100 + esc_html__("Sindhi", 'aiomatic-automatic-ai-content-writer'),
101 + esc_html__("Sinhala", 'aiomatic-automatic-ai-content-writer'),
102 + esc_html__("Somali", 'aiomatic-automatic-ai-content-writer'),
103 + esc_html__("Sundanese", 'aiomatic-automatic-ai-content-writer'),
104 + esc_html__("Swahili", 'aiomatic-automatic-ai-content-writer'),
105 + esc_html__("Tajik", 'aiomatic-automatic-ai-content-writer'),
106 + esc_html__("Uzbek", 'aiomatic-automatic-ai-content-writer'),
107 + esc_html__("Xhosa", 'aiomatic-automatic-ai-content-writer'),
108 + esc_html__("Yoruba", 'aiomatic-automatic-ai-content-writer'),
109 + esc_html__("Zulu", 'aiomatic-automatic-ai-content-writer'),
110 + esc_html__("Assammese", 'aiomatic-automatic-ai-content-writer'),
111 + esc_html__("Aymara", 'aiomatic-automatic-ai-content-writer'),
112 + esc_html__("Bambara", 'aiomatic-automatic-ai-content-writer'),
113 + esc_html__("Bhojpuri", 'aiomatic-automatic-ai-content-writer'),
114 + esc_html__("Dhivehi", 'aiomatic-automatic-ai-content-writer'),
115 + esc_html__("Dogri", 'aiomatic-automatic-ai-content-writer'),
116 + esc_html__("Ewe", 'aiomatic-automatic-ai-content-writer'),
117 + esc_html__("Guarani", 'aiomatic-automatic-ai-content-writer'),
118 + esc_html__("Ilocano", 'aiomatic-automatic-ai-content-writer'),
119 + esc_html__("Kinyarwanda", 'aiomatic-automatic-ai-content-writer'),
120 + esc_html__("Konkani", 'aiomatic-automatic-ai-content-writer'),
121 + esc_html__("Krio", 'aiomatic-automatic-ai-content-writer'),
122 + esc_html__("Kurdish - Sorani", 'aiomatic-automatic-ai-content-writer'),
123 + esc_html__("Lingala", 'aiomatic-automatic-ai-content-writer'),
124 + esc_html__("Luganda", 'aiomatic-automatic-ai-content-writer'),
125 + esc_html__("Maithili", 'aiomatic-automatic-ai-content-writer'),
126 + esc_html__("Meiteilon", 'aiomatic-automatic-ai-content-writer'),
127 + esc_html__("Mizo", 'aiomatic-automatic-ai-content-writer'),
128 + esc_html__("Odia", 'aiomatic-automatic-ai-content-writer'),
129 + esc_html__("Oromo", 'aiomatic-automatic-ai-content-writer'),
130 + esc_html__("Quechua", 'aiomatic-automatic-ai-content-writer'),
131 + esc_html__("Sanskrit", 'aiomatic-automatic-ai-content-writer'),
132 + esc_html__("Sepedi", 'aiomatic-automatic-ai-content-writer'),
133 + esc_html__("Tatar", 'aiomatic-automatic-ai-content-writer'),
134 + esc_html__("Tigrinya", 'aiomatic-automatic-ai-content-writer'),
135 + esc_html__("Tsonga", 'aiomatic-automatic-ai-content-writer'),
136 + esc_html__("Turkmen", 'aiomatic-automatic-ai-content-writer'),
137 + esc_html__("Twi", 'aiomatic-automatic-ai-content-writer'),
138 + esc_html__("Uyghur", 'aiomatic-automatic-ai-content-writer')
139 + );
140 + $all_models = aiomatic_get_all_models(true);
141 + $all_assistants = aiomatic_get_all_assistants(true);
142 + $all_rules = get_option('aiomatic_youtube_list', array());
143 + if($all_rules === false)
144 + {
145 + $all_rules = array();
146 + }
147 + $rules_count = count($all_rules);
148 + $rules_per_page = get_option('aiomatic_posts_per_page', 12);
149 + $max_pages = ceil($rules_count/$rules_per_page);
150 + if($max_pages == 0)
151 + {
152 + $max_pages = 1;
153 + }
154 + $aiomatic_Main_Settings = get_option('aiomatic_Main_Settings', false);
155 + if (!isset($aiomatic_Main_Settings['app_id']) || trim($aiomatic_Main_Settings['app_id']) == '')
156 + {
157 + ?>
158 + <h1><?php echo esc_html__("You must add an OpenAI/AiomaticAPI API Key into the plugin's 'Settings' menu before you can use this feature!", 'aiomatic-automatic-ai-content-writer');?></h1>
159 + <?php
160 + return;
161 + }
162 + ?>
163 + <div class="wp-header-end"></div>
164 + <div class="wrap">
165 + <h1><?php echo esc_html__("YouTube Videos To Posts", 'aiomatic-automatic-ai-content-writer');?></h1>
166 + </div>
167 + <?php
168 + $max_execution = ini_get('max_execution_time');
169 + if($max_execution != 0 && $max_execution < 1000)
170 + {
171 + ?>
172 + <div class="notice notice-error">
173 + <p class="cr_red">
174 + <?php echo sprintf( wp_kses( __( "Warning! Your PHP INI max_execution_time is less than 1000 seconds (%s). This means that the plugin's execution will be forcefully stopped by your server after this amount of seconds. Please increase it to ensure that the plugin functions properly. Please check details on server settings, <a href='%s' target='_blank'>here</a>.", 'aiomatic-automatic-ai-content-writer'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_html($max_execution), esc_url_raw( get_admin_url() . 'admin.php?page=aiomatic_logs#tab-2' ) );?>
175 + </p>
176 + </div>
177 + <?php
178 + }
179 + ?>
180 + <div class="wrap gs_popuptype_holder seo_pops">
181 + <div>
182 + <form id="myForm" method="post" action="<?php echo esc_url((aiomatic_isSecure() ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]");?>">
183 + <?php
184 + wp_nonce_field('aiomatic_save_rules', '_aiomaticr_nonce');
185 +
186 + if (isset($_GET['settings-updated'])) {
187 + ?>
188 + <div>
189 + <p class="cr_saved_notif"><strong><?php echo esc_html__("Settings saved.", 'aiomatic-automatic-ai-content-writer');?></strong></p>
190 + </div>
191 + <?php
192 + }
193 + ?>
194 + <div>
195 + <div class="hideMain">
196 + <hr/>
197 + <div class="table-responsive">
198 + <table id="mainRules" class="responsive table cr_main_table">
199 + <thead>
200 + <tr>
201 + <th class="cr_width_160">
202 + <?php echo esc_html__("ID", 'aiomatic-automatic-ai-content-writer');?>
203 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
204 + <div class="bws_hidden_help_text cr_min_260px">
205 + <?php
206 + echo esc_html__("This is the ID of the rule.", 'aiomatic-automatic-ai-content-writer');
207 + ?>
208 + </div>
209 + </div>
210 + </th>
211 + <th>
212 + <span id="aiomatic_mode_title"><?php echo esc_html__("YouTube Video URLs / Channel Handle URLs / Playlist URLs", 'aiomatic-automatic-ai-content-writer');?>*</span>
213 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
214 + <div class="bws_hidden_help_text cr_min_260px">
215 + <?php
216 + echo wp_kses(
217 + sprintf(
218 + __(
219 + "Please provide the URLs to the YouTube videos (one per line). You can also enter a YouTube handle URL (channel or user), example: %s. If you have added a YouTube API key in the plugin's 'Settings' menu, this will list all recent videos from this specific YouTube channel. Otherwise, it will list videos which appear also on the featured page of the channel. Videos added here must be public and have captions available (uploaded or auto generated). In case auto generated captions are used, the quality of the created article might be lower. Nested Shortcodes are also supported! Note: if you add a YouTube API key in the plugin's Settings -> 'API Keys' tab, you can also search for videos using keywords (not just video URLs).",
220 + 'aiomatic-automatic-ai-content-writer'
221 + ),
222 + '<a href="https://www.youtube.com/@CodeRevolutionTV/videos" target="_blank">https://www.youtube.com/@CodeRevolutionTV/videos</a>'
223 + ),
224 + array(
225 + 'a' => array(
226 + 'href' => array(),
227 + 'target' => array(),
228 + ),
229 + )
230 + );
231 +
232 + ?>
233 + </div>
234 + </div>
235 + </th>
236 + <th>
237 + <?php echo esc_html__("Schedule", 'aiomatic-automatic-ai-content-writer');?>*
238 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
239 + <div class="bws_hidden_help_text cr_min_260px">
240 + <?php
241 + $unlocker = get_option('aiomatic_minute_running_unlocked', false);
242 + if($unlocker == '1')
243 + {
244 + echo esc_html__("Select the interval in minutes after which you want this rule to run. Defined in minutes.", 'aiomatic-automatic-ai-content-writer');
245 + }
246 + else
247 + {
248 + echo esc_html__("Select the interval in hours after which you want this rule to run. Defined in hours.", 'aiomatic-automatic-ai-content-writer');
249 + }
250 + ?>
251 + </div>
252 + </div>
253 + </th>
254 + <th>
255 + <?php echo esc_html__("# Of Posts", 'aiomatic-automatic-ai-content-writer');?>*
256 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
257 + <div class="bws_hidden_help_text cr_min_260px">
258 + <?php
259 + echo esc_html__("Select the maximum number of posts that this rule can create at once.", 'aiomatic-automatic-ai-content-writer');
260 + ?>
261 + </div>
262 + </div>
263 + </th>
264 + <th>
265 + <?php echo esc_html__("Options", 'aiomatic-automatic-ai-content-writer');?>
266 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
267 + <div class="bws_hidden_help_text cr_min_260px">
268 + <?php
269 + echo esc_html__("Shows advanced settings for this rule.", 'aiomatic-automatic-ai-content-writer');
270 + ?>
271 + </div>
272 + </div>
273 + </th>
274 + <th class="cr_width_60">
275 + <?php echo esc_html__("Delete", 'aiomatic-automatic-ai-content-writer');?>
276 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
277 + <div class="bws_hidden_help_text cr_min_260px">
278 + <?php
279 + echo esc_html__("Do you want to delete this rule?", 'aiomatic-automatic-ai-content-writer');
280 + ?>
281 + </div>
282 + </div>
283 + </th>
284 + <th class="cr_width_60">
285 + <?php echo esc_html__("Active", 'aiomatic-automatic-ai-content-writer');?>
286 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
287 + <div class="bws_hidden_help_text cr_min_260px">
288 + <?php
289 + echo esc_html__("Do you want to enable this rule? You can deactivate any rule (you don't have to delete them to deactivate them).", 'aiomatic-automatic-ai-content-writer');
290 + ?>
291 + </div>
292 + </div>
293 + <br/>
294 + <input type="checkbox" onchange="thisonChangeHandler(this)" id="exclusion">
295 + </th>
296 + <th class="cr_width_160">
297 + <?php echo esc_html__("Info", 'aiomatic-automatic-ai-content-writer');?>
298 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
299 + <div class="bws_hidden_help_text cr_min_260px">
300 + <?php
301 + echo esc_html__("The number of items (posts, pages) this rule has generated so far.", 'aiomatic-automatic-ai-content-writer');
302 + ?>
303 + </div>
304 + </div>
305 + </th>
306 + <th class="cr_actions">
307 + <?php echo esc_html__("Actions", 'aiomatic-automatic-ai-content-writer');?>
308 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
309 + <div class="bws_hidden_help_text cr_min_260px">
310 + <?php
311 + echo esc_html__("Do you want to run this rule now? Note that only one instance of a rule is allowed at once.", 'aiomatic-automatic-ai-content-writer');
312 + ?>
313 + </div>
314 + </div>
315 + </th>
316 + </tr>
317 +
318 + </thead>
319 + <tbody>
320 + <?php
321 + echo aiomatic_expand_rules_youtube();
322 + if(isset($_GET['aiomatic_page']))
323 + {
324 + $current_page = $_GET['aiomatic_page'];
325 + }
326 + else
327 + {
328 + $current_page = '';
329 + }
330 + if($current_page == '' || (is_numeric($current_page) && $current_page == $max_pages))
331 + {
332 + ?>
333 +
334 + <tr>
335 + <td class="cr_short_td"><input type="text" name="aiomatic_youtube_list[rule_description][]" id="rule_description" class="cr_center" placeholder="Rule ID" value="" class="cr_width_full"/></td>
336 + <td class="cr_loi"><textarea rows="1" name="aiomatic_youtube_list[url_list][]" placeholder="https://www.youtube.com/watch?v=..." class="cr_width_full"></textarea></td>
337 + <td class="cr_comm_td"><input type="number" step="1" min="1" name="aiomatic_youtube_list[schedule][]" max="8765812" class="cr_width_60" placeholder="Select the rule schedule interval" value="24"/></td>
338 + <td class="cr_comm_td"><input type="number" step="1" min="0" name="aiomatic_youtube_list[max][]" class="cr_width_60" placeholder="Select the # of generated posts" value="1" /></td>
339 + <td class="cr_width_70 cr_center">
340 + <input type="button" id="mybtnfzr" value="Settings">
341 + <div id="mymodalfzr" class="codemodalfzr">
342 + <div class="codemodalfzr-content">
343 + <div class="codemodalfzr-header">
344 + <span id="aiomatic_close" class="codeclosefzr">&times;</span>
345 + <h2><span class="cr_color_white"><?php echo esc_html__("New Rule", 'aiomatic-automatic-ai-content-writer');?></span> <?php echo esc_html__("Advanced Settings", 'aiomatic-automatic-ai-content-writer');?></h2>
346 + </div>
347 + <div class="codemodalfzr-body">
348 + <div class="table-responsive">
349 + <table class="responsive table cr_main_table_nowr">
350 + <tr><td colspan="2">
351 + <h3><?php echo esc_html__("AI Assistant Options", 'aiomatic-automatic-ai-content-writer');?>:</h3>
352 + </td></tr>
353 + <tr>
354 + <td class="cr_min_width_200">
355 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
356 + <div class="bws_hidden_help_text cr_min_260px">
357 + <?php
358 + echo esc_html__("Select the AI Assistant to use for content creation. This will disable the ability to select AI models, as the models assisgned to the assistant will be used for content creation.", 'aiomatic-automatic-ai-content-writer');
359 + ?>
360 + </div>
361 + </div>
362 + <b><?php echo esc_html__("AI Assistant Name:", 'aiomatic-automatic-ai-content-writer');?></b>
363 + </td>
364 + <td><select id="assistant_id" name="aiomatic_youtube_list[assistant_id][]" class="cr_width_full" onchange="assistantSelected('');">
365 + <?php
366 + if($all_assistants === false)
367 + {
368 + echo '<option val="" selected disabled>' . esc_html__("Only OpenAI API is supported for Assistants API", 'aiomatic-automatic-ai-content-writer') . '</option>';
369 + }
370 + else
371 + {
372 + if(count($all_assistants) == 0)
373 + {
374 + echo '<option val="" selected disabled>' . esc_html__("No Assistans added, go to the plugin's 'AI Assistans' menu to add new assistants!", 'aiomatic-automatic-ai-content-writer') . '</option>';
375 + }
376 + else
377 + {
378 + echo '<option value="" selected';
379 + echo '>' . esc_html__("Don't use assistants, use AI models instead", 'aiomatic-automatic-ai-content-writer') . '</option>';
380 + foreach($all_assistants as $myassistant)
381 + {
382 + echo '<option value="' . esc_html($myassistant->ID) .'"';
383 + echo '>' . esc_html($myassistant->post_title);
384 + echo '</option>';
385 + }
386 + }
387 + }
388 + ?>
389 + </select>
390 + </td>
391 + </tr>
392 + <tr><td colspan="2">
393 + <h3><?php echo esc_html__("YouTube Video Options", 'aiomatic-automatic-ai-content-writer');?>:</h3>
394 + </td></tr>
395 + <tr>
396 + <td>
397 + <div>
398 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
399 + <div class="bws_hidden_help_text cr_min_260px">
400 + <?php
401 + echo esc_html__("Input a comma separated list of video captions prefered languages to use for the %%video_caption%% shortcode. Please use a comma separated list of 2 character language codes. Ex: en,es,hu,br. The plugin will use the fisrt language in the list that matches. If you leave this field blank, the default language caption will be imported for each video.", 'aiomatic-automatic-ai-content-writer');
402 + ?>
403 + </div>
404 + </div>
405 + <b><?php echo esc_html__("Video Caption Preferred Languages:", 'aiomatic-automatic-ai-content-writer');?></b>
406 + </td>
407 + <td>
408 + <input type="text" name="aiomatic_youtube_list[default_lang][]" value="" placeholder="Please insert a language list for video captions" class="cr_width_full">
409 + </td>
410 + </tr>
411 + <tr>
412 + <td>
413 + <div>
414 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
415 + <div class="bws_hidden_help_text cr_min_260px">
416 + <?php
417 + echo esc_html__("Set the maximum length of captions in prompts. This is useful to have, when captions can be very long.", 'aiomatic-automatic-ai-content-writer');
418 + ?>
419 + </div>
420 + </div>
421 + <b><?php echo esc_html__("Video Caption Maximum Character Length In Prompts:", 'aiomatic-automatic-ai-content-writer');?></b>
422 + </td>
423 + <td>
424 + <input type="number" min="0" name="aiomatic_youtube_list[max_caption][]" value="3000" placeholder="Caption maximum length" class="cr_width_full">
425 + </td>
426 + </tr>
427 + <tr><td colspan="2">
428 + <h3><?php echo esc_html__("Posting Options", 'aiomatic-automatic-ai-content-writer');?>:</h3>
429 + </td></tr>
430 + <tr>
431 + <td>
432 + <div>
433 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
434 + <div class="bws_hidden_help_text cr_min_260px">
435 + <?php
436 + echo esc_html__("Select if you want to use AI generated titles for the posts created by the plugin. If not, the YouTube video title will be used.", 'aiomatic-automatic-ai-content-writer');
437 + ?>
438 + </div>
439 + </div>
440 + <b><?php echo esc_html__("Use AI Generated Post Titles:", 'aiomatic-automatic-ai-content-writer');?></b>
441 + </td>
442 + <td>
443 + <input type="checkbox" id="ai_titles" name="aiomatic_youtube_list[ai_titles][]">
444 + </td>
445 + </tr>
446 + <tr>
447 + <td class="cr_min_width_200">
448 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
449 + <div class="bws_hidden_help_text cr_min_260px">
450 + <?php
451 + echo esc_html__("Enter a list of post sections, one per line. These will be headings of the content. These can also be automatically generated by the plugin. To enable auto generating of sections, leave this field blank. This will set the value of the %%sections%% shortcode, which can be used in prompts below. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators. If you set a section list here, each created article will have this same list of sections, because of this, use shortcodes or Spintax when defining these static topics or leave this field blank for the plugin to auto generate them!", 'aiomatic-automatic-ai-content-writer');
452 + ?>
453 + </div>
454 + </div>
455 + <b><?php echo esc_html__("Post Sections List (Optional):", 'aiomatic-automatic-ai-content-writer');?></b>
456 + </td>
457 + <td>
458 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[post_sections_list][]" placeholder="Post sections list (one per line)" class="cr_width_full"></textarea>
459 + </td>
460 + </tr>
461 + <tr>
462 + <td>
463 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
464 + <div class="bws_hidden_help_text cr_min_260px">
465 + <?php
466 + echo esc_html__("Enter the number of sections to create in the article. These will also be set as article headings. You can also set value ranges, example: 5-7. In this case, a random number will be selected in this range. Please use only numeric values in this field. This field will set the value of the %%sections_count%% shortcode.", 'aiomatic-automatic-ai-content-writer');
467 + ?>
468 + </div>
469 + </div>
470 + <b><?php echo esc_html__("Number Of Content Sections To Generate:", 'aiomatic-automatic-ai-content-writer');?></b>
471 + </td>
472 + <td class="cr_min_width_200">
473 + <input type="text" id="section_count" name="aiomatic_youtube_list[section_count][]" placeholder="3-4" class="cr_width_full" value="3-4">
474 + </td>
475 + </tr>
476 + <tr>
477 + <td>
478 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
479 + <div class="bws_hidden_help_text cr_min_260px">
480 + <?php
481 + echo esc_html__("Select what you want to do with sections in articles.", 'aiomatic-automatic-ai-content-writer');
482 + ?>
483 + </div>
484 + </div>
485 + <b><?php echo esc_html__("Add Sections To Content As:", 'aiomatic-automatic-ai-content-writer');?></b>
486 + </td>
487 + <td>
488 + <select autocomplete="off" class="cr_width_full" id="sections_role" name="aiomatic_youtube_list[sections_role][]">
489 + <option value="h2" selected><?php echo esc_html__("h2", 'aiomatic-automatic-ai-content-writer');?></option>
490 + <option value="h3"><?php echo esc_html__("h3", 'aiomatic-automatic-ai-content-writer');?></option>
491 + <option value="b"><?php echo esc_html__("Bold", 'aiomatic-automatic-ai-content-writer');?></option>
492 + <option value="i"><?php echo esc_html__("Italic", 'aiomatic-automatic-ai-content-writer');?></option>
493 + <option value="bi"><?php echo esc_html__("Bold and Italic", 'aiomatic-automatic-ai-content-writer');?></option>
494 + <option value="p"><?php echo esc_html__("Paragraph", 'aiomatic-automatic-ai-content-writer');?></option>
495 + <option value="x"><?php echo esc_html__("Plain Text", 'aiomatic-automatic-ai-content-writer');?></option>
496 + <option value="no"><?php echo esc_html__("Don't Add Sections", 'aiomatic-automatic-ai-content-writer');?></option>
497 + </select>
498 + </td>
499 + </tr>
500 + <tr>
501 + <td>
502 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
503 + <div class="bws_hidden_help_text cr_min_260px">
504 + <?php
505 + echo esc_html__("Enter the number of paragraphs to create for each section. These will also be set as article headings. You can also set value ranges, example: 5-7. In this case, a random number will be selected in this range. Please use only numeric values in this field. This field will set the value of the %%paragraphs_per_section%% shortcode.", 'aiomatic-automatic-ai-content-writer');
506 + ?>
507 + </div>
508 + </div>
509 + <b><?php echo esc_html__("Number Of Paragraphs Per Section:", 'aiomatic-automatic-ai-content-writer');?></b>
510 + </td>
511 + <td class="cr_min_width_200">
512 + <input type="text" id="paragraph_count" name="aiomatic_youtube_list[paragraph_count][]" placeholder="2-3" class="cr_width_full" value="2">
513 + </td>
514 + </tr>
515 + <tr>
516 + <td class="cr_min_width_200">
517 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
518 + <div class="bws_hidden_help_text cr_min_260px">
519 + <?php
520 + echo esc_html__("Set the number of related images to add to the created post content. This feature will use the royalty free image sources configured in the plugin's 'Settings' menu or if you have access to the DallE API. You can change image source in the 'AI Image Source' settings field from below. The maximum number of images you can add to each article: number of sections + 2", 'aiomatic-automatic-ai-content-writer');
521 + ?>
522 + </div>
523 + </div>
524 + <b><?php echo esc_html__("Number of Images To Add To The Article:", 'aiomatic-automatic-ai-content-writer');?></b>
525 + </td>
526 + <td>
527 + <input type="text" name="aiomatic_youtube_list[topic_images][]" value="" placeholder="Number of images" class="cr_width_full">
528 + </td>
529 + </tr>
530 + <tr>
531 + <td>
532 + <div>
533 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
534 + <div class="bws_hidden_help_text cr_min_260px">
535 + <?php
536 + echo esc_html__("Select if you want to add an image to each of the creating headings from the article.", 'aiomatic-automatic-ai-content-writer');
537 + ?>
538 + </div>
539 + </div>
540 + <b><?php echo esc_html__("Add An Image To Each Heading Of The Article:", 'aiomatic-automatic-ai-content-writer');?></b>
541 + </td>
542 + <td>
543 + <input type="checkbox" id="img_all_headings" name="aiomatic_youtube_list[img_all_headings][]" checked>
544 + </td>
545 + </tr>
546 + <tr>
547 + <td>
548 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
549 + <div class="bws_hidden_help_text cr_min_260px">
550 + <?php
551 + echo esc_html__("Select the location of the heading images.", 'aiomatic-automatic-ai-content-writer');
552 + ?>
553 + </div>
554 + </div>
555 + <b><?php echo esc_html__("Heading Image Location:", 'aiomatic-automatic-ai-content-writer');?></b>
556 + </td>
557 + <td class="cr_min_width_200">
558 + <select autocomplete="off" id="heading_img_location" name="aiomatic_youtube_list[heading_img_location][]" class="cr_width_full">
559 + <option value="top" selected><?php echo esc_html__("Top of the section", 'aiomatic-automatic-ai-content-writer');?></option>
560 + <option value="heading" selected><?php echo esc_html__("Under the heading text", 'aiomatic-automatic-ai-content-writer');?></option>
561 + <option value="bottom"><?php echo esc_html__("Bottom of the section", 'aiomatic-automatic-ai-content-writer');?></option>
562 + <option value="random"><?php echo esc_html__("Random (Top/Bottom)", 'aiomatic-automatic-ai-content-writer');?></option>
563 + </select>
564 + </td>
565 + </tr>
566 + <tr>
567 + <td class="cr_min_width_200">
568 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
569 + <div class="bws_hidden_help_text cr_min_260px">
570 + <?php
571 + echo esc_html__("Select if you would like to add the source YouTube video to the end of the created article.", 'aiomatic-automatic-ai-content-writer');
572 + ?>
573 + </div>
574 + </div>
575 + <b><?php echo esc_html__("Add The YouTube Video To The Article:", 'aiomatic-automatic-ai-content-writer');?></b>
576 + </td>
577 + <td>
578 + <input type="checkbox" id="topic_videos" name="aiomatic_youtube_list[topic_videos][]">
579 + </td>
580 + </tr>
581 + <tr>
582 + <td>
583 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
584 + <div class="bws_hidden_help_text cr_min_260px">
585 + <?php
586 + echo esc_html__("Set the text of the outro section header. This is optional.", 'aiomatic-automatic-ai-content-writer');
587 + ?>
588 + </div>
589 + </div>
590 + <b><?php echo esc_html__("Article Outro Section Header Text:", 'aiomatic-automatic-ai-content-writer');?></b>
591 + </td>
592 + <td>
593 + <input type="text" name="aiomatic_youtube_list[title_outro][]" value="{In Conclusion|To Conclude|In Summary|To Wrap It Up|Key Takeaways|Future Outlook|Closing Remarks|The Conclusion|Final Thoughts|In Retrospect|The Way Forward|Wrapping Up|Concluding Remarks|Insights and Conclusions}" placeholder="Optional" class="cr_width_full">
594 + </td>
595 + </tr>
596 + <tr>
597 + <td class="hideTOC-1">
598 + <div>
599 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
600 + <div class="bws_hidden_help_text cr_min_260px">
601 + <?php
602 + echo esc_html__("Select if you want to add a Table of Contents section to the created post.", 'aiomatic-automatic-ai-content-writer');
603 + ?>
604 + </div>
605 + </div>
606 + <b><?php echo esc_html__("Add Article Table Of Contents:", 'aiomatic-automatic-ai-content-writer');?></b>
607 + </td>
608 + <td class="hideTOC-1">
609 + <input type="checkbox" id="enable_toc" name="aiomatic_youtube_list[enable_toc][]">
610 + </td>
611 + </tr>
612 + <tr>
613 + <td class="hideTOC-1">
614 + <div>
615 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
616 + <div class="bws_hidden_help_text cr_min_260px">
617 + <?php
618 + echo esc_html__("Set the text of the Table of Contents section header. Default is: Table of Contents", 'aiomatic-automatic-ai-content-writer');
619 + ?>
620 + </div>
621 + </div>
622 + <b><?php echo esc_html__("Article Table Of Contents Section Header Text:", 'aiomatic-automatic-ai-content-writer');?></b>
623 + </td>
624 + <td class="hideTOC-1">
625 + <input type="text" name="aiomatic_youtube_list[title_toc][]" value="Table of Contents" placeholder="Table of Contents" class="cr_width_full">
626 + </td>
627 + </tr>
628 + <tr>
629 + <td>
630 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
631 + <div class="bws_hidden_help_text cr_min_260px">
632 + <?php
633 + echo esc_html__("Select if you want to add a Q&A section to the created post. To enable Q&A for articles, be sure to add a prompt also in the 'Article Q&A Prompt' settings field from below.", 'aiomatic-automatic-ai-content-writer');
634 + ?>
635 + </div>
636 + </div>
637 + <b><?php echo esc_html__("Add Article Q&A Section:", 'aiomatic-automatic-ai-content-writer');?></b>
638 + </td>
639 + <td>
640 + <input type="checkbox" id="enable_qa" name="aiomatic_youtube_list[enable_qa][]">
641 + </td>
642 + </tr>
643 + <tr>
644 + <td>
645 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
646 + <div class="bws_hidden_help_text cr_min_260px">
647 + <?php
648 + echo esc_html__("Set the text of the Q&A section header. Default is: Q&A", 'aiomatic-automatic-ai-content-writer');
649 + ?>
650 + </div>
651 + </div>
652 + <b><?php echo esc_html__("Article Q&A Section Header Text:", 'aiomatic-automatic-ai-content-writer');?></b>
653 + </td>
654 + <td>
655 + <input type="text" name="aiomatic_youtube_list[title_qa][]" value="Q&A" placeholder="Q&A" class="cr_width_full">
656 + </td>
657 + </tr>
658 + <tr><td colspan="2">
659 + <h4><?php echo esc_html__("Content Parameters", 'aiomatic-automatic-ai-content-writer');?>:</h4>
660 + </td></tr>
661 + <tr>
662 + <td class="cr_min_width_200">
663 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
664 + <div class="bws_hidden_help_text cr_min_260px">
665 + <?php
666 + echo esc_html__("Set the language of the created content. This will set the value of the %%language%% shortcode, which can be used in prompts below. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
667 + ?>
668 + </div>
669 + </div>
670 + <b><?php echo esc_html__("Content Language:", 'aiomatic-automatic-ai-content-writer');?></b>
671 + </td>
672 + <td>
673 + <input id="content_language" name="aiomatic_youtube_list[content_language][]" type="text" list="languages" placeholder="Created content language" class="coderevolution_gutenberg_input" value="English"/>
674 + <datalist id="languages">
675 + <?php
676 + foreach($aiomatic_language_names as $ln)
677 + {
678 + echo '<option>' . esc_html($ln) . '</option>';
679 + }
680 + ?>
681 + </datalist>
682 + </td>
683 + </tr>
684 + <tr>
685 + <td class="cr_min_width_200">
686 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
687 + <div class="bws_hidden_help_text cr_min_260px">
688 + <?php
689 + echo esc_html__("Set the writing style of the created content. This will set the value of the %%writing_style%% shortcode, which can be used in prompts below. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
690 + ?>
691 + </div>
692 + </div>
693 + <b><?php echo esc_html__("Writing Style:", 'aiomatic-automatic-ai-content-writer');?></b>
694 + </td>
695 + <td>
696 + <input id="writing_style" name="aiomatic_youtube_list[writing_style][]" type="text" placeholder="Created content writing style" list="writing_styles" class="coderevolution_gutenberg_input" value="Creative"/>
697 + <datalist id="writing_styles">
698 + <option>Informative</option>
699 + <option>Academic</option>
700 + <option>Descriptive</option>
701 + <option>Detailed</option>
702 + <option>Dramative</option>
703 + <option>Fiction</option>
704 + <option>Expository</option>
705 + <option>Historical</option>
706 + <option>Dialogue</option>
707 + <option>Creative</option>
708 + <option>Critical</option>
709 + <option>Narrative</option>
710 + <option>Persuasive</option>
711 + <option>Reflective</option>
712 + <option>Argumentative</option>
713 + <option>Analytical</option>
714 + <option>Blog</option>
715 + <option>News</option>
716 + <option>Casual</option>
717 + <option>Pastoral</option>
718 + <option>Personal</option>
719 + <option>Poetic</option>
720 + <option>Satirical</option>
721 + <option>Sensory</option>
722 + <option>Articulate</option>
723 + <option>Monologue</option>
724 + <option>Colloquial</option>
725 + <option>Comparative</option>
726 + <option>Concise</option>
727 + <option>Biographical</option>
728 + <option>Anecdotal</option>
729 + <option>Evaluative</option>
730 + <option>Letter</option>
731 + <option>Lyrical</option>
732 + <option>Simple</option>
733 + <option>Vivid</option>
734 + <option>Journalistic</option>
735 + <option>Technical</option>
736 + <option>Direct</option>
737 + <option>Emotional</option>
738 + <option>Metaphorical</option>
739 + <option>Objective</option>
740 + <option>Rhetorical</option>
741 + <option>Theoretical</option>
742 + <option>Business</option>
743 + <option>Report</option>
744 + <option>Research</option>
745 + </datalist>
746 + </td>
747 + </tr>
748 + <tr>
749 + <td class="cr_min_width_200">
750 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
751 + <div class="bws_hidden_help_text cr_min_260px">
752 + <?php
753 + echo esc_html__("Set the writing tone of the created content. This will set the value of the %%writing_tone%% shortcode, which can be used in prompts below. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
754 + ?>
755 + </div>
756 + </div>
757 + <b><?php echo esc_html__("Writing Tone:", 'aiomatic-automatic-ai-content-writer');?></b>
758 + </td>
759 + <td>
760 + <input id="writing_tone" name="aiomatic_youtube_list[writing_tone][]" type="text" list="writing_tones" placeholder="Created content writing tone" class="coderevolution_gutenberg_input" value="Neutral"/>
761 + <datalist id="writing_tones">
762 + <option>Neutral</option>
763 + <option>Formal</option>
764 + <option>Assertive</option>
765 + <option>Cheerful</option>
766 + <option>Humorous</option>
767 + <option>Informal</option>
768 + <option>Inspirational</option>
769 + <option>Professional</option>
770 + <option>Emotional</option>
771 + <option>Persuasive</option>
772 + <option>Supportive</option>
773 + <option>Sarcastic</option>
774 + <option>Condescending</option>
775 + <option>Skeptical</option>
776 + <option>Narrative</option>
777 + <option>Journalistic</option>
778 + <option>Conversational</option>
779 + <option>Factual</option>
780 + <option>Friendly</option>
781 + <option>Polite</option>
782 + <option>Scientific</option>
783 + <option>Sensitive</option>
784 + <option>Sincere</option>
785 + <option>Curious</option>
786 + <option>Dissapointed</option>
787 + <option>Encouraging</option>
788 + <option>Optimistic</option>
789 + <option>Surprised</option>
790 + <option>Worried</option>
791 + <option>Confident</option>
792 + <option>Authoritative</option>
793 + <option>Nostalgic</option>
794 + <option>Sympathetic</option>
795 + <option>Suspenseful</option>
796 + <option>Romantic</option>
797 + <option>Serious</option>
798 + </datalist>
799 + </td>
800 + </tr>
801 + <tr><td colspan="2">
802 + <h4><?php echo esc_html__("Prompts", 'aiomatic-automatic-ai-content-writer');?>:</h4>
803 + </td></tr>
804 + <tr>
805 + <td class="cr_min_width_200">
806 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
807 + <div class="bws_hidden_help_text cr_min_260px">
808 + <?php
809 + echo esc_html__("Prompt to be used for the Post Title. You can use the following shortcodes: %%video_title%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%% - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
810 + ?>
811 + </div>
812 + </div>
813 + <b><?php echo esc_html__("Title Prompt:", 'aiomatic-automatic-ai-content-writer');?></b>
814 + </td>
815 + <td>
816 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[title_prompt][]" placeholder="Enter your title prompts, one per line" class="cr_width_full">Generate a title for a blog post discussing the topics covered in the YouTube video titled: "%%video_title%%", in %%language%% language. Style: %%writing_style%%. Tone: %%writing_tone%%. Must be between 40 and 60 characters.</textarea>
817 + </td>
818 + </tr>
819 + <tr>
820 + <td>
821 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
822 + <div class="bws_hidden_help_text cr_min_260px">
823 + <?php
824 + echo esc_html__("Select the AI Model to be used for the title generator.", 'aiomatic-automatic-ai-content-writer');
825 + ?>
826 + </div>
827 + </div>
828 + <b><?php echo esc_html__("AI Model For Title Generator:", 'aiomatic-automatic-ai-content-writer');?></b>
829 + </td>
830 + <td class="cr_min_width_200">
831 + <select autocomplete="off" id="topic_title_model" name="aiomatic_youtube_list[topic_title_model][]" class="hideAssistant cr_width_full">
832 + <?php
833 + foreach($all_models as $modelx)
834 + {
835 + echo '<option value="' . esc_html($modelx) .'"';
836 + echo '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
837 + }
838 + ?>
839 + </select>
840 + </td>
841 + </tr>
842 + <tr>
843 + <td class="cr_min_width_200">
844 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
845 + <div class="bws_hidden_help_text cr_min_260px">
846 + <?php
847 + echo esc_html__("Prompt to be used for the intro of the article. You can use the following shortcodes: %%video_title%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%sections_count%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%% - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
848 + ?>
849 + </div>
850 + </div>
851 + <b><?php echo esc_html__("Article Intro Prompt:", 'aiomatic-automatic-ai-content-writer');?></b>
852 + </td>
853 + <td>
854 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[intro_prompt][]" placeholder="Enter your intro prompts, one per line" class="cr_width_full">Write an introduction for a blog post which talks about the topics discussed in the YouTube video with the following title: "%%video_title%%", in %%language%%. Style: %%writing_style%%. Tone: %%writing_tone%%. The YouTube video has the following transcript: "%%video_captions%%"</textarea>
855 + </td>
856 + </tr>
857 + <tr>
858 + <td>
859 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
860 + <div class="bws_hidden_help_text cr_min_260px">
861 + <?php
862 + echo esc_html__("Select the AI Model to be used for the intro generator.", 'aiomatic-automatic-ai-content-writer');
863 + ?>
864 + </div>
865 + </div>
866 + <b><?php echo esc_html__("AI Model For Intro Generator:", 'aiomatic-automatic-ai-content-writer');?></b>
867 + </td>
868 + <td class="cr_min_width_200">
869 + <select autocomplete="off" id="topic_intro_model" name="aiomatic_youtube_list[topic_intro_model][]" class="hideAssistant cr_width_full">
870 + <?php
871 + foreach($all_models as $modelx)
872 + {
873 + echo '<option value="' . esc_html($modelx) .'"';
874 + echo '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
875 + }
876 + ?>
877 + </select>
878 + </td>
879 + </tr>
880 + <tr>
881 + <td class="cr_min_width_200">
882 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
883 + <div class="bws_hidden_help_text cr_min_260px">
884 + <?php
885 + echo esc_html__("Prompt to be used for the Sections of the article. These will be set also as headings in the article. You can use the following shortcodes: %%video_title%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%sections_count%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%% - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
886 + ?>
887 + </div>
888 + </div>
889 + <b><?php echo esc_html__("Article Sections Prompt:", 'aiomatic-automatic-ai-content-writer');?></b>
890 + </td>
891 + <td>
892 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[sections_prompt][]" placeholder="Enter your sections prompts, one per line" class="cr_width_full">Write %%sections_count%% consecutive headings that highlight specific aspects, provide detailed insights and specific recommendations for a blog post which talks about the topics discussed in the YouTube video with the following title: "%%video_title%%", in %%language%%. Style: %%writing_style%%. Tone: %%writing_tone%%. Don't add numbers to the headings, hyphens or any types of quotes. Return only the headings list, nothing else. Extract ideas from the following video transcript: "%%video_captions%%"</textarea>
893 + </td>
894 + </tr>
895 + <tr>
896 + <td>
897 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
898 + <div class="bws_hidden_help_text cr_min_260px">
899 + <?php
900 + echo esc_html__("Select the AI Model to be used for the sections generator.", 'aiomatic-automatic-ai-content-writer');
901 + ?>
902 + </div>
903 + </div>
904 + <b><?php echo esc_html__("AI Model For Sections Generator:", 'aiomatic-automatic-ai-content-writer');?></b>
905 + </td>
906 + <td class="cr_min_width_200">
907 + <select autocomplete="off" id="topic_sections_model" name="aiomatic_youtube_list[topic_sections_model][]" class="hideAssistant cr_width_full">
908 + <?php
909 + foreach($all_models as $modelx)
910 + {
911 + echo '<option value="' . esc_html($modelx) .'"';
912 + echo '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
913 + }
914 + ?>
915 + </select>
916 + </td>
917 + </tr>
918 + <tr>
919 + <td class="cr_min_width_200">
920 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
921 + <div class="bws_hidden_help_text cr_min_260px">
922 + <?php
923 + echo esc_html__("Prompt to be used for the Content of the article, which will be applied to each section heading generated by the plugin (or entered manually) or to the entire content (depending how you select using the 'Use the Above Content Prompt To Create The Entire Article' checkbox). You can use the following shortcodes: %%video_title%%, %%article_so_far%%, %%last_section_content%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%sections%%, %%current_section%%, %%paragraphs_per_section%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%% - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
924 + ?>
925 + </div>
926 + </div>
927 + <b><?php echo esc_html__("Content Prompt:", 'aiomatic-automatic-ai-content-writer');?></b>
928 + </td>
929 + <td>
930 + <textarea rows="3" cols="70" name="aiomatic_youtube_list[content_prompt][]" placeholder="Enter your content prompt" class="cr_width_full">Write the content of a post section for the heading "%%current_section%%" in %%language%%. The title of the post is: "%%video_title%%". Don't repeat the heading in the created content. Don't add an intro or outro. Be creative and unique. Write %%paragraphs_per_section%% paragraphs in the section. Use HTML for formatting, include unnumbered lists and bold. If needed, you can use WordPress related CSS styling for the article. When applicable, add also HTML tables with WordPress styling (you can use WordPress table classes). If added, table data must be relevant, creative, short and simple. Act as a Content Writer, not as a Virtual Assistant. Return only the content requested, without any additional comments or text. The content provided will be automatically published on my website. Writing Style: %%writing_style%%. Tone: %%writing_tone%%. Extract content from the following video transcript: "%%video_captions%%"</textarea>
931 + </td>
932 + </tr>
933 + <tr>
934 + <td>
935 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
936 + <div class="bws_hidden_help_text cr_min_260px">
937 + <?php
938 + echo esc_html__("Select the AI Model to be used for the content generator.", 'aiomatic-automatic-ai-content-writer');
939 + ?>
940 + </div>
941 + </div>
942 + <b><?php echo esc_html__("AI Model For Content Generator:", 'aiomatic-automatic-ai-content-writer');?></b>
943 + </td>
944 + <td class="cr_min_width_200">
945 + <select autocomplete="off" id="topic_content_model" name="aiomatic_youtube_list[topic_content_model][]" class="hideAssistant cr_width_full">
946 + <?php
947 + foreach($all_models as $modelx)
948 + {
949 + echo '<option value="' . esc_html($modelx) .'"';
950 + echo '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
951 + }
952 + ?>
953 + </select>
954 + </td>
955 + </tr>
956 + <tr>
957 + <td class="cr_min_width_200">
958 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
959 + <div class="bws_hidden_help_text cr_min_260px">
960 + <?php
961 + echo esc_html__("Select if you want to use the above content prompt to create the entire article from a single API call (checkbox checked) or to run the prompt for each section separately (checkbox unchecked). If you check this, be sure to modify the content prompt accordingly.", 'aiomatic-automatic-ai-content-writer');
962 + ?>
963 + </div>
964 + </div>
965 + <b><?php echo esc_html__("Use the Above Content Prompt To Create The Entire Article (Not Each Section):", 'aiomatic-automatic-ai-content-writer');?></b>
966 + </td>
967 + <td>
968 + <input type="checkbox" id="single_content_call-1" name="aiomatic_youtube_list[single_content_call][]" onclick="hideTOC(-1);">
969 + </td>
970 + </tr>
971 + <tr>
972 + <td class="cr_min_width_200">
973 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
974 + <div class="bws_hidden_help_text cr_min_260px">
975 + <?php
976 + echo esc_html__("Prompt to be used for the Q&A of the article. You can use the following shortcodes: %%language%%, %%writing_style%%, %%writing_tone%%, %%sections_count%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%% - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
977 + ?>
978 + </div>
979 + </div>
980 + <b><?php echo esc_html__("Article Q&A Prompt:", 'aiomatic-automatic-ai-content-writer');?></b>
981 + </td>
982 + <td>
983 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[qa_prompt][]" placeholder="Enter your Q&A prompts, one per line" class="cr_width_full">Write a Q&A for a blog post which talks about the topics discussed in the YouTube video with the following title: "%%video_title%%", in %%language%%. Style: %%writing_style%%. Tone: %%writing_tone%%. The YouTube video has the following transcript: "%%video_captions%%"</textarea>
984 + </td>
985 + </tr>
986 + <tr>
987 + <td>
988 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
989 + <div class="bws_hidden_help_text cr_min_260px">
990 + <?php
991 + echo esc_html__("Select the AI Model to be used for the Q&A generator.", 'aiomatic-automatic-ai-content-writer');
992 + ?>
993 + </div>
994 + </div>
995 + <b><?php echo esc_html__("AI Model For Q&A Generator:", 'aiomatic-automatic-ai-content-writer');?></b>
996 + </td>
997 + <td class="cr_min_width_200">
998 + <select autocomplete="off" id="topic_qa_model" name="aiomatic_youtube_list[topic_qa_model][]" class="hideAssistant cr_width_full">
999 + <?php
1000 + foreach($all_models as $modelx)
1001 + {
1002 + echo '<option value="' . esc_html($modelx) .'"';
1003 + echo '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
1004 + }
1005 + ?>
1006 + </select>
1007 + </td>
1008 + </tr>
1009 + <tr>
1010 + <td class="cr_min_width_200">
1011 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1012 + <div class="bws_hidden_help_text cr_min_260px">
1013 + <?php
1014 + echo esc_html__("Prompt to be used for the outro of the article. You can use the following shortcodes: %%video_title%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%sections_count%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%% - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
1015 + ?>
1016 + </div>
1017 + </div>
1018 + <b><?php echo esc_html__("Article Outro Prompt:", 'aiomatic-automatic-ai-content-writer');?></b>
1019 + </td>
1020 + <td>
1021 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[outro_prompt][]" placeholder="Enter your outro prompts, one per line" class="cr_width_full">Write an outro for a blog post which talks about the topics discussed in the YouTube video with the following title: "%%video_title%%", in %%language%%. Style: %%writing_style%%. Tone: %%writing_tone%%. The YouTube video has the following transcript: "%%video_captions%%"</textarea>
1022 + </td>
1023 + </tr>
1024 + <tr>
1025 + <td>
1026 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1027 + <div class="bws_hidden_help_text cr_min_260px">
1028 + <?php
1029 + echo esc_html__("Select the AI Model to be used for the outro generator.", 'aiomatic-automatic-ai-content-writer');
1030 + ?>
1031 + </div>
1032 + </div>
1033 + <b><?php echo esc_html__("AI Model For Outro Generator:", 'aiomatic-automatic-ai-content-writer');?></b>
1034 + </td>
1035 + <td class="cr_min_width_200">
1036 + <select autocomplete="off" id="topic_outro_model" name="aiomatic_youtube_list[topic_outro_model][]" class="hideAssistant cr_width_full">
1037 + <?php
1038 + foreach($all_models as $modelx)
1039 + {
1040 + echo '<option value="' . esc_html($modelx) .'"';
1041 + echo '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
1042 + }
1043 + ?>
1044 + </select>
1045 + </td>
1046 + </tr>
1047 + <tr>
1048 + <td class="cr_min_width_200">
1049 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1050 + <div class="bws_hidden_help_text cr_min_260px">
1051 + <?php
1052 + echo esc_html__("Prompt to be used for the excerpt of the article. You can use the following shortcodes: %%video_title%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%sections%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%% - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
1053 + ?>
1054 + </div>
1055 + </div>
1056 + <b><?php echo esc_html__("Excerpt Prompt:", 'aiomatic-automatic-ai-content-writer');?></b>
1057 + </td>
1058 + <td>
1059 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[excerpt_prompt][]" placeholder="Enter your excerpt prompts, one per line" class="cr_width_full">Write a short excerpt for a blog post which talks about the topics discussed in the YouTube video with the following title: "%%video_title%%" in %%language%%. Style: %%writing_style%%. Tone: %%writing_tone%%. Must be between 150 and 250 characters. The YouTube video has the following transcript: "%%video_captions%%"</textarea>
1060 + </td>
1061 + </tr>
1062 + <tr>
1063 + <td>
1064 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1065 + <div class="bws_hidden_help_text cr_min_260px">
1066 + <?php
1067 + echo esc_html__("Select the AI Model to be used for the excerpt generator.", 'aiomatic-automatic-ai-content-writer');
1068 + ?>
1069 + </div>
1070 + </div>
1071 + <b><?php echo esc_html__("AI Model For Excerpt Generator:", 'aiomatic-automatic-ai-content-writer');?></b>
1072 + </td>
1073 + <td class="cr_min_width_200">
1074 + <select autocomplete="off" id="topic_excerpt_model" name="aiomatic_youtube_list[topic_excerpt_model][]" class="hideAssistant cr_width_full">
1075 + <?php
1076 + foreach($all_models as $modelx)
1077 + {
1078 + echo '<option value="' . esc_html($modelx) .'"';
1079 + echo '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
1080 + }
1081 + ?>
1082 + </select>
1083 + </td>
1084 + </tr>
1085 + <tr><td colspan="2">
1086 + <h4><?php echo esc_html__("Advanced Prompting Options", 'aiomatic-automatic-ai-content-writer');?>:</h4>
1087 + </td></tr>
1088 + <tr>
1089 + <td>
1090 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1091 + <div class="bws_hidden_help_text cr_min_260px">
1092 + <?php
1093 + echo esc_html__("Run regex on prompts. To disable this feature, leave this field blank. No Regex separators are required here. You can add multiple Regex expressions, each on a different line.", 'aiomatic-automatic-ai-content-writer');
1094 + ?>
1095 + </div>
1096 + </div>
1097 + <b><?php echo esc_html__("Run Regex On Prompts:", 'aiomatic-automatic-ai-content-writer');?></b>
1098 + </td>
1099 + <td>
1100 + <textarea rows="1" class="cr_width_full" name="aiomatic_youtube_list[strip_by_regex_prompts][]" placeholder="regex expression" class="cr_width_full"></textarea>
1101 + </td>
1102 + </tr>
1103 + <tr>
1104 + <td>
1105 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1106 + <div class="bws_hidden_help_text cr_min_260px">
1107 + <?php
1108 + echo esc_html__("Replace the above regex matches with this regex expression. If you want to strip matched content, leave this field blank. No Regex separators are required here. You can add multiple replacement expressions, each on a different line.", 'aiomatic-automatic-ai-content-writer');
1109 + ?>
1110 + </div>
1111 + </div>
1112 + <b><?php echo esc_html__("Replace Matches From Regex (Prompts):", 'aiomatic-automatic-ai-content-writer');?></b>
1113 + </td>
1114 + <td>
1115 + <textarea rows="1" class="cr_width_full" name="aiomatic_youtube_list[replace_regex_prompts][]" placeholder="regex replacement" class="cr_width_full"></textarea>
1116 + </td>
1117 + </tr>
1118 + <tr>
1119 + <td>
1120 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1121 + <div class="bws_hidden_help_text cr_min_260px">
1122 + <?php
1123 + echo esc_html__("Select on which prompts do you want to run the above Regex. Possible values are (or any of their combinations): title, intro, sections, content, outro, excerpt", 'aiomatic-automatic-ai-content-writer');
1124 + ?>
1125 + </div>
1126 + </div>
1127 + <b><?php echo esc_html__("Run Above Regex On Prompts:", 'aiomatic-automatic-ai-content-writer');?></b>
1128 + </td>
1129 + <td>
1130 + <input id="run_regex_on" name="aiomatic_youtube_list[run_regex_on][]" type="text" list="run_regex_on_list" class="coderevolution_gutenberg_input" value="content"/>
1131 + <datalist id="run_regex_on_list">
1132 + <option value="title">title</option>
1133 + <option value="intro">intro</option>
1134 + <option value="sections">sections</option>
1135 + <option value="content">content</option>
1136 + <option value="qa">Q&A</option>
1137 + <option value="outro">outro</option>
1138 + <option value="excerpt">excerpt</option>
1139 + </datalist>
1140 + </td>
1141 + </tr>
1142 + <tr><td colspan="2">
1143 + <h3><?php echo esc_html__("Global Prompt Options", 'aiomatic-automatic-ai-content-writer');?>:</h3>
1144 + </td></tr>
1145 + <tr>
1146 + <td class="cr_min_width_200">
1147 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1148 + <div class="bws_hidden_help_text cr_min_260px">
1149 + <?php
1150 + echo esc_html__("This will be prepended to each prompt sent by the plugin to the AI writer. You can use the following shortcodes: %%topic%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%title%%, %%random_sentence%%, %%random_sentence2%%, %%post_original_title%%, %%blog_title%% - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
1151 + ?>
1152 + </div>
1153 + </div>
1154 + <b><?php echo esc_html__("Prepend Text To All Textual AI Prompts:", 'aiomatic-automatic-ai-content-writer');?></b>
1155 + </td>
1156 + <td>
1157 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[global_prepend][]" placeholder="Global prompt prepend text" class="cr_width_full"></textarea>
1158 + </td>
1159 + </tr>
1160 + <tr>
1161 + <td class="cr_min_width_200">
1162 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1163 + <div class="bws_hidden_help_text cr_min_260px">
1164 + <?php
1165 + echo esc_html__("This will be appended to each prompt sent by the plugin to the AI writer. You can use the following shortcodes: %%topic%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%title%%, %%random_sentence%%, %%random_sentence2%%, %%post_original_title%%, %%blog_title%% - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
1166 + ?>
1167 + </div>
1168 + </div>
1169 + <b><?php echo esc_html__("Append Text To All Textual AI Prompts:", 'aiomatic-automatic-ai-content-writer');?></b>
1170 + </td>
1171 + <td>
1172 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[global_append][]" placeholder="Global prompt append text" class="cr_width_full"></textarea>
1173 + </td>
1174 + </tr>
1175 + <tr><td colspan="2">
1176 + <h3><?php echo esc_html__("Automatic Linking Options", 'aiomatic-automatic-ai-content-writer');?>:</h3>
1177 + </td></tr>
1178 + <tr>
1179 + <td>
1180 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1181 + <div class="bws_hidden_help_text cr_min_260px">
1182 + <?php
1183 + echo esc_html__("Select the linking method to use in posts.", 'aiomatic-automatic-ai-content-writer');
1184 + ?>
1185 + </div>
1186 + </div>
1187 + <b><?php echo esc_html__("Automatic Linking Type:", 'aiomatic-automatic-ai-content-writer');?></b>
1188 + </td>
1189 + <td>
1190 + <select autocomplete="off" class="cr_width_full" id="link_type" onchange="hideLinks('');" name="aiomatic_youtube_list[link_type][]">
1191 + <option value="disabled" selected><?php echo esc_html__("Disabled", 'aiomatic-automatic-ai-content-writer');?></option>
1192 + <option value="internal"><?php echo esc_html__("Internal Links", 'aiomatic-automatic-ai-content-writer');?></option>
1193 + <option value="manual"><?php echo esc_html__("Manual Links", 'aiomatic-automatic-ai-content-writer');?></option>
1194 + <option value="serp"><?php echo esc_html__("Related SERP Links", 'aiomatic-automatic-ai-content-writer');?></option>
1195 + <option value="mixed"><?php echo esc_html__("Internal + Manual Links", 'aiomatic-automatic-ai-content-writer');?></option>
1196 + <option value="intserp"><?php echo esc_html__("Internal & SERP Links", 'aiomatic-automatic-ai-content-writer');?></option>
1197 + <option value="manserp"><?php echo esc_html__("Manual & SERP Links", 'aiomatic-automatic-ai-content-writer');?></option>
1198 + <option value="intmanserp"><?php echo esc_html__("Internal & Manual & SERP Links", 'aiomatic-automatic-ai-content-writer');?></option>
1199 + </select>
1200 + </td>
1201 + </tr>
1202 + <tr>
1203 + <td class="cr_min_width_200">
1204 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1205 + <div class="bws_hidden_help_text cr_min_260px">
1206 + <?php
1207 + echo esc_html__("Set the maximum number of automatic links to add to created posts. You can also define custom ranges, like: 3-5. Please note that this feature will work best if you already have a considerable number of posts published on your site, which will be used for internal linking.", 'aiomatic-automatic-ai-content-writer');
1208 + ?>
1209 + </div>
1210 + </div>
1211 + <b><?php echo esc_html__("Maximum Number Of Automatic Links To Add To The Post Content:", 'aiomatic-automatic-ai-content-writer');?></b>
1212 + </td>
1213 + <td>
1214 + <input type="text" name="aiomatic_youtube_list[max_links][]" placeholder="Add the number of links to enable this feature" class="cr_width_full">
1215 + </td>
1216 + </tr>
1217 + <tr class="hidelinks">
1218 + <td class="cr_min_width_200">
1219 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1220 + <div class="bws_hidden_help_text cr_min_260px">
1221 + <?php
1222 + echo esc_html__("Enter a manual list of links, where the plugin will create links.", 'aiomatic-automatic-ai-content-writer');
1223 + ?>
1224 + </div>
1225 + </div>
1226 + <b><?php echo esc_html__("Manual List Of URLs (One Per Line):", 'aiomatic-automatic-ai-content-writer');?></b>
1227 + </td>
1228 + <td>
1229 + <textarea rows="1" cols="70" name="aiomatic_youtube_list[link_list][]" placeholder="URL list (one per line)" class="cr_width_full"></textarea>
1230 + </td>
1231 + </tr>
1232 + <tr class="hidelinks">
1233 + <td class="cr_min_width_200">
1234 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1235 + <div class="bws_hidden_help_text cr_min_260px">
1236 + <?php
1237 + echo esc_html__("Do you want to add nofollow attribute to manually entered, external links?", 'aiomatic-automatic-ai-content-writer');
1238 + ?>
1239 + </div>
1240 + </div>
1241 + <b><?php echo esc_html__("Add Nofollow Attribute To External Links:", 'aiomatic-automatic-ai-content-writer');?></b>
1242 + </td>
1243 + <td>
1244 + <input type="checkbox" id="link_nofollow" name="aiomatic_youtube_list[link_nofollow][]">
1245 + </td>
1246 + </tr>
1247 + <tr>
1248 + <td class="cr_min_width_200">
1249 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1250 + <div class="bws_hidden_help_text cr_min_260px">
1251 + <?php
1252 + echo esc_html__("Set the post types where to create automatic links in posts. You can also add a comma separated list of multiple post types.", 'aiomatic-automatic-ai-content-writer');
1253 + ?>
1254 + </div>
1255 + </div>
1256 + <b><?php echo esc_html__("Post Types Where To Generate Automatic Links:", 'aiomatic-automatic-ai-content-writer');?></b>
1257 + </td>
1258 + <td>
1259 + <input type="text" name="aiomatic_youtube_list[link_post_types][]" placeholder="post" class="cr_width_full">
1260 + </td>
1261 + </tr>
1262 + <tr><td colspan="2">
1263 + <h3><?php echo esc_html__("Post Category Options", 'aiomatic-automatic-ai-content-writer');?>:</h3>
1264 + </td></tr>
1265 + <tr>
1266 + <td>
1267 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1268 + <div class="bws_hidden_help_text cr_min_260px">
1269 + <?php
1270 + echo esc_html__("Do you want to automatically add post categories from the generated items?", 'aiomatic-automatic-ai-content-writer');
1271 + ?>
1272 + </div>
1273 + </div>
1274 + <b><?php echo esc_html__("Auto Add Categories:", 'aiomatic-automatic-ai-content-writer');?></b>
1275 + </td>
1276 + <td>
1277 + <select autocomplete="off" class="cr_width_full" id="auto_categories" name="aiomatic_youtube_list[auto_categories][]">
1278 + <option value="disabled" selected><?php echo esc_html__("Disabled", 'aiomatic-automatic-ai-content-writer');?></option>
1279 + <option value="ai"><?php echo esc_html__("AI Generated", 'aiomatic-automatic-ai-content-writer');?></option>
1280 + <option value="hashtags"><?php echo esc_html__("Title", 'aiomatic-automatic-ai-content-writer');?></option>
1281 + <option value="content"><?php echo esc_html__("Content", 'aiomatic-automatic-ai-content-writer');?></option>
1282 + <option value="both"><?php echo esc_html__("Title and Content", 'aiomatic-automatic-ai-content-writer');?></option>
1283 + </select>
1284 + </td>
1285 + </tr>
1286 + <tr>
1287 + <td>
1288 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1289 + <div class="bws_hidden_help_text cr_min_260px">
1290 + <?php
1291 + echo esc_html__("Select the AI Model to be used for category generator. You can add this to the post categories, if you select 'AI Generated Categories' in the 'Auto Add Categories' settings field.", 'aiomatic-automatic-ai-content-writer');
1292 + ?>
1293 + </div>
1294 + </div>
1295 + <b><?php echo esc_html__("AI Model For Category Generator:", 'aiomatic-automatic-ai-content-writer');?></b>
1296 + </td>
1297 + <td class="cr_min_width_200">
1298 + <select autocomplete="off" id="category_model" name="aiomatic_youtube_list[category_model][]" class="hideAssistant cr_width_full">
1299 + <?php
1300 + foreach($all_models as $modelx)
1301 + {
1302 + echo '<option value="' . esc_html($modelx) .'"';
1303 + echo '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
1304 + }
1305 + ?>
1306 + </select>
1307 + </td>
1308 + </tr>
1309 + <tr>
1310 + <td class="cr_min_width_200">
1311 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1312 + <div class="bws_hidden_help_text cr_min_260px">
1313 + <?php
1314 + echo esc_html__("Set list of prompt commands (one on each line) you want to send to AI for generating post categories. You can use the following shortcodes here: %%post_title%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%%. You can also add a link to a TXT file, containing keywords (one per line), or to an RSS feed. If you use RSS feeds, you can also use the following additional shortcodes: %%post_content%%, %%post_content_plain_text%%, %%post_excerpt%%, %%post_cats%%, %%author_name%%, %%current_date_time%%, %%post_link%%. The length of this command should not be greater than the max token count set in the settings for the prompt command - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You can also add here a link to a .txt file, where you can add multiple prompts (one per line) and the plugin will select a random one at each run. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
1315 + echo '&nbsp;' . sprintf( wp_kses( __( "Please check some tips and tricks about writing prompt commands, <a href='%s' target='_blank'>here</a>.", 'aiomatic-automatic-ai-content-writer'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), 'https://coderevolution.ro/knowledge-base/faq/how-to-create-a-good-seed-prompt-command-for-aiomatic-for-openai-gpt-3-api/' );
1316 + ?>
1317 + </div>
1318 + </div>
1319 + <b><?php echo esc_html__("Prompt For The AI Category Generator:", 'aiomatic-automatic-ai-content-writer');?></b>&nbsp;<b><a href="https://coderevolution.ro/knowledge-base/faq/how-to-create-a-good-seed-prompt-command-for-aiomatic-for-openai-gpt-3-api/" target="_blank">&#9432;</a></b>
1320 + </td>
1321 + <td>
1322 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[category_ai_command][]" placeholder="Write a comma separated list of categories, for the post title: %%post_title%%" class="cr_width_full">Generate a comma-separated list of relevant categories for the post title: "%%post_title%%". These categories must accurately categorize the article within the broader topics or themes of your blog, aiding in the organization and navigation of your content.</textarea>
1323 + </td>
1324 + </tr>
1325 + <tr>
1326 + <td class="cr_min_width_200">
1327 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1328 + <div class="bws_hidden_help_text cr_min_260px">
1329 + <?php
1330 + echo esc_html__("Select the post category that you want for the automatically generated posts to have.", 'aiomatic-automatic-ai-content-writer');
1331 + ?>
1332 + </div>
1333 + </div>
1334 + <b><?php echo esc_html__("Additional Post Category:", 'aiomatic-automatic-ai-content-writer');?></b>
1335 + </td>
1336 + <td>
1337 + <select multiple id="default_category" name="aiomatic_youtube_list[default_category][]" class="cr_width_full" onmouseover="this.size=this.length;" onmouseout="this.size=4;">
1338 + <option value="aiomatic_no_category_12345678" selected><?php echo esc_html__("Do Not Add a Category", 'aiomatic-automatic-ai-content-writer');?></option>
1339 + <?php
1340 + $cat_args = array(
1341 + 'orderby' => 'name',
1342 + 'hide_empty' => 0,
1343 + 'order' => 'ASC'
1344 + );
1345 + $categories = get_categories($cat_args);
1346 + foreach ($categories as $category) {
1347 + ?>
1348 + <option value="<?php
1349 + echo esc_html($category->term_id);
1350 + ?>"><?php
1351 + echo esc_html(sanitize_text_field($category->name)) . ' - ID ' . esc_html($category->term_id);
1352 + ?></option>
1353 + <?php
1354 + }
1355 + ?>
1356 + </select>
1357 + </td>
1358 + </tr>
1359 + <tr>
1360 + <td>
1361 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1362 + <div class="bws_hidden_help_text cr_min_260px">
1363 + <?php
1364 + echo esc_html__("This feature will try to remove the WordPress's default post category. This may fail in case no additional categories are added, because WordPress requires at least one post category for every post.", 'aiomatic-automatic-ai-content-writer');
1365 + ?>
1366 + </div>
1367 + </div>
1368 + <b><?php echo esc_html__("Remove WP Default Post Category:", 'aiomatic-automatic-ai-content-writer');?></b>
1369 + </td>
1370 + <td>
1371 + <input type="checkbox" id="remove_default" name="aiomatic_youtube_list[remove_default][]" checked>
1372 + </td>
1373 + </tr>
1374 + <tr>
1375 + <td>
1376 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1377 + <div class="bws_hidden_help_text cr_min_260px">
1378 + <?php
1379 + echo esc_html__("This option will make the plugin not create categories which are not already existing on your site. For best results in this case, be sure to add to the prompt the list of categories from where the AI should select.", 'aiomatic-automatic-ai-content-writer');
1380 + ?>
1381 + </div>
1382 + </div>
1383 + <b><?php echo esc_html__("Do Not Add Inexistent Categories:", 'aiomatic-automatic-ai-content-writer');?></b>
1384 + </td>
1385 + <td>
1386 + <input type="checkbox" id="skip_inexist" name="aiomatic_youtube_list[skip_inexist][]">
1387 + </td>
1388 + </tr>
1389 + <tr><td colspan="2">
1390 + <h3><?php echo esc_html__("Post Tag Options", 'aiomatic-automatic-ai-content-writer');?>:</h3>
1391 + </td></tr>
1392 + <tr>
1393 + <td>
1394 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1395 + <div class="bws_hidden_help_text cr_min_260px">
1396 + <?php
1397 + echo esc_html__("Do you want to automatically add post tags from the generated items?", 'aiomatic-automatic-ai-content-writer');
1398 + ?>
1399 + </div>
1400 + </div>
1401 + <b><?php echo esc_html__("Auto Add Tags:", 'aiomatic-automatic-ai-content-writer');?></b>
1402 + </td>
1403 + <td>
1404 + <select autocomplete="off" class="cr_width_full" id="auto_tags" name="aiomatic_youtube_list[auto_tags][]">
1405 + <option value="disabled" selected><?php echo esc_html__("Disabled", 'aiomatic-automatic-ai-content-writer');?></option>
1406 + <option value="ai"><?php echo esc_html__("AI Generated", 'aiomatic-automatic-ai-content-writer');?></option>
1407 + <option value="hashtags"><?php echo esc_html__("Title", 'aiomatic-automatic-ai-content-writer');?></option>
1408 + <option value="content"><?php echo esc_html__("Content", 'aiomatic-automatic-ai-content-writer');?></option>
1409 + <option value="both"><?php echo esc_html__("Title and Content", 'aiomatic-automatic-ai-content-writer');?></option>
1410 + </select>
1411 + </td>
1412 + </tr>
1413 + <tr>
1414 + <td>
1415 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1416 + <div class="bws_hidden_help_text cr_min_260px">
1417 + <?php
1418 + echo esc_html__("Select the AI Model to be used for tag generator. You can add this to the post tags, if you select 'AI Generated Tags' in the 'Auto Add Tags' settings field.", 'aiomatic-automatic-ai-content-writer');
1419 + ?>
1420 + </div>
1421 + </div>
1422 + <b><?php echo esc_html__("AI Model For Post Tag Generator:", 'aiomatic-automatic-ai-content-writer');?></b>
1423 + </td>
1424 + <td class="cr_min_width_200">
1425 + <select autocomplete="off" id="tag_model" name="aiomatic_youtube_list[tag_model][]" class="hideAssistant cr_width_full">
1426 + <?php
1427 + foreach($all_models as $modelx)
1428 + {
1429 + echo '<option value="' . esc_html($modelx) .'"';
1430 + echo '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
1431 + }
1432 + ?>
1433 + </select>
1434 + </td>
1435 + </tr>
1436 + <tr>
1437 + <td class="cr_min_width_200">
1438 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1439 + <div class="bws_hidden_help_text cr_min_260px">
1440 + <?php
1441 + echo esc_html__("Set list of prompt commands (one on each line) you want to send to AI for generating post tags. You can use the following shortcodes here: %%post_title%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%%. You can also add a link to a TXT file, containing keywords (one per line), or to an RSS feed. If you use RSS feeds, you can also use the following additional shortcodes: %%post_content%%, %%post_content_plain_text%%, %%post_excerpt%%, %%post_cats%%, %%author_name%%, %%current_date_time%%, %%post_link%%. The length of this command should not be greater than the max token count set in the settings for the prompt command - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You can also add here a link to a .txt file, where you can add multiple prompts (one per line) and the plugin will select a random one at each run. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
1442 + echo '&nbsp;' . sprintf( wp_kses( __( "Please check some tips and tricks about writing prompt commands, <a href='%s' target='_blank'>here</a>.", 'aiomatic-automatic-ai-content-writer'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), 'https://coderevolution.ro/knowledge-base/faq/how-to-create-a-good-seed-prompt-command-for-aiomatic-for-openai-gpt-3-api/' );
1443 + ?>
1444 + </div>
1445 + </div>
1446 + <b><?php echo esc_html__("Prompt For The AI Post Tag Generator:", 'aiomatic-automatic-ai-content-writer');?></b>&nbsp;<b><a href="https://coderevolution.ro/knowledge-base/faq/how-to-create-a-good-seed-prompt-command-for-aiomatic-for-openai-gpt-3-api/" target="_blank">&#9432;</a></b>
1447 + </td>
1448 + <td>
1449 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[tag_ai_command][]" placeholder="Write a comma separated list of tags, for the post title: %%post_title%%" class="cr_width_full">Generate a comma-separated list of relevant tags for the post title: "%%post_title%%". These tags must accurately reflect the key topics, themes, or keywords associated with the article and help improve its discoverability and organization.</textarea>
1450 + </td>
1451 + </tr>
1452 + <tr>
1453 + <td>
1454 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1455 + <div class="bws_hidden_help_text cr_min_260px">
1456 + <?php
1457 + echo esc_html__("Select the post tags that you want for the automatically generated posts to have. Spintax supported.", 'aiomatic-automatic-ai-content-writer');
1458 + ?>
1459 + </div>
1460 + </div>
1461 + <b><?php echo esc_html__("Additional Post Tags:", 'aiomatic-automatic-ai-content-writer');?></b>
1462 + </td>
1463 + <td>
1464 + <input type="text" name="aiomatic_youtube_list[default_tags][]" value="" placeholder="Please insert your additional post tags here" class="cr_width_full">
1465 + </td>
1466 + </tr>
1467 + <tr><td colspan="2">
1468 + <h3><?php echo esc_html__("Advanced AI Text Generator Options", 'aiomatic-automatic-ai-content-writer');?>:</h3>
1469 + </td></tr>
1470 + <tr>
1471 + <td class="cr_min_width_200">
1472 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1473 + <div class="bws_hidden_help_text cr_min_260px">
1474 + <?php
1475 + echo esc_html__("Set the maximum number of API tokens to use with each request. This will define the length of the resulting API response. Each token usually consists of approximately 4 characters. Note that in this value the number of tokens sent to the API as an article prompt will also be counted. The maximum amount which can be set is 4000. For other models, the maximum is 2048.", 'aiomatic-automatic-ai-content-writer');
1476 + ?>
1477 + </div>
1478 + </div>
1479 + <b><?php echo esc_html__("Maximum Total Token Count To Use Per API Request:", 'aiomatic-automatic-ai-content-writer');?></b>
1480 + </td>
1481 + <td>
1482 + <input type="number" min="1" name="aiomatic_youtube_list[max_tokens][]" value="" placeholder="2048" class="cr_width_full">
1483 + </td>
1484 + </tr>
1485 + <tr>
1486 + <td class="cr_min_width_200">
1487 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1488 + <div class="bws_hidden_help_text cr_min_260px">
1489 + <?php
1490 + echo esc_html__("Set the maximum number of prompt API tokens to use with each request. This will define the length of the resulting API response. Each token usually consists of approximately 4 characters. This defines how much content does the API receive each time you call it. If the API gets more initial data, better quality results will be expected. The maximum amount which can be set is 1000.", 'aiomatic-automatic-ai-content-writer');
1491 + ?>
1492 + </div>
1493 + </div>
1494 + <b><?php echo esc_html__("Maximum Prompt Token Count To Use Per API Request:", 'aiomatic-automatic-ai-content-writer');?></b>
1495 + </td>
1496 + <td>
1497 + <input type="number" min="1" name="aiomatic_youtube_list[max_seed_tokens][]" value="" placeholder="1000" class="cr_width_full">
1498 + </td>
1499 + </tr>
1500 + <tr>
1501 + <td class="cr_min_width_200">
1502 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1503 + <div class="bws_hidden_help_text cr_min_260px">
1504 + <?php
1505 + echo esc_html__("Set the maximum number of continue API tokens to use with each request. This will define the length of the resulting API response. Each token usually consists of approximately 4 characters. This defines how much content does the API receive each time you call it. If the API gets more initial data, better quality results will be expected. The maximum amount which can be set is 500.", 'aiomatic-automatic-ai-content-writer');
1506 + ?>
1507 + </div>
1508 + </div>
1509 + <b><?php echo esc_html__("Maximum Continue Token Count To Use Per API Request:", 'aiomatic-automatic-ai-content-writer');?></b>
1510 + </td>
1511 + <td>
1512 + <input type="number" min="1" name="aiomatic_youtube_list[max_continue_tokens][]" value="" placeholder="500" class="cr_width_full">
1513 + </td>
1514 + </tr>
1515 + <tr>
1516 + <td class="cr_min_width_200">
1517 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1518 + <div class="bws_hidden_help_text cr_min_260px">
1519 + <?php
1520 + echo esc_html__("What sampling temperature to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer. We generally recommend altering this or top_p but not both.", 'aiomatic-automatic-ai-content-writer');
1521 + ?>
1522 + </div>
1523 + </div>
1524 + <b><?php echo esc_html__("AI Temperature:", 'aiomatic-automatic-ai-content-writer');?></b>
1525 + </td>
1526 + <td>
1527 + <input type="number" min="0" step="0.01" max="2" name="aiomatic_youtube_list[temperature][]" value="" placeholder="1" class="cr_width_full">
1528 + </td>
1529 + </tr><tr>
1530 + <td class="cr_min_width_200">
1531 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1532 + <div class="bws_hidden_help_text cr_min_260px">
1533 + <?php
1534 + echo esc_html__("An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.", 'aiomatic-automatic-ai-content-writer');
1535 + ?>
1536 + </div>
1537 + </div>
1538 + <b><?php echo esc_html__("AI Top_p:", 'aiomatic-automatic-ai-content-writer');?></b>
1539 + </td>
1540 + <td>
1541 + <input type="number" min="0" max="1" step="0.01" name="aiomatic_youtube_list[top_p][]" value="" placeholder="1" class="cr_width_full">
1542 + </td>
1543 + </tr><tr>
1544 + <td class="cr_min_width_200">
1545 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1546 + <div class="bws_hidden_help_text cr_min_260px">
1547 + <?php
1548 + echo esc_html__("Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.", 'aiomatic-automatic-ai-content-writer');
1549 + ?>
1550 + </div>
1551 + </div>
1552 + <b><?php echo esc_html__("AI Presence Penalty:", 'aiomatic-automatic-ai-content-writer');?></b>
1553 + </td>
1554 + <td>
1555 + <input type="number" min="-2" step="0.01" max="2" name="aiomatic_youtube_list[presence_penalty][]" value="" placeholder="0" class="cr_width_full">
1556 + </td>
1557 + </tr><tr>
1558 + <td class="cr_min_width_200">
1559 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1560 + <div class="bws_hidden_help_text cr_min_260px">
1561 + <?php
1562 + echo esc_html__("Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.", 'aiomatic-automatic-ai-content-writer');
1563 + ?>
1564 + </div>
1565 + </div>
1566 + <b><?php echo esc_html__("AI Frequency Penalty:", 'aiomatic-automatic-ai-content-writer');?></b>
1567 + </td>
1568 + <td>
1569 + <input type="number" min="0" max="2" step="0.01" name="aiomatic_youtube_list[frequency_penalty][]" value="" placeholder="0" class="cr_width_full">
1570 + </td>
1571 + </tr>
1572 + <tr><td colspan="2">
1573 + <h3><?php echo esc_html__("Image Generator Options", 'aiomatic-automatic-ai-content-writer');?>:</h3>
1574 + </td></tr>
1575 + <tr>
1576 + <td>
1577 + <div>
1578 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1579 + <div class="bws_hidden_help_text cr_min_260px">
1580 + <?php
1581 + echo esc_html__("Do you want to set a featured image for the created post (royalty free or AI generated)? Please note that for this feature to function you must configure the plugin (add API keys) in the plugin's 'Settings' menu -> 'Royalty Free Featured Image Importing Options' section.", 'aiomatic-automatic-ai-content-writer');
1582 + ?>
1583 + </div>
1584 + </div>
1585 + <b><?php echo esc_html__("Auto Set A Featured Image For Posts (Select Source Below):", 'aiomatic-automatic-ai-content-writer');?></b>
1586 + </td>
1587 + <td>
1588 + <select autocomplete="off" id="royalty_free" name="aiomatic_youtube_list[royalty_free][]" class="cr_width_full">
1589 + <option value="0"><?php echo esc_html__("Disabled", 'aiomatic-automatic-ai-content-writer');?></option>
1590 + <option value="1"><?php echo esc_html__("AI Image From Below Selector", 'aiomatic-automatic-ai-content-writer');?></option>
1591 + <option value="2" selected><?php echo esc_html__("YouTube Video Thumbnail", 'aiomatic-automatic-ai-content-writer');?></option>
1592 + </select>
1593 + </td>
1594 + </tr>
1595 + <tr>
1596 + <td class="cr_min_width_200">
1597 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1598 + <div class="bws_hidden_help_text cr_min_260px">
1599 + <?php
1600 + echo esc_html__("Select the search query repetition mode, when searching royalty free images.", 'aiomatic-automatic-ai-content-writer');
1601 + ?>
1602 + </div>
1603 + </div>
1604 + <b><?php echo esc_html__("Search Query Repetition:", 'aiomatic-automatic-ai-content-writer');?></b>
1605 + </td>
1606 + <td>
1607 + <select autocomplete="off" id="search_query_repetition" name="aiomatic_youtube_list[search_query_repetition][]" class="cr_width_full">
1608 + <option value="0" selected><?php echo esc_html__("Use Different Search Queries For Images", 'aiomatic-automatic-ai-content-writer');?></option>
1609 + <option value="1"><?php echo esc_html__("Use The Same Search Query For Images", 'aiomatic-automatic-ai-content-writer');?></option>
1610 + </select>
1611 + </td>
1612 + </tr>
1613 + <tr>
1614 + <td class="cr_min_width_200">
1615 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1616 + <div class="bws_hidden_help_text cr_min_260px">
1617 + <?php
1618 + echo esc_html__("Do you want to enable the AI Image Generator and to replace Royalty Free Images with AI generated images? If you select 'Default Featured Image List', you can add the image URLs in the 'Default Featured Image List' settings field.", 'aiomatic-automatic-ai-content-writer');
1619 + ?>
1620 + </div>
1621 + </div>
1622 + <b><?php echo esc_html__("Article Image Source:", 'aiomatic-automatic-ai-content-writer');?></b>
1623 + </td>
1624 + <td>
1625 + <select autocomplete="off" id="enable_ai_images" onchange="hideImage('');" name="aiomatic_youtube_list[enable_ai_images][]" class="cr_width_full">
1626 + <option value="0" selected><?php echo esc_html__("Royalty Free", 'aiomatic-automatic-ai-content-writer');?></option>
1627 + <option value="1"><?php echo esc_html__("OpenAI/AiomaticAPI", 'aiomatic-automatic-ai-content-writer');?></option>
1628 + <?php
1629 + if (isset($aiomatic_Main_Settings['stability_app_id']) && trim($aiomatic_Main_Settings['stability_app_id']) != '')
1630 + {
1631 + ?>
1632 + <option value="2"><?php echo esc_html__("Stability.AI", 'aiomatic-automatic-ai-content-writer');?></option>
1633 + <?php
1634 + }
1635 + if (isset($aiomatic_Main_Settings['midjourney_app_id']) && trim($aiomatic_Main_Settings['midjourney_app_id']) != '')
1636 + {
1637 + ?>
1638 + <option value="4"><?php echo esc_html__("Midjourney", 'aiomatic-automatic-ai-content-writer');?></option>
1639 + <?php
1640 + }
1641 + if (isset($aiomatic_Main_Settings['replicate_app_id']) && trim($aiomatic_Main_Settings['replicate_app_id']) != '')
1642 + {
1643 + ?>
1644 + <option value="5"><?php echo esc_html__("Replicate", 'aiomatic-automatic-ai-content-writer');?></option>
1645 + <?php
1646 + }
1647 + if (isset($aiomatic_Main_Settings['ideogram_app_id']) && trim($aiomatic_Main_Settings['ideogram_app_id']) != '')
1648 + {
1649 + ?>
1650 + <option value="6"><?php echo esc_html__("Ideogram", 'aiomatic-automatic-ai-content-writer');?></option>
1651 + <?php
1652 + }
1653 + if (isset($aiomatic_Main_Settings['app_id_google']) && trim($aiomatic_Main_Settings['app_id_google']) != '')
1654 + {
1655 + ?>
1656 + <option value="7"><?php echo esc_html__("Google", 'aiomatic-automatic-ai-content-writer');?></option>
1657 + <?php
1658 + }
1659 + ?>
1660 + <option value="3"><?php echo esc_html__("Manual URL List", 'aiomatic-automatic-ai-content-writer');?></option>
1661 + </select>
1662 + </td>
1663 + </tr>
1664 + <tr class="hideImg cr_none">
1665 + <td class="cr_min_width_200">
1666 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1667 + <div class="bws_hidden_help_text cr_min_260px">
1668 + <?php
1669 + echo esc_html__("Set list of prompt commands (one on each line) you want to send to the AI image generator. This command can be any given task or order, based on which, it will generate images. You can use the following shortcodes: %%post_title%%, %%post_content%%, %%post_content_plain_text%%, %%post_excerpt%%, %%post_cats%%, %%post_tags%%, %%featured_image%%, %%blog_title%%, %%author_name%%, %%current_date_time%%, %%post_link%%, %%random_sentence%%, %%random_sentence2%%. The length of this command should not be greater than 1000 characters (4000 characters for Dall-E 3), otherwise the plugin will strip it to 1000 characters length. - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You can also add here a link to a .txt file, where you can add multiple prompts (one per line) and the plugin will select a random one at each run. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
1670 + echo '&nbsp;' . sprintf( wp_kses( __( "Please check some tips and tricks about writing prompt commands, <a href='%s' target='_blank'>here</a>. The [aicontent] shortcode is able to be used also here.", 'aiomatic-automatic-ai-content-writer'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), 'https://coderevolution.ro/knowledge-base/faq/how-to-create-a-good-seed-prompt-command-for-aiomatic-image-generating-for-openai-dall-e-api/' );
1671 + ?>
1672 + </div>
1673 + </div>
1674 + <b><?php echo esc_html__("Prompt For The AI Image Generator:", 'aiomatic-automatic-ai-content-writer');?></b>&nbsp;<b><a href="https://coderevolution.ro/knowledge-base/faq/how-to-create-a-good-seed-prompt-command-for-aiomatic-image-generating-for-openai-dall-e-api/" target="_blank">&#9432;</a></b>
1675 + </td>
1676 + <td>
1677 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[ai_command_image][]" placeholder="Please insert a command for the AI image generator" class="cr_width_full">Generate a high-resolution, visually compelling image that creatively interprets the theme encapsulated by this post title: "%%post_title%%". The image should be versatile enough to fit various niches, from technology and lifestyle to nature and science. It should feature a central, eye-catching element that abstractly represents the topic, surrounded by relevant, subtler motifs that provide context and depth. The composition should be balanced and aesthetically pleasing, with a harmonious color palette that complements the mood of the title. The artwork should be suitable for use as a captivating header image for a blog post.</textarea>
1678 + </td>
1679 + </tr>
1680 + <tr class="hideDalle cr_none">
1681 + <td class="cr_min_width_200">
1682 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1683 + <div class="bws_hidden_help_text cr_min_260px">
1684 + <?php
1685 + echo esc_html__("Select the AI model you wish to use for image the image generator.", 'aiomatic-automatic-ai-content-writer');
1686 + ?>
1687 + </div>
1688 + </div>
1689 + <b><?php echo esc_html__("AI Image Model:", 'aiomatic-automatic-ai-content-writer');?></b>
1690 + </td>
1691 + <td>
1692 + <select autocomplete="off" id="image_model" name="aiomatic_youtube_list[image_model][]" class="cr_width_full">
1693 + <?php
1694 + foreach(AIMOGEN_DALLE_IMAGE_MODELS as $modelx)
1695 + {
1696 + echo '<option value="' . esc_html($modelx) .'"';
1697 + if ($modelx == AIMOGEN_DEFAULT_IMAGE_MODEL) { echo ' selected'; }
1698 + echo '>' . esc_html($modelx) . '</option>';
1699 + }
1700 + ?>
1701 + </select>
1702 + </td>
1703 + </tr>
1704 + <tr class="hideImg cr_none">
1705 + <td>
1706 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1707 + <div class="bws_hidden_help_text cr_min_260px">
1708 + <?php
1709 + echo esc_html__("Select the size of the generated image.", 'aiomatic-automatic-ai-content-writer');
1710 + ?>
1711 + </div>
1712 + </div>
1713 + <b><?php echo esc_html__("Generated Image Size:", 'aiomatic-automatic-ai-content-writer');?></b>
1714 + </td>
1715 + <td class="cr_min_width_200">
1716 + <select autocomplete="off" id="model" name="aiomatic_youtube_list[image_size][]" class="cr_width_full">
1717 + <option value="256x256"><?php echo esc_html__("256x256 (only for Dall-E 2)", 'aiomatic-automatic-ai-content-writer');?></option>
1718 + <option value="512x512"><?php echo esc_html__("512x512 (only for Dall-E 2 & Stable Diffusion)", 'aiomatic-automatic-ai-content-writer');?></option>
1719 + <option value="1024x1024" selected><?php echo esc_html__("1024x1024", 'aiomatic-automatic-ai-content-writer');?></option>
1720 + <option value="1792x1024"><?php echo esc_html__("1792x1024 (only for Dall-E 3)", 'aiomatic-automatic-ai-content-writer');?></option>
1721 + <option value="1024x1792"><?php echo esc_html__("1024x1792 (only for Dall-E 3)", 'aiomatic-automatic-ai-content-writer');?></option>
1722 + <option value="1536x1024"><?php echo esc_html__("1536x1024 (only for gpt-image-1, gpt-image-1-mini, gpt-image-1.5, chatgpt-image-latest)", 'aiomatic-automatic-ai-content-writer');?></option>
1723 + <option value="1024x1536"><?php echo esc_html__("1024x1536 (only for gpt-image-1, gpt-image-1-mini, gpt-image-1.5, chatgpt-image-latest)", 'aiomatic-automatic-ai-content-writer');?></option>
1724 + </select>
1725 + </td>
1726 + </tr>
1727 + <tr>
1728 + <td>
1729 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1730 + <div class="bws_hidden_help_text cr_min_260px">
1731 + <?php
1732 + echo esc_html__("Insert a comma separated list of links to valid images that will be set randomly for the featured image for the posts that do not have a valid image attached or if you disabled automatical featured image generator. You can also use image numeric IDs from images found in the Media Gallery. To disable this feature, leave this field blank. Spintax supported. You can also use the %%random_image[keyword]%% shortcode to automatically import a random image from Google Image Search with the Creative Commons filter applied. To get a related image, you can also use: %%random_image[%%post_title%%]%%", 'aiomatic-automatic-ai-content-writer');
1733 + ?>
1734 + </div>
1735 + </div>
1736 + <b><?php echo esc_html__("Default Featured Image List:", 'aiomatic-automatic-ai-content-writer');?></b>
1737 + </td>
1738 + <td>
1739 + <textarea rows="1" class="cr_width_60p" name="aiomatic_youtube_list[image_url][]" placeholder="Please insert the link to a valid image (spintax supported)"></textarea>
1740 + <input class="cr_width_33p aiomatic_image_button" type="button" value=">>>"/>
1741 + </td>
1742 + </tr>
1743 + <tr><td colspan="2">
1744 + <h3><?php echo esc_html__("Posting Options", 'aiomatic-automatic-ai-content-writer');?>:</h3>
1745 + </td></tr>
1746 + <tr>
1747 + <td class="cr_min_width_200">
1748 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1749 + <div class="bws_hidden_help_text cr_min_260px">
1750 + <?php
1751 + echo esc_html__("Enter a HTML text that should be prepended to the AI generated content in each created post. You can use the following shortcodes: %%custom_html%%, %%custom_html2%%, %%video_title%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%sections_count%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%%, %%random_image[keyword]%%, %%random_image_url[keyword]%%, %%random_video[keyword]%%, %%royalty_free_image_attribution%% - you can also use an optional parameter in the random_image and random_video shortcodes, which will add a percentage chance for the media to appear or not - example: %%random_video[keyword][60]%% - a video will appear in 60% of cases, in the rest of 40%, nothing will be returned by the shortcode - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
1752 + ?>
1753 + </div>
1754 + </div>
1755 + <b><?php echo esc_html__("HTML Text To Prepend To AI Created Content:", 'aiomatic-automatic-ai-content-writer');?></b>&nbsp;<b><a href="https://coderevolution.ro/knowledge-base/faq/post-template-reference-advanced-usage/" target="_blank">&#9432;</a></b>
1756 + </td>
1757 + <td>
1758 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[post_prepend][]" placeholder="HTML content to prepend to the AI generated content" class="cr_width_full"></textarea>
1759 + </td>
1760 + </tr>
1761 + <tr>
1762 + <td class="cr_min_width_200">
1763 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1764 + <div class="bws_hidden_help_text cr_min_260px">
1765 + <?php
1766 + echo esc_html__("Enter a HTML text that should be appended to the AI generated content in each created post. You can use the following shortcodes: %%custom_html%%, %%custom_html2%%, %%video_title%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%sections_count%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%%, %%random_image[keyword]%%, %%random_image_url[keyword]%%, %%random_video[keyword]%%, %%royalty_free_image_attribution%% - you can also use an optional parameter in the random_image and random_video shortcodes, which will add a percentage chance for the media to appear or not - example: %%random_video[keyword][60]%% - a video will appear in 60% of cases, in the rest of 40%, nothing will be returned by the shortcode - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer');
1767 + ?>
1768 + </div>
1769 + </div>
1770 + <b><?php echo esc_html__("HTML Text To Append To AI Created Content:", 'aiomatic-automatic-ai-content-writer');?></b>&nbsp;<b><a href="https://coderevolution.ro/knowledge-base/faq/post-template-reference-advanced-usage/" target="_blank">&#9432;</a></b>
1771 + </td>
1772 + <td>
1773 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[post_append][]" placeholder="HTML content to append to the AI generated content" class="cr_width_full"></textarea>
1774 + </td>
1775 + </tr>
1776 + <tr>
1777 + <td class="cr_min_width_200">
1778 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1779 + <div class="bws_hidden_help_text cr_min_260px">
1780 + <?php
1781 + echo esc_html__("Custom AI generated content shortcode creator. If you wish to create content from multiple AI prompts, and use them in post content/post custom fields/taxonomies, you can configure this from here. Also, these shortcodes will be able to be used in custom fields or custom taxonomies which the plugin will create. Syntax for this field: shortcode_name => AI_MODEL_TO_USE @@ TEXTUAL_PROMPT_TO_USE (to specify multiple shortcodes and crawling values, separate them by a new line. Example: my_custom_shortcode => gpt-4.1-mini @@ Write a short poem. Afterwards, you can use shortcodes in any settings field that supports shortcodes (ex: 'HTML Text To Append To AI Created Content' settings field), like this: %%my_custom_shortcode%%. Official format is %%name_of_custom_shortcode%%", 'aiomatic-automatic-ai-content-writer');
1782 + ?>
1783 + </div>
1784 + </div>
1785 + <b><?php echo esc_html__("Custom Shortcode Creator (Optional):", 'aiomatic-automatic-ai-content-writer');?></b><span class="tool" data-tip="Supported models: <?php echo esc_html(implode(',', aiomatic_get_all_models()));?>">&nbsp;&#9432;</span>
1786 + </td>
1787 + <td>
1788 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[custom_shortcodes][]" placeholder="shortcode_name => AI_MODEL @@ AI_PROMPT" class="cr_width_full"></textarea>
1789 + </td>
1790 + </tr>
1791 + <tr>
1792 + <td>
1793 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1794 + <div class="bws_hidden_help_text cr_min_260px">
1795 + <?php
1796 + echo esc_html__("The AI writer might add the title of the post to the created post content. Check this checkbox if you want to remove the title from the post content.", 'aiomatic-automatic-ai-content-writer');
1797 + ?>
1798 + </div>
1799 + </div>
1800 + <b><?php echo esc_html__("Strip Title From Content:", 'aiomatic-automatic-ai-content-writer');?></b>
1801 + </td>
1802 + <td>
1803 + <input type="checkbox" id="strip_title" name="aiomatic_youtube_list[strip_title][]">
1804 + </td>
1805 + </tr>
1806 + <tr>
1807 + <td>
1808 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1809 + <div class="bws_hidden_help_text cr_min_260px"><?php echo esc_html__("Do you want to skip spinning of posts generated by this rule?", 'aiomatic-automatic-ai-content-writer');?>
1810 + </div>
1811 + </div>
1812 + <b><?php echo esc_html__("Do Not Spin Posts Generated By This Rule:", 'aiomatic-automatic-ai-content-writer');?></b>
1813 + </td>
1814 + <td>
1815 + <input type="checkbox" id="skip_spin" name="aiomatic_youtube_list[skip_spin][]">
1816 + </td>
1817 + </tr>
1818 + <tr>
1819 + <td>
1820 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1821 + <div class="bws_hidden_help_text cr_min_260px"><?php echo esc_html__("Do you want to skip translating of posts generated by this rule?", 'aiomatic-automatic-ai-content-writer');?>
1822 + </div>
1823 + </div>
1824 + <b><?php echo esc_html__("Do Not Translate Posts Generated By This Rule:", 'aiomatic-automatic-ai-content-writer');?></b>
1825 + </td>
1826 + <td>
1827 + <input type="checkbox" id="skip_translate" name="aiomatic_youtube_list[skip_translate][]">
1828 + </td>
1829 + </tr>
1830 + <tr>
1831 + <td>
1832 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1833 + <div class="bws_hidden_help_text cr_min_260px">
1834 + <?php
1835 + echo esc_html__("Select if you want to process each title from the added list only once.", 'aiomatic-automatic-ai-content-writer');
1836 + ?>
1837 + </div>
1838 + </div>
1839 + <b><?php echo esc_html__("Process Each Title/Video Only Once:", 'aiomatic-automatic-ai-content-writer');?></b>
1840 + </td>
1841 + <td>
1842 + <input type="checkbox" id="title_once" name="aiomatic_youtube_list[title_once][]" checked>
1843 + </td>
1844 + </tr>
1845 + <tr>
1846 + <td>
1847 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1848 + <div class="bws_hidden_help_text cr_min_260px">
1849 + <?php
1850 + echo esc_html__("Select if you want to overwrite existing posts during the publishing process.", 'aiomatic-automatic-ai-content-writer');
1851 + ?>
1852 + </div>
1853 + </div>
1854 + <b><?php echo esc_html__("Overwrite Existing Posts:", 'aiomatic-automatic-ai-content-writer');?></b>
1855 + </td>
1856 + <td>
1857 + <input type="checkbox" id="overwrite_existing" name="aiomatic_youtube_list[overwrite_existing][]">
1858 + </td>
1859 + </tr>
1860 + <tr>
1861 + <td>
1862 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1863 + <div class="bws_hidden_help_text cr_min_260px">
1864 + <?php
1865 + echo esc_html__("Select if you want to process added YouTube videos in order of entry or in random order.", 'aiomatic-automatic-ai-content-writer');
1866 + ?>
1867 + </div>
1868 + </div>
1869 + <b><?php echo esc_html__("Process Videos In Order Of Entry:", 'aiomatic-automatic-ai-content-writer');?></b>
1870 + </td>
1871 + <td>
1872 + <input type="checkbox" id="no_random" name="aiomatic_youtube_list[no_random][]">
1873 + </td>
1874 + </tr>
1875 + <tr>
1876 + <td>
1877 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1878 + <div class="bws_hidden_help_text cr_min_260px">
1879 + <?php
1880 + echo esc_html__("Run regex on post content. To disable this feature, leave this field blank. No Regex separators are required here. You can add multiple Regex expressions, each on a different line.", 'aiomatic-automatic-ai-content-writer');
1881 + ?>
1882 + </div>
1883 + </div>
1884 + <b><?php echo esc_html__("Run Regex On Content:", 'aiomatic-automatic-ai-content-writer');?></b>
1885 + </td>
1886 + <td>
1887 + <textarea rows="1" class="cr_width_full" name="aiomatic_youtube_list[strip_by_regex][]" placeholder="regex expression" class="cr_width_full"></textarea>
1888 + </td>
1889 + </tr>
1890 + <tr>
1891 + <td>
1892 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1893 + <div class="bws_hidden_help_text cr_min_260px">
1894 + <?php
1895 + echo esc_html__("Replace the above regex matches with this regex expression. If you want to strip matched content, leave this field blank. No Regex separators are required here. You can add multiple replacement expressions, each on a different line.", 'aiomatic-automatic-ai-content-writer');
1896 + ?>
1897 + </div>
1898 + </div>
1899 + <b><?php echo esc_html__("Replace Matches From Regex (Content):", 'aiomatic-automatic-ai-content-writer');?></b>
1900 + </td>
1901 + <td>
1902 + <textarea rows="1" class="cr_width_full" name="aiomatic_youtube_list[replace_regex][]" placeholder="regex replacement" class="cr_width_full"></textarea>
1903 + </td>
1904 + </tr>
1905 + <tr>
1906 + <td>
1907 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1908 + <div class="bws_hidden_help_text cr_min_260px">
1909 + <?php
1910 + echo esc_html__("Select the author that you want to assign for the automatically generated posts.", 'aiomatic-automatic-ai-content-writer');
1911 + ?>
1912 + </div>
1913 + </div>
1914 + <b><?php echo esc_html__("Post Author:", 'aiomatic-automatic-ai-content-writer');?></b>
1915 + </td>
1916 + <td class="cr_min_width_200">
1917 + <select autocomplete="off" id="post_author" name="aiomatic_youtube_list[post_author][]" class="cr_width_full">
1918 + <option value="rand"><?php echo esc_html__("Random user", 'aiomatic-automatic-ai-content-writer');?></option>
1919 + <?php
1920 + $blogusers = get_users( [ 'role__in' => [ 'contributor', 'author', 'editor', 'administrator' ] ] );
1921 + foreach ($blogusers as $user) {
1922 + echo '<option value="' . esc_html($user->ID) . '"';
1923 + echo '>' . esc_html($user->display_name) . '</option>';
1924 + }
1925 + ?>
1926 + </select>
1927 + </td>
1928 + </tr>
1929 + <tr>
1930 + <td>
1931 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1932 + <div class="bws_hidden_help_text cr_min_260px">
1933 + <?php
1934 + echo esc_html__("Select the status that you want for the automatically generated posts to have.", 'aiomatic-automatic-ai-content-writer');
1935 + ?>
1936 + </div>
1937 + </div>
1938 + <b><?php echo esc_html__("Post Status:", 'aiomatic-automatic-ai-content-writer');?></b>
1939 + </td>
1940 + <td class="cr_min_width_200">
1941 + <select autocomplete="off" id="submit_status" name="aiomatic_youtube_list[submit_status][]" class="cr_width_full">
1942 + <option value="pending"><?php echo esc_html__("Pending -> Moderate", 'aiomatic-automatic-ai-content-writer');?></option>
1943 + <option value="draft"><?php echo esc_html__("Draft -> Moderate", 'aiomatic-automatic-ai-content-writer');?></option>
1944 + <option value="publish" selected><?php echo esc_html__("Published", 'aiomatic-automatic-ai-content-writer');?></option>
1945 + <option value="private"><?php echo esc_html__("Private", 'aiomatic-automatic-ai-content-writer');?></option>
1946 + <option value="trash"><?php echo esc_html__("Trash", 'aiomatic-automatic-ai-content-writer');?></option>
1947 + </select>
1948 + </td>
1949 + </tr>
1950 + <tr>
1951 + <td>
1952 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1953 + <div class="bws_hidden_help_text cr_min_260px">
1954 + <?php
1955 + echo esc_html__("Select the type (post/page) for your automatically generated item.", 'aiomatic-automatic-ai-content-writer');
1956 + ?>
1957 + </div>
1958 + </div>
1959 + <b><?php echo esc_html__("Item Type:", 'aiomatic-automatic-ai-content-writer');?></b>
1960 + </td>
1961 + <td class="cr_min_width_200">
1962 + <select autocomplete="off" id="default_type" name="aiomatic_youtube_list[default_type][]" class="cr_width_full" onchange="go_change_cats(this, '');">
1963 + <?php
1964 + $is_first = true;
1965 + foreach ( get_post_types( '', 'names' ) as $post_type ) {
1966 + if(strstr($post_type, 'aiomatic_'))
1967 + {
1968 + continue;
1969 + }
1970 + echo '<option value="' . esc_attr($post_type) . '"';
1971 + if($is_first === true)
1972 + {
1973 + echo ' selected';
1974 + $is_first = false;
1975 + }
1976 + echo '>' . esc_html($post_type) . '</option>';
1977 + }
1978 + ?>
1979 + </select>
1980 + </td>
1981 + </tr>
1982 + <tr>
1983 + <td>
1984 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1985 + <div class="bws_hidden_help_text cr_min_260px">
1986 + <?php
1987 + echo esc_html__("If your template supports 'Post Formats', than you can select one here. If not, leave this at it's default value.", 'aiomatic-automatic-ai-content-writer');
1988 + ?>
1989 + </div>
1990 + </div>
1991 + <b><?php echo esc_html__("Generated Post Format:", 'aiomatic-automatic-ai-content-writer');?></b>
1992 + </td>
1993 + <td class="cr_min_width_200">
1994 + <select autocomplete="off" id="post_format" name="aiomatic_youtube_list[post_format][]" class="cr_width_full">
1995 + <option value="post-format-standard" selected><?php echo esc_html__("Standard", 'aiomatic-automatic-ai-content-writer');?></option>
1996 + <option value="post-format-aside"><?php echo esc_html__("Aside", 'aiomatic-automatic-ai-content-writer');?></option>
1997 + <option value="post-format-gallery"><?php echo esc_html__("Gallery", 'aiomatic-automatic-ai-content-writer');?></option>
1998 + <option value="post-format-link"><?php echo esc_html__("Link", 'aiomatic-automatic-ai-content-writer');?></option>
1999 + <option value="post-format-image"><?php echo esc_html__("Image", 'aiomatic-automatic-ai-content-writer');?></option>
2000 + <option value="post-format-quote"><?php echo esc_html__("Quote", 'aiomatic-automatic-ai-content-writer');?></option>
2001 + <option value="post-format-status"><?php echo esc_html__("Status", 'aiomatic-automatic-ai-content-writer');?></option>
2002 + <option value="post-format-video"><?php echo esc_html__("Video", 'aiomatic-automatic-ai-content-writer');?></option>
2003 + <option value="post-format-audio"><?php echo esc_html__("Audio", 'aiomatic-automatic-ai-content-writer');?></option>
2004 + <option value="post-format-chat"><?php echo esc_html__("Chat", 'aiomatic-automatic-ai-content-writer');?></option>
2005 + </select>
2006 + </td>
2007 + </tr>
2008 + <tr>
2009 + <td>
2010 + <div>
2011 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2012 + <div class="bws_hidden_help_text cr_min_260px">
2013 + <?php
2014 + echo esc_html__("Set the ID of the parent of created posts. This is useful for BBPress integration, to assign forum IDs for created topics or for other similar functionalities.", 'aiomatic-automatic-ai-content-writer');
2015 + ?>
2016 + </div>
2017 + </div>
2018 + <b><?php echo esc_html__("Post Parent ID:", 'aiomatic-automatic-ai-content-writer');?></b>
2019 + </td>
2020 + <td>
2021 + <input type="number" min="1" class="cr_width_full" name="aiomatic_youtube_list[parent_id][]" value="" placeholder="Post parent ID" class="cr_width_full">
2022 + </td>
2023 + </tr>
2024 + <tr>
2025 + <td>
2026 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2027 + <div class="bws_hidden_help_text cr_min_260px">
2028 + <?php
2029 + echo esc_html__("Do you want to enable comments for the generated posts?", 'aiomatic-automatic-ai-content-writer');
2030 + ?>
2031 + </div>
2032 + </div>
2033 + <b><?php echo esc_html__("Enable Comments For Posts:", 'aiomatic-automatic-ai-content-writer');?></b>
2034 + </td>
2035 + <td>
2036 + <input type="checkbox" id="enable_comments" name="aiomatic_youtube_list[enable_comments][]" checked>
2037 + </td>
2038 + </tr>
2039 + <tr>
2040 + <td>
2041 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2042 + <div class="bws_hidden_help_text cr_min_260px">
2043 + <?php
2044 + echo esc_html__("Do you want to enable pingbacks/trackbacks for the generated posts?", 'aiomatic-automatic-ai-content-writer');
2045 + ?>
2046 + </div>
2047 + </div>
2048 + <b><?php echo esc_html__("Enable Pingback/Trackback:", 'aiomatic-automatic-ai-content-writer');?></b>
2049 + </td>
2050 + <td>
2051 + <input type="checkbox" id="enable_pingback" name="aiomatic_youtube_list[enable_pingback][]" checked>
2052 + </td>
2053 + </tr>
2054 + <tr>
2055 + <td>
2056 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2057 + <div class="bws_hidden_help_text cr_min_260px">
2058 + <?php
2059 + echo sprintf( wp_kses( __( "Do you want to set a custom post publish date for posts? Set the range in the below field Accepted values for this field are listed: <a href='%s' target='_blank'>here</a>. To disable this feature, leave this field blank.", 'aiomatic-automatic-ai-content-writer'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url_raw( 'https://www.php.net/manual/en/datetime.formats.php' ) );
2060 + ?>
2061 + </div>
2062 + </div>
2063 + <b><?php echo esc_html__("Set a Custom Post Publish Date Range:", 'aiomatic-automatic-ai-content-writer');?></b>
2064 + </td>
2065 + <td>
2066 + <input type="text" id="min_time" name="aiomatic_youtube_list[min_time][]" placeholder="Start time" class="cr_half"> - <input type="text" id="max_time" name="aiomatic_youtube_list[max_time][]" placeholder="End time" class="cr_half">
2067 + </td>
2068 + </tr>
2069 + <tr>
2070 + <td class="cr_min_width_200">
2071 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2072 + <div class="bws_hidden_help_text_top cr_min_260px">
2073 + <?php
2074 + echo esc_html__("Set the custom fields that will be set for generated posts. The syntax for this field is the following: custom_field_name1 => custom_field_value1, custom_field_name2 => custom_field_value2, ... . You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators. You can also use the following topic based shortcodes: %%post_title%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%%", 'aiomatic-automatic-ai-content-writer');
2075 + ?>
2076 + </div>
2077 + </div>
2078 + <b><?php echo esc_html__("Post Custom Fields:", 'aiomatic-automatic-ai-content-writer');?></b>&nbsp;<b><a href="https://coderevolution.ro/knowledge-base/faq/post-template-reference-advanced-usage/" target="_blank">&#9432;</a></b>
2079 + </td>
2080 + <td>
2081 + <textarea rows="1" cols="70" name="aiomatic_youtube_list[custom_fields][]" placeholder="Please insert your desired custom fields. Example: title_custom_field => %%post_title%%" class="cr_width_full"></textarea>
2082 + </td>
2083 + </tr>
2084 + <tr>
2085 + <td class="cr_min_width_200">
2086 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2087 + <div class="bws_hidden_help_text_top cr_min_260px">
2088 + <?php
2089 + echo esc_html__("Set the custom taxonomies that will be set for generated posts. The syntax for this field is the following: custom_taxonomy_name1 => custom_taxonomy_value1A, custom_taxonomy_value1B; custom_taxonomy_name2 => custom_taxonomy_value2A, custom_taxonomy_value2B; ... . You can also set hierarhical taxonomies (parent > child), in this format: custom_taxonomy_name => parent1 > child1 . You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators. You can also use the following topic based shortcodes: %%post_title%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%%", 'aiomatic-automatic-ai-content-writer');
2090 + ?>
2091 + </div>
2092 + </div>
2093 + <b><?php echo esc_html__("Post Custom Taxonomies:", 'aiomatic-automatic-ai-content-writer');?></b>&nbsp;<b><a href="https://coderevolution.ro/knowledge-base/faq/post-template-reference-advanced-usage/" target="_blank">&#9432;</a></b>
2094 + </td>
2095 + <td>
2096 + <textarea rows="1" cols="70" name="aiomatic_youtube_list[custom_tax][]" placeholder="Please insert your desired custom taxonomies. Example: custom_taxonomy_name => %%post_title%%" class="cr_width_full"></textarea>
2097 + </td>
2098 + </tr>
2099 + <tr>
2100 + <td>
2101 + <div>
2102 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2103 + <div class="bws_hidden_help_text_top cr_min_260px">
2104 + <?php
2105 + echo esc_html__("Enter a 2 letter language code that will be assigned as the WPML/Polylang language for posts. Example: for German, input: de", 'aiomatic-automatic-ai-content-writer');
2106 + ?>
2107 + </div>
2108 + </div>
2109 + <b><?php echo esc_html__("Assign WPML/Polylang Language to Posts:", 'aiomatic-automatic-ai-content-writer');?></b>
2110 + </td>
2111 + <td>
2112 + <input type="text" class="cr_width_full" name="aiomatic_youtube_list[wpml_lang][]" value="" placeholder="WPML/Polylang language" class="cr_width_full">
2113 + </td>
2114 + </tr>
2115 + <tr><td colspan="2">
2116 + <h3><?php echo esc_html__("Scheduling Restrictions", 'aiomatic-automatic-ai-content-writer');?>:</h3>
2117 + </td></tr>
2118 + <tr>
2119 + <td class="cr_min_width_200">
2120 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2121 + <div class="bws_hidden_help_text cr_min_260px">
2122 + <?php
2123 + echo esc_html__("Select the days of the week when you don't want to run this rule. You can enter a comma separate list of day names.", 'aiomatic-automatic-ai-content-writer');
2124 + ?>
2125 + </div>
2126 + </div>
2127 + <b><?php echo esc_html__("Do Not Run This Rule On The Following Days Of The Week:", 'aiomatic-automatic-ai-content-writer');?></b>
2128 + <br/><?php echo esc_html__("Current Server Time:", 'aiomatic-automatic-ai-content-writer') . '&nbsp;' . esc_html(date('l', time())) . ', ' . esc_html(date("Y-m-d H:i:s"));?>
2129 + </td>
2130 + <td>
2131 + <input type="text" class="cr_width_full" name="aiomatic_youtube_list[days_no_run][]" value="" placeholder="Mo,Tu,We,Th,Fr,Sa,Su" class="cr_width_full">
2132 + </td>
2133 + </tr>
2134 + </table>
2135 + </div>
2136 + </div>
2137 + <div class="codemodalfzr-footer">
2138 + <br/>
2139 + <h3 class="cr_inline">Aimogen Automatic Post Generator</h3>
2140 + <span id="aiomatic_ok" class="codeokfzr cr_inline">OK&nbsp;</span>
2141 + <br/><br/>
2142 + </div>
2143 + </div>
2144 + </div>
2145 + </td>
2146 + <td class="cr_shrt_td2"><span class="cr_gray20">X</span></td>
2147 + <td class="cr_short_td"><input type="checkbox" name="aiomatic_youtube_list[active][]" value="1" checked />
2148 + <input type="hidden" name="aiomatic_youtube_list[last_run][]" value="1988-01-27 00:00:00"/>
2149 + <input type="hidden" name="aiomatic_youtube_list[rule_unique_id][]" value="<?php echo esc_html(uniqid('', true));?>"/>
2150 + </td>
2151 + <td class="cr_short_td">
2152 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2153 + <div class="bws_hidden_help_text cr_min_260px">
2154 + <?php
2155 + echo esc_html__("No info.", 'aiomatic-automatic-ai-content-writer');
2156 + ?>
2157 + </div>
2158 + </div>
2159 + </td>
2160 + <td class="cr_center">
2161 + <div>
2162 + <img src="<?php
2163 + echo esc_url_raw(plugin_dir_url(dirname(__FILE__)) . 'images/running.gif');
2164 + ?>" alt="Running" class="cr_running">
2165 + <div class="codemainfzr cr_gray_back cr_width_80p">
2166 + <select autocomplete="off" class="codemainfzr" id="actions" class="actions" name="actions" disabled>
2167 + <option value="select" disabled selected><?php echo esc_html__("Select an Action", 'aiomatic-automatic-ai-content-writer');?></option>
2168 + <option value="run" onclick=""><?php echo esc_html__("Run This Rule Now", 'aiomatic-automatic-ai-content-writer');?></option>
2169 + <option value="duplicate" onclick=""><?php echo esc_html__("Duplicate This Rule", 'aiomatic-automatic-ai-content-writer');?></option>
2170 + <option value="up" onclick=""><?php echo esc_html__("Move This Rule Up", 'aiomatic-automatic-ai-content-writer');?></option>
2171 + <option value="down" onclick=""><?php echo esc_html__("Move This Rule Down", 'aiomatic-automatic-ai-content-writer');?></option>
2172 + <option value="trash" onclick=""><?php echo esc_html__("Send All Posts To Trash", 'aiomatic-automatic-ai-content-writer');?></option>
2173 + <option value="delete" onclick=""><?php echo esc_html__("Permanently Delete All Posts", 'aiomatic-automatic-ai-content-writer');?></option>
2174 + </select>
2175 + </div>
2176 + </div>
2177 + </td>
2178 + </tr>
2179 + <?php
2180 + }
2181 + ?>
2182 + </tbody>
2183 + </table>
2184 + </div>
2185 + </div>
2186 + </div>
2187 + <hr/>
2188 +
2189 + <div>
2190 + <?php
2191 + $next_url = (aiomatic_isSecure() ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
2192 + if(stristr($next_url, 'aiomatic_page=') === false)
2193 + {
2194 + if(stristr($next_url, '?') === false)
2195 + {
2196 + if($max_pages == 1)
2197 + {
2198 + $next_url .= '?aiomatic_page=1';
2199 + }
2200 + else
2201 + {
2202 + $next_url .= '?aiomatic_page=2';
2203 + }
2204 + }
2205 + else
2206 + {
2207 + if($max_pages == 1)
2208 + {
2209 + $next_url .= '&aiomatic_page=1';
2210 + }
2211 + else
2212 + {
2213 + $next_url .= '&aiomatic_page=2';
2214 + }
2215 + }
2216 + }
2217 + else
2218 + {
2219 + if(isset($_GET['aiomatic_page']))
2220 + {
2221 + $curent_page = $_GET["aiomatic_page"];
2222 + }
2223 + else
2224 + {
2225 + $curent_page = '';
2226 + }
2227 + if(is_numeric($curent_page))
2228 + {
2229 + $next_page = $curent_page + 1;
2230 + if($next_page > $max_pages)
2231 + {
2232 + $next_page = $max_pages;
2233 + }
2234 + if($next_page <= 0)
2235 + {
2236 + $next_page = 1;
2237 + }
2238 + $next_url = str_replace('aiomatic_page=' . $curent_page, 'aiomatic_page=' . $next_page, $next_url);
2239 + }
2240 + else
2241 + {
2242 + if(stristr($next_url, '?') === false)
2243 + {
2244 + if($max_pages == 1)
2245 + {
2246 + $next_url .= '?aiomatic_page=1';
2247 + }
2248 + else
2249 + {
2250 + $next_url .= '?aiomatic_page=2';
2251 + }
2252 + }
2253 + else
2254 + {
2255 + if($max_pages == 1)
2256 + {
2257 + $next_url .= '&aiomatic_page=1';
2258 + }
2259 + else
2260 + {
2261 + $next_url .= '&aiomatic_page=2';
2262 + }
2263 + }
2264 + }
2265 + }
2266 + $prev_url = (aiomatic_isSecure() ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
2267 + if(stristr($prev_url, 'aiomatic_page=') === false)
2268 + {
2269 + if(stristr($prev_url, '?') === false)
2270 + {
2271 + $prev_url .= '?aiomatic_page=1';
2272 + }
2273 + else
2274 + {
2275 + $prev_url .= '&aiomatic_page=1';
2276 + }
2277 + }
2278 + else
2279 + {
2280 + if(isset($_GET['aiomatic_page']))
2281 + {
2282 + $curent_page = $_GET["aiomatic_page"];
2283 + }
2284 + else
2285 + {
2286 + $curent_page = '';
2287 + }
2288 + if(is_numeric($curent_page))
2289 + {
2290 + $go_to = $curent_page - 1;
2291 + if($go_to <= 0)
2292 + {
2293 + $go_to = 1;
2294 + }
2295 + if($go_to > $max_pages)
2296 + {
2297 + $go_to = $max_pages;
2298 + }
2299 + $prev_url = str_replace('aiomatic_page=' . $curent_page, 'aiomatic_page=' . $go_to, $prev_url);
2300 + }
2301 + else
2302 + {
2303 + if(stristr($prev_url, '?') === false)
2304 + {
2305 + $prev_url .= '?aiomatic_page=1';
2306 + }
2307 + else
2308 + {
2309 + $prev_url .= '&aiomatic_page=1';
2310 + }
2311 + }
2312 + }
2313 + $first_url = (aiomatic_isSecure() ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
2314 + if(stristr($first_url, 'aiomatic_page=') === false)
2315 + {
2316 + if(stristr($first_url, '?') === false)
2317 + {
2318 + $first_url .= '?aiomatic_page=1';
2319 + }
2320 + else
2321 + {
2322 + $first_url .= '&aiomatic_page=1';
2323 + }
2324 + }
2325 + else
2326 + {
2327 + if(isset($_GET['aiomatic_page']))
2328 + {
2329 + $curent_page = $_GET["aiomatic_page"];
2330 + }
2331 + else
2332 + {
2333 + $curent_page = '';
2334 + }
2335 + if(is_numeric($curent_page))
2336 + {
2337 + $first_url = str_replace('aiomatic_page=' . $curent_page, 'aiomatic_page=1', $first_url);
2338 + }
2339 + else
2340 + {
2341 + if(stristr($first_url, '?') === false)
2342 + {
2343 + $first_url .= '?aiomatic_page=1';
2344 + }
2345 + else
2346 + {
2347 + $first_url .= '&aiomatic_page=1';
2348 + }
2349 + }
2350 + }
2351 + $last_url = (aiomatic_isSecure() ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
2352 + if(stristr($last_url, 'aiomatic_page=') === false)
2353 + {
2354 + if(stristr($last_url, '?') === false)
2355 + {
2356 + $last_url .= '?aiomatic_page=' . $max_pages;
2357 + }
2358 + else
2359 + {
2360 + $last_url .= '&aiomatic_page=' . $max_pages;
2361 + }
2362 + }
2363 + else
2364 + {
2365 + if(isset($_GET['aiomatic_page']))
2366 + {
2367 + $curent_page = $_GET["aiomatic_page"];
2368 + }
2369 + else
2370 + {
2371 + $curent_page = '';
2372 + }
2373 + if(is_numeric($curent_page))
2374 + {
2375 + $last_url = str_replace('aiomatic_page=' . $curent_page, 'aiomatic_page=' . $max_pages, $last_url);
2376 + }
2377 + else
2378 + {
2379 + if(stristr($last_url, '?') === false)
2380 + {
2381 + $last_url .= '?aiomatic_page=' . $max_pages;
2382 + }
2383 + else
2384 + {
2385 + $last_url .= '&aiomatic_page=' . $max_pages;
2386 + }
2387 + }
2388 + }
2389 + if(isset($_GET['aiomatic_page']))
2390 + {
2391 + $this_page = $_GET["aiomatic_page"];
2392 + }
2393 + else
2394 + {
2395 + $this_page = '1';
2396 + }
2397 + echo '<center><a href="' . esc_url_raw($first_url) . '">' . esc_html__('First Page', 'aiomatic-automatic-ai-content-writer') . '</a>&nbsp;&nbsp;&nbsp;<a href="' . esc_url_raw($prev_url) . '">' . esc_html__('Previous Page', 'aiomatic-automatic-ai-content-writer') . '</a>&nbsp;&nbsp;' . esc_html__('Page', 'aiomatic-automatic-ai-content-writer') . ' ' . esc_html($this_page) . ' ' . esc_html__('of', 'aiomatic-automatic-ai-content-writer') . ' ' . esc_html($max_pages) . '&nbsp;-&nbsp;' . esc_html__("Rules Per Page:", 'aiomatic-automatic-ai-content-writer') . '&nbsp;&nbsp;<input class="cr_50" type="number" min="2" step="1" max="999" name="posts_per_page" value="' . esc_attr($rules_per_page). '" required/>&nbsp;&nbsp;&nbsp;<a href="' . esc_url_raw($next_url) . '">' . esc_html__('Next Page', 'aiomatic-automatic-ai-content-writer') . '</a>&nbsp;&nbsp;&nbsp;<a href="' . esc_url_raw($last_url) . '">' . esc_html__('Last Page', 'aiomatic-automatic-ai-content-writer') . '</a></center>
2398 + <center></center>
2399 + <center>Info: You can add new rules only on the last page.</center>';
2400 + ?>
2401 + <div>
2402 + <p class="crsubmit"><input type="submit" name="btnSubmit" id="btnSubmit" class="button button-primary" onclick="unsaved = false;" value="<?php echo esc_html__("Save Settings", 'aiomatic-automatic-ai-content-writer');?>"/></p>
2403 + </div>
2404 + <div>
2405 + <div><?php echo esc_html__("* = required", 'aiomatic-automatic-ai-content-writer');?></div><br/><?php echo sprintf( wp_kses( __( "Check more settings which apply to rule running, over at the plugin's 'Settings' menu, <a href='%s' target='_blank'>here</a>.", 'aiomatic-automatic-ai-content-writer'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url_raw( get_admin_url() . 'admin.php?page=aiomatic_admin_settings#tab-17' ) );?>
2406 + <br/>
2407 + <?php echo esc_html__("New! You can use the [aicontent]Your Prompt[/aicontent] shortcode in this or other", 'aiomatic-automatic-ai-content-writer') . " <a href='https://wpbay.com/store/coderevolution/' target='_blank'>" . esc_html__("'omatic plugins created by CodeRevolution", 'aiomatic-automatic-ai-content-writer') . "</a>" . esc_html__(", click for details:", 'aiomatic-automatic-ai-content-writer');?>&nbsp;<a href="https://coderevolution.ro/knowledge-base/faq/how-to-create-ai-generated-content-from-any-plugin-built-by-coderevolution/" target="_blank"><img src="https://i.ibb.co/WGQ1rtF/ai.webp" alt="artificial-intelligence-badge" title="AI content generator support, when used together with the Aimogen plugin"></a><br/><br/><a href="https://www.youtube.com/watch?v=5rbnu_uis7Y" target="_blank"><?php echo esc_html__("Nested Shortcodes also supported!", 'aiomatic-automatic-ai-content-writer');?></a><br/><br/><?php echo esc_html__("Confused about rule running status icons?", 'aiomatic-automatic-ai-content-writer');?> <a href="http://coderevolution.ro/knowledge-base/faq/how-to-interpret-the-rule-running-visual-indicators-red-x-yellow-diamond-green-tick-from-inside-plugins/" target="_blank"><?php echo esc_html__("More info", 'aiomatic-automatic-ai-content-writer');?></a><br/>
2408 + <div class="cr_none" id="midas_icons">
2409 + <table>
2410 + <tr>
2411 + <td><img id="run_img" src="<?php echo esc_url_raw(plugin_dir_url(dirname(__FILE__)) . 'images/running.gif');?>" alt="Running" title="status"></td>
2412 + <td><?php echo esc_html__("In Progress", 'aiomatic-automatic-ai-content-writer');?> - <b><?php echo esc_html__("Importing is Running", 'aiomatic-automatic-ai-content-writer');?></b></td>
2413 + </tr>
2414 + <tr>
2415 + <td><img id="ok_img" src="<?php echo esc_url_raw(plugin_dir_url(dirname(__FILE__)) . 'images/ok.gif');?>" alt="OK" title="status"></td>
2416 + <td><?php echo esc_html__("Success", 'aiomatic-automatic-ai-content-writer');?> - <b><?php echo esc_html__("New Posts Created", 'aiomatic-automatic-ai-content-writer');?></b></td>
2417 + </tr>
2418 + <tr>
2419 + <td><img id="fail_img" src="<?php echo esc_url_raw(plugin_dir_url(dirname(__FILE__)) . 'images/failed.gif');?>" alt="Faield" title="status"></td>
2420 + <td><?php echo esc_html__("Failed", 'aiomatic-automatic-ai-content-writer');?> - <b><?php echo esc_html__("An Error Occurred.", 'aiomatic-automatic-ai-content-writer');?> <b><?php echo esc_html__("Please check 'Activity and Logging' plugin menu for details.", 'aiomatic-automatic-ai-content-writer');?></b></td>
2421 + </tr>
2422 + <tr>
2423 + <td><img id="nochange_img" src="<?php echo esc_url_raw(plugin_dir_url(dirname(__FILE__)) . 'images/nochange.gif');?>" alt="NoChange" title="status"></td>
2424 + <td><?php echo esc_html__("No Change - No New Posts Created", 'aiomatic-automatic-ai-content-writer');?> - <b><?php echo esc_html__("Possible reasons:", 'aiomatic-automatic-ai-content-writer');?></b></td>
2425 + </tr>
2426 + <tr>
2427 + <td></td>
2428 + <td>
2429 + <ul>
2430 + <li>&#9658; <?php echo esc_html__("Please change rule settings, as your titles are all posted.", 'aiomatic-automatic-ai-content-writer');?></li>
2431 + </ul>
2432 + </td>
2433 + </tr>
2434 + </table>
2435 + </div>
2436 + </div>
2437 + </form>
2438 + </div>
2439 + <div id="running_status_ai"></div>
2440 + </div>
2441 + <?php if(!isset($aiomatic_Main_Settings['hide_videos']) || trim($aiomatic_Main_Settings['hide_videos']) != 'on'){
2442 + ?>
2443 + <div class="wrap">
2444 + <h3><?php echo esc_html__("YouTube Videos To Posts Tutorial Video", 'aiomatic-automatic-ai-content-writer');?></h3>
2445 + <div id="ai-video-container"><br/>
2446 + <iframe class="ai-video" width="560" height="315" src="https://www.youtube.com/embed/MWpu_ly5ZKE" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
2447 + </div>
2448 + </div>
2449 + <?php
2450 + }
2451 + }
2452 + if (isset($_POST['aiomatic_youtube_list'])) {
2453 + add_action('admin_init', 'aiomatic_save_rules_youtube');
2454 + }
2455 +
2456 + function aiomatic_save_rules_youtube($data2)
2457 + {
2458 + $init_rules_per_page = get_option('aiomatic_posts_per_page', 12);
2459 + $rules_per_page = get_option('aiomatic_posts_per_page', 12);
2460 + if(isset($_POST['posts_per_page']))
2461 + {
2462 + aiomatic_update_option('aiomatic_posts_per_page', $_POST['posts_per_page']);
2463 + }
2464 + check_admin_referer('aiomatic_save_rules', '_aiomaticr_nonce');
2465 +
2466 + $data2 = $_POST['aiomatic_youtube_list'];
2467 + $rules = get_option('aiomatic_youtube_list', array());
2468 + if(!is_array($rules))
2469 + {
2470 + $rules = array();
2471 + }
2472 + $initial_count = count($rules);
2473 + $add = false;
2474 + $scad = false;
2475 + if(isset($_GET["aiomatic_page"]) && is_numeric($_GET["aiomatic_page"]))
2476 + {
2477 + $curent_page = $_GET["aiomatic_page"];
2478 + }
2479 + else
2480 + {
2481 + $curent_page = 1;
2482 + }
2483 + $offset = ($curent_page - 1) * $rules_per_page;
2484 + $cat_cont = $offset;
2485 + $cont = 0;
2486 + if (isset($data2['url_list'][0])) {
2487 + for ($i = 0; $i < sizeof($data2['url_list']); ++$i)
2488 + {
2489 + $bundle = array();
2490 + if (isset($data2['schedule'][$i]) && $data2['schedule'][$i] != '' && $data2['url_list'][$i] != '') {
2491 + $bundle[] = trim(sanitize_text_field($data2['schedule'][$i]));
2492 + if (isset($data2['active'][$i])) {
2493 + $bundle[] = trim(sanitize_text_field($data2['active'][$i]));
2494 + } else {
2495 + $bundle[] = '0';
2496 + }
2497 + $bundle[] = trim(sanitize_text_field($data2['last_run'][$i]));
2498 + $bundle[] = trim(sanitize_text_field($data2['max'][$i]));
2499 + $bundle[] = trim(sanitize_text_field($data2['submit_status'][$i]));
2500 + $bundle[] = trim(sanitize_text_field($data2['default_type'][$i]));
2501 + $bundle[] = trim(sanitize_text_field($data2['post_author'][$i]));
2502 + $bundle[] = trim(sanitize_text_field($data2['default_tags'][$i]));
2503 + if($i == sizeof($data2['schedule']) - 1)
2504 + {
2505 + if(isset($data2['default_category']))
2506 + {
2507 + $bundle[] = $data2['default_category'];
2508 + }
2509 + else
2510 + {
2511 + if(!isset($data2['default_category' . $cat_cont]))
2512 + {
2513 + $cat_cont++;
2514 + }
2515 + if(!isset($data2['default_category' . $cat_cont]))
2516 + {
2517 + $bundle[] = array('aiomatic_no_category_12345678');
2518 + }
2519 + else
2520 + {
2521 + $bundle[] = $data2['default_category' . $cat_cont];
2522 + }
2523 + }
2524 + }
2525 + else
2526 + {
2527 + if(!isset($data2['default_category' . $cat_cont]))
2528 + {
2529 + $cat_cont++;
2530 + }
2531 + if(!isset($data2['default_category' . $cat_cont]))
2532 + {
2533 + $bundle[] = array('aiomatic_no_category_12345678');
2534 + }
2535 + else
2536 + {
2537 + $bundle[] = $data2['default_category' . $cat_cont];
2538 + }
2539 + }
2540 + $bundle[] = trim(sanitize_text_field($data2['auto_categories'][$i]));
2541 + $bundle[] = trim(sanitize_text_field($data2['auto_tags'][$i]));
2542 + $bundle[] = trim(sanitize_text_field($data2['enable_comments'][$i]));
2543 + $bundle[] = trim($data2['image_url'][$i]);
2544 + $bundle[] = $data2['url_list'][$i];
2545 + $bundle[] = trim(sanitize_text_field($data2['enable_pingback'][$i]));
2546 + $bundle[] = trim(sanitize_text_field($data2['post_format'][$i]));
2547 + $bundle[] = trim($data2['custom_fields'][$i]);
2548 + $bundle[] = trim($data2['custom_tax'][$i]);
2549 + $bundle[] = trim($data2['temperature'][$i]);
2550 + $bundle[] = trim($data2['top_p'][$i]);
2551 + $bundle[] = trim($data2['presence_penalty'][$i]);
2552 + $bundle[] = trim($data2['frequency_penalty'][$i]);
2553 + $bundle[] = trim($data2['royalty_free'][$i]);
2554 + $bundle[] = trim($data2['max_tokens'][$i]);
2555 + $bundle[] = trim($data2['max_seed_tokens'][$i]);
2556 + $bundle[] = trim($data2['max_continue_tokens'][$i]);
2557 + $bundle[] = trim($data2['post_prepend'][$i]);
2558 + $bundle[] = trim($data2['post_append'][$i]);
2559 + $bundle[] = trim($data2['enable_ai_images'][$i]);
2560 + $bundle[] = trim($data2['ai_command_image'][$i]);
2561 + $bundle[] = trim($data2['image_size'][$i]);
2562 + $bundle[] = trim($data2['wpml_lang'][$i]);
2563 + $bundle[] = trim($data2['remove_default'][$i]);
2564 + $bundle[] = trim($data2['strip_title'][$i]);
2565 + $bundle[] = trim($data2['title_once'][$i]);
2566 + $bundle[] = trim($data2['category_model'][$i]);
2567 + $bundle[] = trim($data2['category_ai_command'][$i]);
2568 + $bundle[] = trim($data2['tag_model'][$i]);
2569 + $bundle[] = trim($data2['tag_ai_command'][$i]);
2570 + $bundle[] = trim($data2['min_time'][$i]);
2571 + $bundle[] = trim($data2['max_time'][$i]);
2572 + $bundle[] = trim($data2['skip_spin'][$i]);
2573 + $bundle[] = trim($data2['skip_translate'][$i]);
2574 + $bundle[] = trim($data2['default_lang'][$i]);
2575 + $bundle[] = trim($data2['ai_titles'][$i]);
2576 + $bundle[] = trim($data2['post_sections_list'][$i]);
2577 + $bundle[] = trim($data2['content_language'][$i]);
2578 + $bundle[] = trim($data2['writing_style'][$i]);
2579 + $bundle[] = trim($data2['writing_tone'][$i]);
2580 + $bundle[] = trim($data2['title_prompt'][$i]);
2581 + $bundle[] = trim($data2['sections_prompt'][$i]);
2582 + $bundle[] = trim($data2['content_prompt'][$i]);
2583 + $bundle[] = trim($data2['excerpt_prompt'][$i]);
2584 + $bundle[] = trim($data2['section_count'][$i]);
2585 + $bundle[] = trim($data2['paragraph_count'][$i]);
2586 + $bundle[] = trim($data2['topic_title_model'][$i]);
2587 + $bundle[] = trim($data2['topic_sections_model'][$i]);
2588 + $bundle[] = trim($data2['topic_content_model'][$i]);
2589 + $bundle[] = trim($data2['topic_excerpt_model'][$i]);
2590 + $bundle[] = trim($data2['single_content_call'][$i]);
2591 + $bundle[] = trim($data2['intro_prompt'][$i]);
2592 + $bundle[] = trim($data2['topic_intro_model'][$i]);
2593 + $bundle[] = trim($data2['outro_prompt'][$i]);
2594 + $bundle[] = trim($data2['topic_outro_model'][$i]);
2595 + $bundle[] = trim($data2['topic_images'][$i]);
2596 + $bundle[] = trim($data2['sections_role'][$i]);
2597 + $bundle[] = trim($data2['topic_videos'][$i]);
2598 + $bundle[] = trim($data2['rule_description'][$i]);
2599 + $bundle[] = trim($data2['custom_shortcodes'][$i]);
2600 + $bundle[] = trim($data2['strip_by_regex'][$i]);
2601 + $bundle[] = trim($data2['replace_regex'][$i]);
2602 + $bundle[] = trim($data2['strip_by_regex_prompts'][$i]);
2603 + $bundle[] = trim($data2['replace_regex_prompts'][$i]);
2604 + $bundle[] = trim($data2['run_regex_on'][$i]);
2605 + $bundle[] = trim($data2['max_links'][$i]);
2606 + $bundle[] = trim($data2['link_post_types'][$i]);
2607 + $bundle[] = trim($data2['enable_toc'][$i]);
2608 + $bundle[] = trim($data2['title_toc'][$i]);
2609 + $bundle[] = trim($data2['qa_prompt'][$i]);
2610 + $bundle[] = trim($data2['topic_qa_model'][$i]);
2611 + $bundle[] = trim($data2['enable_qa'][$i]);
2612 + $bundle[] = trim($data2['title_qa'][$i]);
2613 + $bundle[] = trim($data2['title_outro'][$i]);
2614 + $bundle[] = trim($data2['link_type'][$i]);
2615 + $bundle[] = trim($data2['link_list'][$i]);
2616 + $bundle[] = trim($data2['skip_inexist'][$i]);
2617 + $bundle[] = trim($data2['max_caption'][$i]);
2618 + $bundle[] = trim($data2['global_prepend'][$i]);
2619 + $bundle[] = trim($data2['global_append'][$i]);
2620 + $bundle[] = trim($data2['search_query_repetition'][$i]);
2621 + $bundle[] = trim($data2['img_all_headings'][$i]);
2622 + $bundle[] = trim($data2['heading_img_location'][$i]);
2623 + $bundle[] = trim($data2['days_no_run'][$i]);
2624 + $bundle[] = trim($data2['no_random'][$i]);
2625 + $bundle[] = trim($data2['overwrite_existing'][$i]);
2626 + $bundle[] = trim($data2['link_nofollow'][$i]);
2627 + $bundle[] = trim($data2['parent_id'][$i]);
2628 + $bundle[] = trim($data2['rule_unique_id'][$i]);
2629 + $bundle[] = trim($data2['image_model'][$i]);
2630 + $bundle[] = isset($data2['assistant_id'][$i]) ? trim($data2['assistant_id'][$i]) : '';
2631 + $rules[$offset + $cont] = $bundle;
2632 + $cont++;
2633 + $cat_cont++;
2634 + }
2635 + }
2636 + while($cont < $init_rules_per_page)
2637 + {
2638 + if(isset($rules[$offset + $cont]))
2639 + {
2640 + $rules[$offset + $cont] = false;
2641 + }
2642 + $cont = $cont + 1;
2643 + $cat_cont++;
2644 + }
2645 + $rules = array_values(array_filter($rules));
2646 + }
2647 + $final_count = count($rules);
2648 + if($final_count > $initial_count)
2649 + {
2650 + $add = true;
2651 + }
2652 + elseif($final_count < $initial_count)
2653 + {
2654 + $scad = true;
2655 + }
2656 + aiomatic_update_option('aiomatic_youtube_list', $rules, false);
2657 + if(count($rules) % $rules_per_page === 1 && $add === true)
2658 + {
2659 + $rules_count = count($rules);
2660 + $max_pages = ceil($rules_count/$rules_per_page);
2661 + if($max_pages == 0)
2662 + {
2663 + $max_pages = 1;
2664 + }
2665 + $last_url = (aiomatic_isSecure() ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
2666 + if(stristr($last_url, 'aiomatic_page=') === false)
2667 + {
2668 + if(stristr($last_url, '?') === false)
2669 + {
2670 + $last_url .= '?aiomatic_page=' . $max_pages;
2671 + }
2672 + else
2673 + {
2674 + $last_url .= '&aiomatic_page=' . $max_pages;
2675 + }
2676 + }
2677 + else
2678 + {
2679 + if(isset($_GET['aiomatic_page']))
2680 + {
2681 + $curent_page = $_GET["aiomatic_page"];
2682 + }
2683 + else
2684 + {
2685 + $curent_page = '';
2686 + }
2687 + if(is_numeric($curent_page))
2688 + {
2689 + $last_url = str_replace('aiomatic_page=' . $curent_page, 'aiomatic_page=' . $max_pages, $last_url);
2690 + }
2691 + else
2692 + {
2693 + if(stristr($last_url, '?') === false)
2694 + {
2695 + $last_url .= '?aiomatic_page=' . $max_pages;
2696 + }
2697 + else
2698 + {
2699 + $last_url .= '&aiomatic_page=' . $max_pages;
2700 + }
2701 + }
2702 + }
2703 + aiomatic_redirect($last_url);
2704 + }
2705 + elseif(count($rules) != 0 && count($rules) % $rules_per_page === 0 && $scad === true)
2706 + {
2707 + $rules_count = count($rules);
2708 + $max_pages = ceil($rules_count/$rules_per_page);
2709 + if($max_pages == 0)
2710 + {
2711 + $max_pages = 1;
2712 + }
2713 + $last_url = (aiomatic_isSecure() ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
2714 + if(stristr($last_url, 'aiomatic_page=') === false)
2715 + {
2716 + if(stristr($last_url, '?') === false)
2717 + {
2718 + $last_url .= '?aiomatic_page=' . $max_pages;
2719 + }
2720 + else
2721 + {
2722 + $last_url .= '&aiomatic_page=' . $max_pages;
2723 + }
2724 + }
2725 + else
2726 + {
2727 + if(isset($_GET['aiomatic_page']))
2728 + {
2729 + $curent_page = $_GET["aiomatic_page"];
2730 + }
2731 + else
2732 + {
2733 + $curent_page = '';
2734 + }
2735 + if(is_numeric($curent_page))
2736 + {
2737 + $last_url = str_replace('aiomatic_page=' . $curent_page, 'aiomatic_page=' . $max_pages, $last_url);
2738 + }
2739 + else
2740 + {
2741 + if(stristr($last_url, '?') === false)
2742 + {
2743 + $last_url .= '?aiomatic_page=' . $max_pages;
2744 + }
2745 + else
2746 + {
2747 + $last_url .= '&aiomatic_page=' . $max_pages;
2748 + }
2749 + }
2750 + }
2751 + aiomatic_redirect($last_url);
2752 + }
2753 + }
2754 + function aiomatic_expand_rules_youtube()
2755 + {
2756 + $all_models = aiomatic_get_all_models(true);
2757 + $all_assistants = aiomatic_get_all_assistants(true);
2758 + if (!get_option('aiomatic_running_list')) {
2759 + $running = array();
2760 + } else {
2761 + $running = get_option('aiomatic_running_list');
2762 + }
2763 + $GLOBALS['wp_object_cache']->delete('aiomatic_youtube_list', 'options');
2764 + $rules = get_option('aiomatic_youtube_list');
2765 + if(!is_array($rules))
2766 + {
2767 + $rules = array();
2768 + }
2769 + $output = '';
2770 + $cont = 0;
2771 + if (!empty($rules)) {
2772 + $cat_args = array(
2773 + "orderby" => "name",
2774 + "hide_empty" => 0,
2775 + "order" => "ASC"
2776 + );
2777 + $cats_arr = [];
2778 + global $wpdb;
2779 + $post_statuses = array(
2780 + 'publish',
2781 + 'draft',
2782 + 'pending',
2783 + 'trash',
2784 + 'private',
2785 + 'future'
2786 + );
2787 + $post_statuses_in = "'" . implode("','", $post_statuses) . "'";
2788 + $sql = "
2789 + SELECT pm.meta_value AS rule_id, COUNT(*) AS rule_count
2790 + FROM {$wpdb->posts} p
2791 + INNER JOIN {$wpdb->postmeta} pm ON (p.ID = pm.post_id)
2792 + WHERE p.post_status IN ($post_statuses_in)
2793 + AND pm.meta_key = 'aiomatic_parent_rule'
2794 + GROUP BY pm.meta_value
2795 + ";
2796 + $results = $wpdb->get_results($sql);
2797 + $counted_vals = array();
2798 + if ( ! empty($results) ) {
2799 + foreach ($results as $row) {
2800 + $ruleKey = (string)$row->rule_id;
2801 + if (strpos($ruleKey, '-') !== false) {
2802 + $exp = explode('-', $ruleKey);
2803 + if (isset($exp[0]) && isset($exp[1]) && $exp[0] === '0') {
2804 + $ruleKey = $exp[1];
2805 + }
2806 + }
2807 + $counted_vals[$ruleKey] = $row->rule_count;
2808 + }
2809 + }
2810 + if(isset($_GET["aiomatic_page"]) && is_numeric($_GET["aiomatic_page"]))
2811 + {
2812 + $curent_page = $_GET["aiomatic_page"];
2813 + }
2814 + else
2815 + {
2816 + $curent_page = 1;
2817 + }
2818 + $unlocker = get_option('aiomatic_minute_running_unlocked', false);
2819 + $rules_per_page = get_option('aiomatic_posts_per_page', 12);
2820 + foreach ($rules as $request => $bundle[]) {
2821 + if(($cont < ($curent_page - 1) * $rules_per_page) || ($cont >= $curent_page * $rules_per_page))
2822 + {
2823 + $cont++;
2824 + continue;
2825 + }
2826 + $bundle_values = array_values($bundle);
2827 + $myValues = $bundle_values[$cont];
2828 + $array_my_values = array_values($myValues);for($iji=0;$iji<count($array_my_values);++$iji){if(is_string($array_my_values[$iji])){$array_my_values[$iji]=stripslashes($array_my_values[$iji]);}}
2829 + $schedule = $array_my_values[0];
2830 + $active = $array_my_values[1];
2831 + $last_run = $array_my_values[2];
2832 + $max = $array_my_values[3];
2833 + $status = $array_my_values[4];
2834 + $def_type = $array_my_values[5];
2835 + $post_user_name = $array_my_values[6];
2836 + $default_tags = $array_my_values[7];
2837 + $default_category = $array_my_values[8];
2838 + $auto_categories = $array_my_values[9];
2839 + $auto_tags = $array_my_values[10];
2840 + $enable_comments = $array_my_values[11];
2841 + $image_url = $array_my_values[12];
2842 + $url_list = $array_my_values[13];
2843 + $enable_pingback = $array_my_values[14];
2844 + $post_format = $array_my_values[15];
2845 + $custom_fields = $array_my_values[16];
2846 + $custom_tax = $array_my_values[17];
2847 + $temperature = $array_my_values[18];
2848 + $top_p = $array_my_values[19];
2849 + $presence_penalty = $array_my_values[20];
2850 + $frequency_penalty = $array_my_values[21];
2851 + $royalty_free = $array_my_values[22];
2852 + $max_tokens = $array_my_values[23];
2853 + $max_seed_tokens = $array_my_values[24];
2854 + $max_continue_tokens = $array_my_values[25];
2855 + $post_prepend = $array_my_values[26];
2856 + $post_append = $array_my_values[27];
2857 + $enable_ai_images = $array_my_values[28];
2858 + $ai_command_image = $array_my_values[29];
2859 + $image_size = $array_my_values[30];
2860 + $wpml_lang = $array_my_values[31];
2861 + $remove_default = $array_my_values[32];
2862 + $strip_title = $array_my_values[33];
2863 + $title_once = $array_my_values[34];
2864 + $category_model = $array_my_values[35];
2865 + $category_ai_command = $array_my_values[36];
2866 + $tag_model = $array_my_values[37];
2867 + $tag_ai_command = $array_my_values[38];
2868 + $min_time = $array_my_values[39];
2869 + $max_time = $array_my_values[40];
2870 + $skip_spin = $array_my_values[41];
2871 + $skip_translate = $array_my_values[42];
2872 + $default_lang = $array_my_values[43];
2873 + $ai_titles = $array_my_values[44];
2874 + $post_sections_list = $array_my_values[45];
2875 + $content_language = $array_my_values[46];
2876 + $writing_style = $array_my_values[47];
2877 + $writing_tone = $array_my_values[48];
2878 + $title_prompt = $array_my_values[49];
2879 + $sections_prompt = $array_my_values[50];
2880 + $content_prompt = $array_my_values[51];
2881 + $excerpt_prompt = $array_my_values[52];
2882 + $section_count = $array_my_values[53];
2883 + $paragraph_count = $array_my_values[54];
2884 + $topic_title_model = $array_my_values[55];
2885 + $topic_sections_model = $array_my_values[56];
2886 + $topic_content_model = $array_my_values[57];
2887 + $topic_excerpt_model = $array_my_values[58];
2888 + $single_content_call = $array_my_values[59];
2889 + $intro_prompt = $array_my_values[60];
2890 + $topic_intro_model = $array_my_values[61];
2891 + $outro_prompt = $array_my_values[62];
2892 + $topic_outro_model = $array_my_values[63];
2893 + $topic_images = $array_my_values[64];
2894 + $sections_role = $array_my_values[65];
2895 + $topic_videos = $array_my_values[66];
2896 + $rule_description = $array_my_values[67];
2897 + $custom_shortcodes = $array_my_values[68];
2898 + $strip_by_regex = $array_my_values[69];
2899 + $replace_regex = $array_my_values[70];
2900 + $strip_by_regex_prompts = $array_my_values[71];
2901 + $replace_regex_prompts = $array_my_values[72];
2902 + $run_regex_on = $array_my_values[73];
2903 + $max_links = $array_my_values[74];
2904 + $link_post_types = $array_my_values[75];
2905 + $enable_toc = $array_my_values[76];
2906 + $title_toc = $array_my_values[77];
2907 + $qa_prompt = $array_my_values[78];
2908 + $topic_qa_model = $array_my_values[79];
2909 + $enable_qa = $array_my_values[80];
2910 + $title_qa = $array_my_values[81];
2911 + $title_outro = $array_my_values[82];
2912 + $link_type = $array_my_values[83];
2913 + $link_list = $array_my_values[84];
2914 + $skip_inexist = $array_my_values[85];
2915 + $max_caption = $array_my_values[86];
2916 + $global_prepend = $array_my_values[87];
2917 + $global_append = $array_my_values[88];
2918 + $search_query_repetition= $array_my_values[89];
2919 + $img_all_headings = $array_my_values[90];
2920 + $heading_img_location = $array_my_values[91];
2921 + $days_no_run = $array_my_values[92];
2922 + $no_random = $array_my_values[93];
2923 + $overwrite_existing = $array_my_values[94];
2924 + $link_nofollow = $array_my_values[95];
2925 + $parent_id = $array_my_values[96];
2926 + $rule_unique_id = $array_my_values[97];
2927 + $image_model = $array_my_values[98];
2928 + $assistant_id = $array_my_values[99];
2929 + if(empty($rule_unique_id))
2930 + {
2931 + $rule_unique_id = $cont;
2932 + }
2933 + if (isset($counted_vals[$rule_unique_id])) {
2934 + $generated_posts = $counted_vals[$rule_unique_id];
2935 + } else {
2936 + $generated_posts = 0;
2937 + }
2938 + if($rule_description == '')
2939 + {
2940 + $rule_description = $cont;
2941 + }
2942 + $name = md5(get_bloginfo());
2943 + wp_add_inline_script($name . '-footer-script', 'createAdmin(' . esc_html($cont) . ');createModeSelect(' . esc_html($cont) . ');hideLinks(' . esc_html($cont) . ');', 'after');
2944 + $output .= '<tr>
2945 + <td class="cr_short_td"><input type="text" name="aiomatic_youtube_list[rule_description][]" id="rule_description' . esc_html($cont) . '" class="cr_center" placeholder="Rule ID" value="' . esc_html($rule_description) . '" class="cr_width_full"/></td>
2946 + <td class="cr_loi"><textarea rows="1" name="aiomatic_youtube_list[url_list][]" placeholder="https://www.youtube.com/watch?v=..." class="cr_width_full">' . htmlspecialchars($url_list) . '</textarea></td>
2947 + <td class="cr_comm_td"><input type="number" step="1" min="1" placeholder="# h" name="aiomatic_youtube_list[schedule][]" max="8765812" value="' . esc_attr($schedule) . '" class="cr_width_60" required></td>
2948 + <td class="cr_comm_td"><input type="number" step="1" min="0" placeholder="#" name="aiomatic_youtube_list[max][]" value="' . esc_attr($max) . '" class="cr_width_60" required></td>
2949 + <td class="cr_width_70 cr_center">
2950 + <input type="button" id="mybtnfzr' . esc_html($cont) . '" value="Settings">
2951 + <div id="mymodalfzr' . esc_html($cont) . '" class="codemodalfzr">
2952 + <div class="codemodalfzr-content">
2953 + <div class="codemodalfzr-header">
2954 + <span id="aiomatic_close' . esc_html($cont) . '" class="codeclosefzr">&times;</span>
2955 + <h2>' . esc_html__('Rule', 'aiomatic-automatic-ai-content-writer') . ' <span class="cr_color_white">ID ' . esc_html($cont) . '</span> ' . esc_html__('Advanced Settings', 'aiomatic-automatic-ai-content-writer') . '</h2>
2956 + </div>
2957 + <div class="codemodalfzr-body">
2958 + <div class="table-responsive">
2959 + <table class="responsive table cr_main_table_nowr"><tr><td colspan="2"><h3>' . esc_html__("AI Assistant Options", 'aiomatic-automatic-ai-content-writer') . ':</h3>
2960 + </td></tr><tr>
2961 + <td class="cr_min_width_200">
2962 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2963 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the AI Assistant to use for content creation. This will disable the ability to select AI models, as the models assisgned to the assistant will be used for content creation.", 'aiomatic-automatic-ai-content-writer') . '</div>
2964 + </div>
2965 + <b>' . esc_html__("AI Assistant Name:", 'aiomatic-automatic-ai-content-writer') . '</b>
2966 + </td>
2967 + <td><select id="assistant_id' . esc_html($cont) . '" name="aiomatic_youtube_list[assistant_id][]" class="cr_width_full" onchange="assistantSelected(\'' . esc_html($cont) . '\');">';
2968 + if($all_assistants === false)
2969 + {
2970 + $output .= '<option val="" selected disabled>' . esc_html__("Only OpenAI API is supported for Assistants API", 'aiomatic-automatic-ai-content-writer') . '</option>';
2971 + }
2972 + else
2973 + {
2974 + if(count($all_assistants) == 0)
2975 + {
2976 + $output .= '<option val="" selected disabled>' . esc_html__("No Assistans added, go to the plugin's 'AI Assistans' menu to add new assistants!", 'aiomatic-automatic-ai-content-writer') . '</option>';
2977 + }
2978 + else
2979 + {
2980 + $output .= '<option value=""';
2981 + if($assistant_id == ''){$output .= ' selected';}
2982 + $output .= '>' . esc_html__("Don't use assistants, use AI models instead", 'aiomatic-automatic-ai-content-writer') . '</option>';
2983 + foreach($all_assistants as $myassistant)
2984 + {
2985 + $output .= '<option value="' . esc_html($myassistant->ID) .'"';
2986 + if($assistant_id == $myassistant->ID){$output .= ' selected';}
2987 + $output .= '>' . esc_html($myassistant->post_title);
2988 + $output .= '</option>';
2989 + }
2990 + }
2991 + }
2992 + $output .= '</select>
2993 + </td>
2994 + </tr>
2995 + <tr><td colspan="2"><h3>' . esc_html__('YouTube Video Options', 'aiomatic-automatic-ai-content-writer') . ':</h3></td></tr><tr><td>
2996 + <div>
2997 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2998 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Input a comma separated list of video captions prefered languages to use for the %%video_caption%% shortcode. Please use a comma separated list of 2 character language codes. Ex: en,es,hu,br. The plugin will use the fisrt language in the list that matches. If you leave this field blank, the default language caption will be imported for each video.", 'aiomatic-automatic-ai-content-writer') . '
2999 + </div>
3000 + </div>
3001 + <b>' . esc_html__("Video Caption Preferred Languages", 'aiomatic-automatic-ai-content-writer') . ':</b>
3002 + </td><td>
3003 + <input type="text" name="aiomatic_youtube_list[default_lang][]" value="' . esc_attr($default_lang) . '" placeholder="Please insert a language list for video captions" class="cr_width_full">
3004 +
3005 + </div>
3006 + </td></tr><tr><td>
3007 + <div>
3008 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3009 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the maximum length of captions in prompts. This is useful to have, when captions can be very long.", 'aiomatic-automatic-ai-content-writer') . '
3010 + </div>
3011 + </div>
3012 + <b>' . esc_html__("Video Caption Maximum Character Length In Prompts", 'aiomatic-automatic-ai-content-writer') . ':</b>
3013 + </td><td>
3014 + <input type="number" min="0" name="aiomatic_youtube_list[max_caption][]" value="' . esc_attr($max_caption) . '" placeholder="Caption maximum length" class="cr_width_full">
3015 +
3016 + </div>
3017 + </td></tr>
3018 + <tr><td colspan="2"><h3>' . esc_html__('Posting Options', 'aiomatic-automatic-ai-content-writer') . ':</h3></td></tr>
3019 + <tr><td>
3020 + <div>
3021 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3022 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select if you want to use AI generated titles for the posts created by the plugin. If not, the YouTube video title will be used.", 'aiomatic-automatic-ai-content-writer') . '
3023 + </div>
3024 + </div>
3025 + <b>' . esc_html__("Use AI Generated Post Titles", 'aiomatic-automatic-ai-content-writer') . ':</b>
3026 +
3027 + </td><td>
3028 + <input type="checkbox" id="ai_titles' . esc_html($cont) . '" name="aiomatic_youtube_list[ai_titles][]"';
3029 + if($ai_titles == '1')
3030 + {
3031 + $output .= ' checked';
3032 + }
3033 + $output .= '>
3034 +
3035 + </div>
3036 + </td></tr>
3037 + <tr><td class="cr_min_width_200">
3038 + <div>
3039 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3040 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Enter a list of post sections, one per line. These will be headings of the content. These can also be automatically generated by the plugin. To enable auto generating of sections, leave this field blank. This will set the value of the %%sections%% shortcode, which can be used in prompts below. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators. If you set a section list here, each created article will have this same list of sections, because of this, use shortcodes or Spintax when defining these static topics or leave this field blank for the plugin to auto generate them!", 'aiomatic-automatic-ai-content-writer') . '
3041 + </div>
3042 + </div>
3043 + <b>' . esc_html__("Post Sections List (Optional)", 'aiomatic-automatic-ai-content-writer') . ':</b>
3044 +
3045 + </td><td>
3046 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[post_sections_list][]" placeholder="Post sections list (one per line)" class="cr_width_full">' . esc_textarea($post_sections_list) . '</textarea>
3047 +
3048 + </div>
3049 + </td></tr>
3050 + <tr><td class="cr_min_width_200">
3051 + <div>
3052 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3053 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Enter the number of sections to create in the article. These will also be set as article headings. You can also set value ranges, example: 5-7. In this case, a random number will be selected in this range. Please use only numeric values in this field. This field will set the value of the %%sections_count%% shortcode.", 'aiomatic-automatic-ai-content-writer') . '
3054 + </div>
3055 + </div>
3056 + <b>' . esc_html__("Number Of Content Sections To Generate", 'aiomatic-automatic-ai-content-writer') . ':</b>
3057 +
3058 + </td><td>
3059 + <input type="text" id="section_count' . esc_html($cont) . '" name="aiomatic_youtube_list[section_count][]" placeholder="3-4" class="cr_width_full" value="' . esc_attr($section_count) . '">
3060 + </div>
3061 + </td></tr>
3062 + <tr><td>
3063 + <div>
3064 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3065 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select what you want to do with sections in articles.", 'aiomatic-automatic-ai-content-writer') . '
3066 + </div>
3067 + </div>
3068 + <b>' . esc_html__("Add Sections To Content As", 'aiomatic-automatic-ai-content-writer') . ':</b>
3069 +
3070 + </td><td>
3071 + <select autocomplete="off" class="cr_width_full" id="sections_role' . esc_html($cont) . '" name="aiomatic_youtube_list[sections_role][]">
3072 + <option value="h2"';
3073 + if ($sections_role == 'h2') {
3074 + $output .= ' selected';
3075 + }
3076 + $output .= '>' . esc_html__("h2", 'aiomatic-automatic-ai-content-writer') . '</option>
3077 + <option value="h3"';
3078 + if ($sections_role == 'h3') {
3079 + $output .= ' selected';
3080 + }
3081 + $output .= '>' . esc_html__("h3", 'aiomatic-automatic-ai-content-writer') . '</option>
3082 + <option value="b"';
3083 + if ($sections_role == 'b') {
3084 + $output .= ' selected';
3085 + }
3086 + $output .= '>' . esc_html__("Bold", 'aiomatic-automatic-ai-content-writer') . '</option>
3087 + <option value="i"';
3088 + if ($sections_role == 'i') {
3089 + $output .= ' selected';
3090 + }
3091 + $output .= '>' . esc_html__("Italic", 'aiomatic-automatic-ai-content-writer') . '</option>
3092 + <option value="bi"';
3093 + if ($sections_role == 'bi') {
3094 + $output .= ' selected';
3095 + }
3096 + $output .= '>' . esc_html__("Bold and Italic", 'aiomatic-automatic-ai-content-writer') . '</option>
3097 + <option value="p"';
3098 + if ($sections_role == 'p') {
3099 + $output .= ' selected';
3100 + }
3101 + $output .= '>' . esc_html__("Paragraph", 'aiomatic-automatic-ai-content-writer') . '</option>
3102 + <option value="x"';
3103 + if ($sections_role == 'x') {
3104 + $output .= ' selected';
3105 + }
3106 + $output .= '>' . esc_html__("Plain Text", 'aiomatic-automatic-ai-content-writer') . '</option>
3107 + <option value="no"';
3108 + if ($sections_role == 'no') {
3109 + $output .= ' selected';
3110 + }
3111 + $output .= '>' . esc_html__("Don't Add Sections", 'aiomatic-automatic-ai-content-writer') . '</option>
3112 + </select>
3113 + </div>
3114 + </td></tr>
3115 + <tr><td class="cr_min_width_200">
3116 + <div>
3117 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3118 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Enter the number of paragraphs to create for each section. These will also be set as article headings. You can also set value ranges, example: 5-7. In this case, a random number will be selected in this range. Please use only numeric values in this field. This field will set the value of the %%paragraphs_per_section%% shortcode.", 'aiomatic-automatic-ai-content-writer') . '
3119 + </div>
3120 + </div>
3121 + <b>' . esc_html__("Number Of Paragraphs Per Section", 'aiomatic-automatic-ai-content-writer') . ':</b>
3122 +
3123 + </td><td>
3124 + <input type="text" id="paragraph_count' . esc_html($cont) . '" name="aiomatic_youtube_list[paragraph_count][]" placeholder="2-3" class="cr_width_full" value="' . esc_attr($paragraph_count) . '">
3125 + </div>
3126 + </td></tr>
3127 + <tr><td class="cr_min_width_200">
3128 + <div>
3129 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3130 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the number of related images to add to the created post content. This feature will use the royalty free image sources configured in the plugin's 'Settings' menu or if you have access to the DallE API. You can change image source in the 'AI Image Source' settings field from below. The maximum number of images you can add to each article: number of sections + 2", 'aiomatic-automatic-ai-content-writer') . '
3131 + </div>
3132 + </div>
3133 + <b>' . esc_html__("Number of Images To Add To The Article", 'aiomatic-automatic-ai-content-writer') . ':</b>
3134 + </td><td>
3135 + <input type="text" name="aiomatic_youtube_list[topic_images][]" value="' . esc_attr($topic_images) . '" placeholder="Number of images" class="cr_width_full">
3136 +
3137 + </div>
3138 + </td></tr>
3139 + <tr><td>
3140 + <div>
3141 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3142 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select if you want to add an image to each of the creating headings from the article.", 'aiomatic-automatic-ai-content-writer') . '
3143 + </div>
3144 + </div>
3145 + <b>' . esc_html__("Add An Image To Each Heading Of The Article", 'aiomatic-automatic-ai-content-writer') . ':</b>
3146 +
3147 + </td><td>
3148 + <input type="checkbox" id="img_all_headings' . esc_html($cont) . '" name="aiomatic_youtube_list[img_all_headings][]"';
3149 + if($img_all_headings == '1')
3150 + {
3151 + $output .= ' checked';
3152 + }
3153 + $output .= '>
3154 +
3155 + </div>
3156 + </td></tr><tr><td>
3157 + <div>
3158 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3159 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the location of the heading images.", 'aiomatic-automatic-ai-content-writer') . '
3160 + </div>
3161 + </div>
3162 + <b>' . esc_html__("Heading Image Location", 'aiomatic-automatic-ai-content-writer') . ':</b>
3163 + </td><td class="cr_min_width_200">
3164 + <select autocomplete="off" id="heading_img_location' . esc_html($cont) . '" name="aiomatic_youtube_list[heading_img_location][]" class="cr_width_full">
3165 + <option value="top"';
3166 + if ($heading_img_location == 'top') {
3167 + $output .= ' selected';
3168 + }
3169 + $output .= '>' . esc_html__("Top of the section", 'aiomatic-automatic-ai-content-writer') . '</option>
3170 + <option value="heading"';
3171 + if ($heading_img_location == 'heading') {
3172 + $output .= ' selected';
3173 + }
3174 + $output .= '>' . esc_html__("Under the heading text", 'aiomatic-automatic-ai-content-writer') . '</option>
3175 + <option value="bottom"';
3176 + if ($heading_img_location == 'bottom') {
3177 + $output .= ' selected';
3178 + }
3179 + $output .= '>' . esc_html__("Bottom of the section", 'aiomatic-automatic-ai-content-writer') . '</option>
3180 + <option value="random"';
3181 + if ($heading_img_location == 'random') {
3182 + $output .= ' selected';
3183 + }
3184 + $output .= '>' . esc_html__("Random", 'aiomatic-automatic-ai-content-writer') . '</option>
3185 + </select>
3186 + </div>
3187 + </td></tr>
3188 + <tr><td class="cr_min_width_200">
3189 + <div>
3190 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3191 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select if you would like to add the source YouTube video to the end of the created article.", 'aiomatic-automatic-ai-content-writer') . '
3192 + </div>
3193 + </div>
3194 + <b>' . esc_html__("Add The YouTube Video To The Article", 'aiomatic-automatic-ai-content-writer') . ':</b>
3195 + </td><td>
3196 + <input type="checkbox" id="topic_videos' . esc_html($cont) . '" name="aiomatic_youtube_list[topic_videos][]"';
3197 + if($topic_videos == '1')
3198 + {
3199 + $output .= ' checked';
3200 + }
3201 + $output .= '>
3202 + </div>
3203 + </td></tr>
3204 + <tr><td>
3205 + <div>
3206 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3207 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the header text of the outro section header. This is optional.", 'aiomatic-automatic-ai-content-writer') . '
3208 + </div>
3209 + </div>
3210 + <b>' . esc_html__("Article Outro Section Header Text", 'aiomatic-automatic-ai-content-writer') . ':</b>
3211 +
3212 + </td><td>
3213 + <input id="title_outro' . esc_html($cont) . '" name="aiomatic_youtube_list[title_outro][]" type="text" placeholder="Optional" class="coderevolution_gutenberg_input" value="' . esc_attr($title_outro) . '"/>
3214 + </div>
3215 + </td></tr>
3216 + <tr><td class="hideTOC' . esc_html($cont) . '">
3217 + <div>
3218 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3219 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select if you want to add a Table of Contents section to the created post.", 'aiomatic-automatic-ai-content-writer') . '
3220 + </div>
3221 + </div>
3222 + <b>' . esc_html__("Add Article Table Of Contents Section", 'aiomatic-automatic-ai-content-writer') . ':</b>
3223 +
3224 + </td><td class="hideTOC' . esc_html($cont) . '">
3225 + <input type="checkbox" id="enable_toc' . esc_html($cont) . '" name="aiomatic_youtube_list[enable_toc][]"';
3226 + if($enable_toc == '1')
3227 + {
3228 + $output .= ' checked';
3229 + }
3230 + $output .= '>
3231 +
3232 + </div>
3233 + </td></tr>
3234 + <tr><td class="hideTOC' . esc_html($cont) . '">
3235 + <div>
3236 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3237 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the text of the Table of Contents section header. Default is: Table of Contents", 'aiomatic-automatic-ai-content-writer') . '
3238 + </div>
3239 + </div>
3240 + <b>' . esc_html__("Article Table Of Contents Section Header Text", 'aiomatic-automatic-ai-content-writer') . ':</b>
3241 +
3242 + </td><td class="hideTOC' . esc_html($cont) . '">
3243 + <input id="title_toc' . esc_html($cont) . '" name="aiomatic_youtube_list[title_toc][]" type="text" placeholder="Table of Contents" class="coderevolution_gutenberg_input" value="' . esc_attr($title_toc) . '"/>
3244 + </div>
3245 + </td></tr>
3246 + <tr><td>
3247 + <div>
3248 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3249 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select if you want to add a Q&A section to the created post. To enable Q&A for articles, be sure to add a prompt also in the 'Article Q&A Prompt' settings field from below.", 'aiomatic-automatic-ai-content-writer') . '
3250 + </div>
3251 + </div>
3252 + <b>' . esc_html__("Add Article Q&A Section", 'aiomatic-automatic-ai-content-writer') . ':</b>
3253 +
3254 + </td><td>
3255 + <input type="checkbox" id="enable_qa' . esc_html($cont) . '" name="aiomatic_youtube_list[enable_qa][]"';
3256 + if($enable_qa == '1')
3257 + {
3258 + $output .= ' checked';
3259 + }
3260 + $output .= '>
3261 +
3262 + </div>
3263 + </td></tr>
3264 + <tr><td>
3265 + <div>
3266 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3267 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the header text of the Q&A section header. Default is: Q&A", 'aiomatic-automatic-ai-content-writer') . '
3268 + </div>
3269 + </div>
3270 + <b>' . esc_html__("Article Q&A Section Header Text", 'aiomatic-automatic-ai-content-writer') . ':</b>
3271 +
3272 + </td><td>
3273 + <input id="title_qa' . esc_html($cont) . '" name="aiomatic_youtube_list[title_qa][]" type="text" placeholder="Q&A" class="coderevolution_gutenberg_input" value="' . esc_attr($title_qa) . '"/>
3274 + </div>
3275 + </td></tr>
3276 + <tr><td colspan="2"><h4>' . esc_html__('Content Parameters', 'aiomatic-automatic-ai-content-writer') . ':</h4></td></tr>
3277 + <tr><td class="cr_min_width_200">
3278 + <div>
3279 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3280 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the language of the created content. This will set the value of the %%language%% shortcode, which can be used in prompts below. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '
3281 + </div>
3282 + </div>
3283 + <b>' . esc_html__("Content Language", 'aiomatic-automatic-ai-content-writer') . ':</b>
3284 +
3285 + </td><td>
3286 + <input id="content_language' . esc_html($cont) . '" name="aiomatic_youtube_list[content_language][]" type="text" list="languages" placeholder="Created content language" class="coderevolution_gutenberg_input" value="' . esc_attr($content_language) . '"/>
3287 + </div>
3288 + </td></tr>
3289 + <tr><td class="cr_min_width_200">
3290 + <div>
3291 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3292 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the writing style of the created content. This will set the value of the %%writing_style%% shortcode, which can be used in prompts below. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '
3293 + </div>
3294 + </div>
3295 + <b>' . esc_html__("Writing Style", 'aiomatic-automatic-ai-content-writer') . ':</b>
3296 +
3297 + </td><td>
3298 + <input id="writing_style' . esc_html($cont) . '" name="aiomatic_youtube_list[writing_style][]" type="text" list="writing_styles" placeholder="Created content writing style" class="coderevolution_gutenberg_input" value="' . esc_attr($writing_style) . '"/>
3299 + </div>
3300 + </td></tr>
3301 + <tr><td class="cr_min_width_200">
3302 + <div>
3303 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3304 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the writing tone of the created content. This will set the value of the %%writing_tone%% shortcode, which can be used in prompts below. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '
3305 + </div>
3306 + </div>
3307 + <b>' . esc_html__("Writing Tone", 'aiomatic-automatic-ai-content-writer') . ':</b>
3308 +
3309 + </td><td>
3310 + <input id="writing_tone' . esc_html($cont) . '" name="aiomatic_youtube_list[writing_tone][]" type="text" list="writing_tones" placeholder="Created content writing tone" class="coderevolution_gutenberg_input" value="' . esc_attr($writing_tone) . '"/>
3311 + </div>
3312 + </td></tr>
3313 + <tr><td colspan="2"><h4>' . esc_html__('Prompts', 'aiomatic-automatic-ai-content-writer') . ':</h4></td></tr>
3314 + <tr><td class="cr_min_width_200">
3315 + <div>
3316 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3317 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Prompt to be used for the Post Title. You can use the following shortcodes: %%video_title%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%% - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '
3318 + </div>
3319 + </div>
3320 + <b>' . esc_html__("Title Prompt", 'aiomatic-automatic-ai-content-writer') . ':</b>
3321 +
3322 + </td><td>
3323 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[title_prompt][]" placeholder="Enter your title prompts, one per line" class="cr_width_full">' . esc_textarea($title_prompt) . '</textarea>
3324 +
3325 + </div>
3326 + </td></tr>
3327 + <tr><td>
3328 + <div>
3329 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3330 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the AI Model to be used for the title generator.", 'aiomatic-automatic-ai-content-writer') . '
3331 + </div>
3332 + </div>
3333 + <b>' . esc_html__("AI Model For Title Generator", 'aiomatic-automatic-ai-content-writer') . ':</b>
3334 + </td><td class="cr_min_width_200">
3335 + <select autocomplete="off" name="aiomatic_youtube_list[topic_title_model][]" class="hideAssistant' . esc_html($cont) . ' cr_width_full">';
3336 + if(empty($topic_title_model))
3337 + {
3338 + $topic_title_model = AIMOGEN_DEFAULT_MODEL;
3339 + }
3340 + foreach($all_models as $modelx)
3341 + {
3342 + $output .= '<option value="' . esc_html($modelx) .'"';
3343 + if ($topic_title_model == $modelx)
3344 + {
3345 + $output .= " selected";
3346 + }
3347 + else
3348 + {
3349 + $output .= (($assistant_id != '') ? ' disabled ' : '');
3350 + }
3351 + $output .= '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
3352 + }
3353 + $output .= '</select>
3354 + </div>
3355 + </td></tr>
3356 + <tr><td class="cr_min_width_200">
3357 + <div>
3358 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3359 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Prompt to be used for the Post Intro. You can use the following shortcodes: %%video_title%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%sections_count%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%% - to disable article intro, leave this prompt blank - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '
3360 + </div>
3361 + </div>
3362 + <b>' . esc_html__("Article Intro Prompt", 'aiomatic-automatic-ai-content-writer') . ':</b>
3363 +
3364 + </td><td>
3365 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[intro_prompt][]" placeholder="Enter your intro prompts, one per line" class="cr_width_full">' . esc_textarea($intro_prompt) . '</textarea>
3366 +
3367 + </div>
3368 + </td></tr>
3369 + <tr><td>
3370 + <div>
3371 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3372 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the AI Model to be used for the intro generator.", 'aiomatic-automatic-ai-content-writer') . '
3373 + </div>
3374 + </div>
3375 + <b>' . esc_html__("AI Model For Intro Generator", 'aiomatic-automatic-ai-content-writer') . ':</b>
3376 + </td><td class="cr_min_width_200">
3377 + <select autocomplete="off" name="aiomatic_youtube_list[topic_intro_model][]" class="hideAssistant' . esc_html($cont) . ' cr_width_full">';
3378 + if(empty($topic_intro_model))
3379 + {
3380 + $topic_intro_model = AIMOGEN_DEFAULT_MODEL;
3381 + }
3382 + foreach($all_models as $modelx)
3383 + {
3384 + $output .= '<option value="' . esc_html($modelx) .'"';
3385 + if ($topic_intro_model == $modelx)
3386 + {
3387 + $output .= " selected";
3388 + }
3389 + else
3390 + {
3391 + $output .= (($assistant_id != '') ? ' disabled ' : '');
3392 + }
3393 + $output .= '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
3394 + }
3395 + $output .= '</select>
3396 + </div>
3397 + </td></tr>
3398 + <tr><td class="cr_min_width_200">
3399 + <div>
3400 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3401 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Prompt to be used for the Post Sections. You can use the following shortcodes: %%video_title%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%sections_count%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%% - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '
3402 + </div>
3403 + </div>
3404 + <b>' . esc_html__("Article Sections Prompt", 'aiomatic-automatic-ai-content-writer') . ':</b>
3405 +
3406 + </td><td>
3407 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[sections_prompt][]" placeholder="Enter your sections prompts, one per line" class="cr_width_full">' . esc_textarea($sections_prompt) . '</textarea>
3408 +
3409 + </div>
3410 + </td></tr>
3411 + <tr><td>
3412 + <div>
3413 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3414 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the AI Model to be used for the sections generator.", 'aiomatic-automatic-ai-content-writer') . '
3415 + </div>
3416 + </div>
3417 + <b>' . esc_html__("AI Model For Sections Generator", 'aiomatic-automatic-ai-content-writer') . ':</b>
3418 + </td><td class="cr_min_width_200">
3419 + <select autocomplete="off" name="aiomatic_youtube_list[topic_sections_model][]" class="hideAssistant' . esc_html($cont) . ' cr_width_full">';
3420 + if(empty($topic_sections_model))
3421 + {
3422 + $topic_sections_model = AIMOGEN_DEFAULT_MODEL;
3423 + }
3424 + foreach($all_models as $modelx)
3425 + {
3426 + $output .= '<option value="' . esc_html($modelx) .'"';
3427 + if ($topic_sections_model == $modelx)
3428 + {
3429 + $output .= " selected";
3430 + }
3431 + else
3432 + {
3433 + $output .= (($assistant_id != '') ? ' disabled ' : '');
3434 + }
3435 + $output .= '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
3436 + }
3437 + $output .= '</select>
3438 + </div>
3439 + </td></tr>
3440 + <tr><td class="cr_min_width_200">
3441 + <div>
3442 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3443 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Prompt to be used for the Content of the article, which will be applied to each section heading generated by the plugin (or entered manually) or to the entire content (depending how you select using the 'Use the Above Content Prompt To Create The Entire Article' checkbox). You can use the following shortcodes: %%video_title%%, %%article_so_far%%, %%last_section_content%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%sections%%, %%current_section%%, %%paragraphs_per_section%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%% - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '
3444 + </div>
3445 + </div>
3446 + <b>' . esc_html__("Content Prompt", 'aiomatic-automatic-ai-content-writer') . ':</b>
3447 +
3448 + </td><td>
3449 + <textarea rows="3" cols="70" name="aiomatic_youtube_list[content_prompt][]" placeholder="Enter your content prompt" class="cr_width_full">' . esc_textarea($content_prompt) . '</textarea>
3450 +
3451 + </div>
3452 + </td></tr>
3453 + <tr><td>
3454 + <div>
3455 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3456 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the AI Model to be used for the content generator.", 'aiomatic-automatic-ai-content-writer') . '
3457 + </div>
3458 + </div>
3459 + <b>' . esc_html__("AI Model For Content Generator", 'aiomatic-automatic-ai-content-writer') . ':</b>
3460 + </td><td class="cr_min_width_200">
3461 + <select autocomplete="off" name="aiomatic_youtube_list[topic_content_model][]" class="hideAssistant' . esc_html($cont) . ' cr_width_full">';
3462 + if(empty($topic_content_model))
3463 + {
3464 + $topic_content_model = AIMOGEN_DEFAULT_MODEL;
3465 + }
3466 + foreach($all_models as $modelx)
3467 + {
3468 + $output .= '<option value="' . esc_html($modelx) .'"';
3469 + if ($topic_content_model == $modelx)
3470 + {
3471 + $output .= " selected";
3472 + }
3473 + else
3474 + {
3475 + $output .= (($assistant_id != '') ? ' disabled ' : '');
3476 + }
3477 + $output .= '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
3478 + }
3479 + $output .= '</select>
3480 + </div>
3481 + </td></tr>
3482 + <tr><td>
3483 + <div>
3484 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3485 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select if you want to use the above content prompt to create the entire article from a single API call (checkbox checked) or to run the prompt for each section separately (checkbox unchecked). If you check this, be sure to modify the content prompt accordingly.", 'aiomatic-automatic-ai-content-writer') . '
3486 + </div>
3487 + </div>
3488 + <b>' . esc_html__("Use the Above Content Prompt To Create The Entire Article (Not Each Section)", 'aiomatic-automatic-ai-content-writer') . ':</b>
3489 +
3490 + </td><td>
3491 + <input type="checkbox" id="single_content_call' . esc_html($cont) . '" name="aiomatic_youtube_list[single_content_call][]"';
3492 + if($single_content_call == '1')
3493 + {
3494 + $output .= ' checked';
3495 + }
3496 + $output .= ' onclick="hideTOC(' . esc_html($cont) . ');">
3497 +
3498 + </div>
3499 + </td></tr>
3500 + <tr><td class="cr_min_width_200">
3501 + <div>
3502 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3503 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Prompt to be used for the Post Q&A. You can use the following shortcodes: %%video_title%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%sections_count%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%% - to disable article outro, leave this prompt blank - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '
3504 + </div>
3505 + </div>
3506 + <b>' . esc_html__("Article Q&A Prompt", 'aiomatic-automatic-ai-content-writer') . ':</b>
3507 +
3508 + </td><td>
3509 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[qa_prompt][]" placeholder="Enter your Q&A prompts, one per line" class="cr_width_full">' . esc_textarea($qa_prompt) . '</textarea>
3510 +
3511 + </div>
3512 + </td></tr>
3513 + <tr><td>
3514 + <div>
3515 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3516 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the AI Model to be used for the Q&A generator.", 'aiomatic-automatic-ai-content-writer') . '
3517 + </div>
3518 + </div>
3519 + <b>' . esc_html__("AI Model For Q&A Generator", 'aiomatic-automatic-ai-content-writer') . ':</b>
3520 + </td><td class="cr_min_width_200">
3521 + <select autocomplete="off" name="aiomatic_youtube_list[topic_qa_model][]" class="hideAssistant' . esc_html($cont) . ' cr_width_full">';
3522 + if(empty($topic_qa_model))
3523 + {
3524 + $topic_qa_model = AIMOGEN_DEFAULT_MODEL;
3525 + }
3526 + foreach($all_models as $modelx)
3527 + {
3528 + $output .= '<option value="' . esc_html($modelx) .'"';
3529 + if ($topic_qa_model == $modelx)
3530 + {
3531 + $output .= " selected";
3532 + }
3533 + else
3534 + {
3535 + $output .= (($assistant_id != '') ? ' disabled ' : '');
3536 + }
3537 + $output .= '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
3538 + }
3539 + $output .= '</select>
3540 + </div>
3541 + </td></tr>
3542 + <tr><td class="cr_min_width_200">
3543 + <div>
3544 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3545 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Prompt to be used for the Post outro. You can use the following shortcodes: %%video_title%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%sections_count%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%% - to disable article outro, leave this prompt blank - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '
3546 + </div>
3547 + </div>
3548 + <b>' . esc_html__("Article Outro Prompt", 'aiomatic-automatic-ai-content-writer') . ':</b>
3549 +
3550 + </td><td>
3551 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[outro_prompt][]" placeholder="Enter your outro prompts, one per line" class="cr_width_full">' . esc_textarea($outro_prompt) . '</textarea>
3552 +
3553 + </div>
3554 + </td></tr>
3555 + <tr><td>
3556 + <div>
3557 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3558 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the AI Model to be used for the outro generator.", 'aiomatic-automatic-ai-content-writer') . '
3559 + </div>
3560 + </div>
3561 + <b>' . esc_html__("AI Model For Outro Generator", 'aiomatic-automatic-ai-content-writer') . ':</b>
3562 + </td><td class="cr_min_width_200">
3563 + <select autocomplete="off" name="aiomatic_youtube_list[topic_outro_model][]" class="hideAssistant' . esc_html($cont) . ' cr_width_full">';
3564 + if(empty($topic_outro_model))
3565 + {
3566 + $topic_outro_model = AIMOGEN_DEFAULT_MODEL;
3567 + }
3568 + foreach($all_models as $modelx)
3569 + {
3570 + $output .= '<option value="' . esc_html($modelx) .'"';
3571 + if ($topic_outro_model == $modelx)
3572 + {
3573 + $output .= " selected";
3574 + }
3575 + else
3576 + {
3577 + $output .= (($assistant_id != '') ? ' disabled ' : '');
3578 + }
3579 + $output .= '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
3580 + }
3581 + $output .= '</select>
3582 + </div>
3583 + </td></tr>
3584 + <tr><td class="cr_min_width_200">
3585 + <div>
3586 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3587 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Prompt to be used for the Post Excerpt. You can use the following shortcodes: %%video_title%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%sections%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%% - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '
3588 + </div>
3589 + </div>
3590 + <b>' . esc_html__("Excerpt Prompt", 'aiomatic-automatic-ai-content-writer') . ':</b>
3591 +
3592 + </td><td>
3593 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[excerpt_prompt][]" placeholder="Enter your excerpt prompts, one per line" class="cr_width_full">' . esc_textarea($excerpt_prompt) . '</textarea>
3594 +
3595 + </div>
3596 + </td></tr>
3597 + <tr><td>
3598 + <div>
3599 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3600 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the AI Model to be used for the excerpt generator.", 'aiomatic-automatic-ai-content-writer') . '
3601 + </div>
3602 + </div>
3603 + <b>' . esc_html__("AI Model For Excerpt Generator", 'aiomatic-automatic-ai-content-writer') . ':</b>
3604 + </td><td class="cr_min_width_200">
3605 + <select autocomplete="off" name="aiomatic_youtube_list[topic_excerpt_model][]" class="hideAssistant' . esc_html($cont) . ' cr_width_full">';
3606 + if(empty($topic_excerpt_model))
3607 + {
3608 + $topic_excerpt_model = AIMOGEN_DEFAULT_MODEL;
3609 + }
3610 + foreach($all_models as $modelx)
3611 + {
3612 + $output .= '<option value="' . esc_html($modelx) .'"';
3613 + if ($topic_excerpt_model == $modelx)
3614 + {
3615 + $output .= " selected";
3616 + }
3617 + else
3618 + {
3619 + $output .= (($assistant_id != '') ? ' disabled ' : '');
3620 + }
3621 + $output .= '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
3622 + }
3623 + $output .= '</select>
3624 + </div>
3625 + </td></tr>
3626 + <tr><td colspan="2"><h4>' . esc_html__('Advanced Prompting Options', 'aiomatic-automatic-ai-content-writer') . ':</h4></td></tr>
3627 + <tr><td>
3628 + <div>
3629 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3630 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Run regex on prompts. To disable this feature, leave this field blank. No Regex separators are required here. You can add multiple Regex expressions, each on a different line.", 'aiomatic-automatic-ai-content-writer') . '
3631 + </div>
3632 + </div>
3633 + <b>' . esc_html__("Run Regex On Prompts", 'aiomatic-automatic-ai-content-writer') . ':</b>
3634 +
3635 + </td><td>
3636 + <textarea rows="1" class="cr_width_full" name="aiomatic_youtube_list[strip_by_regex_prompts][]" placeholder="regex" class="cr_width_full">' . esc_textarea($strip_by_regex_prompts) . '</textarea>
3637 +
3638 + </div>
3639 + </td></tr><tr><td>
3640 + <div>
3641 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3642 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Replace the above regex matches with this regex expression. If you want to strip matched content from prompts, leave this field blank. No Regex separators are required here. You can add multiple replacement expressions, each on a different line.", 'aiomatic-automatic-ai-content-writer') . '
3643 + </div>
3644 + </div>
3645 + <b>' . esc_html__("Replace Matches From Regex (Prompts)", 'aiomatic-automatic-ai-content-writer') . ':</b>
3646 +
3647 + </td><td>
3648 + <textarea rows="1" class="cr_width_full" name="aiomatic_youtube_list[replace_regex_prompts][]" placeholder="regex replacement" class="cr_width_full">' . esc_textarea($replace_regex_prompts) . '</textarea>
3649 +
3650 + </div>
3651 + </td></tr><tr><td>
3652 + <div>
3653 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3654 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select on which prompts do you want to run the above Regex. Possible values are (or any of their combinations): title, intro, sections, content, outro, excerpt", 'aiomatic-automatic-ai-content-writer') . '
3655 + </div>
3656 + </div>
3657 + <b>' . esc_html__("Run Above Regex On Prompts", 'aiomatic-automatic-ai-content-writer') . ':</b>
3658 +
3659 + </td><td>
3660 + <input id="run_regex_on' . esc_html($cont) . '" name="aiomatic_youtube_list[run_regex_on][]" type="text" list="run_regex_on_list' . esc_html($cont) . '" class="coderevolution_gutenberg_input" value="' . esc_attr($run_regex_on) . '"/>
3661 + <datalist id="run_regex_on_list' . esc_html($cont) . '">
3662 + <option value="title">title</option>
3663 + <option value="intro">intro</option>
3664 + <option value="sections">sections</option>
3665 + <option value="content">content</option>
3666 + <option value="qa">Q&A</option>
3667 + <option value="outro">outro</option>
3668 + <option value="excerpt">excerpt</option>
3669 + </datalist>
3670 +
3671 + </div>
3672 + </td></tr>
3673 + <tr><td colspan="2"><h3>' . esc_html__('Global Prompt Options', 'aiomatic-automatic-ai-content-writer') . ':</h3></td></tr>
3674 + <tr><td class="cr_min_width_200">
3675 + <div>
3676 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3677 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("This will be prepended to each prompt sent by the plugin to the AI writer. You can use the following shortcodes: %%topic%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%title%%, %%random_sentence%%, %%random_sentence2%%, %%post_original_title%%, %%blog_title%% - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '
3678 + </div>
3679 + </div>
3680 + <b>' . esc_html__("Prepend Text To All Textual AI Prompts", 'aiomatic-automatic-ai-content-writer') . ':</b>
3681 +
3682 + </td><td>
3683 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[global_prepend][]" placeholder="Global prompt prepend text" class="cr_width_full">' . esc_textarea($global_prepend) . '</textarea>
3684 +
3685 + </div>
3686 + </td></tr>
3687 + <tr><td class="cr_min_width_200">
3688 + <div>
3689 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3690 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("This will be appended to each prompt sent by the plugin to the AI writer. You can use the following shortcodes: %%topic%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%title%%, %%random_sentence%%, %%random_sentence2%%, %%post_original_title%%, %%blog_title%% - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '
3691 + </div>
3692 + </div>
3693 + <b>' . esc_html__("Append Text To All Textual AI Prompts", 'aiomatic-automatic-ai-content-writer') . ':</b>
3694 +
3695 + </td><td>
3696 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[global_append][]" placeholder="Global prompt append text" class="cr_width_full">' . esc_textarea($global_append) . '</textarea>
3697 +
3698 + </div>
3699 + </td></tr>
3700 + <tr><td colspan="2"><h3>' . esc_html__('Automatic Linking Options', 'aiomatic-automatic-ai-content-writer') . ':</h3></td></tr><tr><td>
3701 + <div>
3702 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3703 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the linking method to use in posts.", 'aiomatic-automatic-ai-content-writer') . '
3704 + </div>
3705 + </div>
3706 + <b>' . esc_html__("Automatic Linking Type", 'aiomatic-automatic-ai-content-writer') . ':</b>
3707 +
3708 + </td><td>
3709 + <select autocomplete="off" class="cr_width_full" id="link_type' . esc_html($cont) . '" onchange="hideLinks(' . esc_html($cont) . ');" name="aiomatic_youtube_list[link_type][]">
3710 + <option value="disabled"';
3711 + if ($link_type == 'disabled') {
3712 + $output .= ' selected';
3713 + }
3714 + $output .= '>' . esc_html__("Disabled", 'aiomatic-automatic-ai-content-writer') . '</option>
3715 + <option value="internal"';
3716 + if ($link_type == 'internal') {
3717 + $output .= ' selected';
3718 + }
3719 + $output .= '>' . esc_html__("Internal Links", 'aiomatic-automatic-ai-content-writer') . '</option>
3720 + <option value="manual"';
3721 + if ($link_type == 'manual') {
3722 + $output .= ' selected';
3723 + }
3724 + $output .= '>' . esc_html__("Manual Links", 'aiomatic-automatic-ai-content-writer') . '</option>
3725 + <option value="serp"';
3726 + if ($link_type == 'serp') {
3727 + $output .= ' selected';
3728 + }
3729 + $output .= '>' . esc_html__("Related SERP Links", 'aiomatic-automatic-ai-content-writer') . '</option>
3730 + <option value="mixed"';
3731 + if ($link_type == 'mixed') {
3732 + $output .= ' selected';
3733 + }
3734 + $output .= '>' . esc_html__("Internal + Manual Links", 'aiomatic-automatic-ai-content-writer') . '</option>
3735 + <option value="intserp"';
3736 + if ($link_type == 'intserp') {
3737 + $output .= ' selected';
3738 + }
3739 + $output .= '>' . esc_html__("Internal & SERP Links", 'aiomatic-automatic-ai-content-writer') . '</option>
3740 + <option value="manserp"';
3741 + if ($link_type == 'manserp') {
3742 + $output .= ' selected';
3743 + }
3744 + $output .= '>' . esc_html__("Manual & SERP Links", 'aiomatic-automatic-ai-content-writer') . '</option>
3745 + <option value="intmanserp"';
3746 + if ($link_type == 'intmanserp') {
3747 + $output .= ' selected';
3748 + }
3749 + $output .= '>' . esc_html__("Internal & Manual & SERP Links", 'aiomatic-automatic-ai-content-writer') . '</option>
3750 + </select>
3751 + </div>
3752 + </td></tr>
3753 + <tr><td class="cr_min_width_200">
3754 + <div>
3755 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3756 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the maximum number of automatic links to add to created posts. You can also define custom ranges, like: 3-5. Please note that this feature will work best if you already have a considerable number of posts published on your site, which will be used for internal linking.", 'aiomatic-automatic-ai-content-writer') . '
3757 + </div>
3758 + </div>
3759 + <b>' . esc_html__("Maximum Number Of Automatic Links To Add To The Post Content", 'aiomatic-automatic-ai-content-writer') . ':</b>
3760 + </td><td>
3761 + <input type="text" name="aiomatic_youtube_list[max_links][]" placeholder="Add the number of links to enable this feature" class="cr_width_full" value="' . esc_attr($max_links) . '">
3762 + </div>
3763 + </td></tr>
3764 + <tr class="hidelinks' . esc_html($cont) . '"><td class="cr_min_width_200">
3765 + <div>
3766 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3767 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Enter a manual list of links, where the plugin will create links.", 'aiomatic-automatic-ai-content-writer') . '
3768 + </div>
3769 + </div>
3770 + <b>' . esc_html__("Manual List Of URLs (One Per Line)", 'aiomatic-automatic-ai-content-writer') . ':</b>
3771 + </td><td>
3772 + <textarea rows="1" cols="70" name="aiomatic_youtube_list[link_list][]" placeholder="URL list (one per line)" class="cr_width_full">' . esc_textarea($link_list) . '</textarea>
3773 +
3774 + </div>
3775 + </td></tr>
3776 + <tr class="hidelinks' . esc_html($cont) . '"><td class="cr_min_width_200">
3777 + <div>
3778 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3779 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Do you want to add nofollow attribute to manually entered, external links?", 'aiomatic-automatic-ai-content-writer') . '
3780 + </div>
3781 + </div>
3782 + <b>' . esc_html__("Add Nofollow Attribute To External Links", 'aiomatic-automatic-ai-content-writer') . ':</b>
3783 + </td><td>
3784 + <input type="checkbox" name="aiomatic_youtube_list[link_nofollow][]"';
3785 + if($link_nofollow == '1')
3786 + {
3787 + $output .= ' checked';
3788 + }
3789 + $output .= '>
3790 +
3791 + </div>
3792 + </td></tr>
3793 + <tr><td class="cr_min_width_200">
3794 + <div>
3795 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3796 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the post types where to create automatic links in posts. You can also add a comma separated list of multiple post types.", 'aiomatic-automatic-ai-content-writer') . '
3797 + </div>
3798 + </div>
3799 + <b>' . esc_html__("Post Types Where To Generate Automatic Links", 'aiomatic-automatic-ai-content-writer') . ':</b>
3800 + </td><td>
3801 + <input type="text" name="aiomatic_youtube_list[link_post_types][]" placeholder="post" class="cr_width_full" value="' . esc_attr($link_post_types) . '">
3802 + </div>
3803 + </td></tr>
3804 + <tr><td colspan="2"><h3>' . esc_html__('Post Category Options', 'aiomatic-automatic-ai-content-writer') . ':</h3></td></tr>
3805 + <tr><td>
3806 + <div>
3807 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3808 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Do you want to automatically add post categories from the feed items?", 'aiomatic-automatic-ai-content-writer') . '
3809 + </div>
3810 + </div>
3811 + <b>' . esc_html__("Auto Add Categories", 'aiomatic-automatic-ai-content-writer') . ':</b>
3812 +
3813 + </td><td>
3814 + <select autocomplete="off" class="cr_width_full" id="auto_categories' . esc_html($cont) . '" name="aiomatic_youtube_list[auto_categories][]">
3815 + <option value="disabled"';
3816 + if ($auto_categories == 'disabled') {
3817 + $output .= ' selected';
3818 + }
3819 + $output .= '>' . esc_html__("Disabled", 'aiomatic-automatic-ai-content-writer') . '</option>
3820 + <option value="ai"';
3821 + if ($auto_categories == 'ai') {
3822 + $output .= ' selected';
3823 + }
3824 + $output .= '>' . esc_html__("AI Generated", 'aiomatic-automatic-ai-content-writer') . '</option>
3825 + <option value="title"';
3826 + if ($auto_categories == 'title') {
3827 + $output .= ' selected';
3828 + }
3829 + $output .= '>' . esc_html__("Title", 'aiomatic-automatic-ai-content-writer') . '</option>
3830 + <option value="content"';
3831 + if ($auto_categories == 'content') {
3832 + $output .= ' selected';
3833 + }
3834 + $output .= '>' . esc_html__("Content", 'aiomatic-automatic-ai-content-writer') . '</option>
3835 + <option value="both"';
3836 + if ($auto_categories == 'both') {
3837 + $output .= ' selected';
3838 + }
3839 + $output .= '>' . esc_html__("Title and Content", 'aiomatic-automatic-ai-content-writer') . '</option>
3840 + </select>
3841 + </div>
3842 + </td></tr><tr><td>
3843 + <div>
3844 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3845 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the AI Model to be used for the category generator. You can add this to the post categories, if you select 'AI Generated Categories' in the 'Auto Add Categories' settings field.", 'aiomatic-automatic-ai-content-writer') . '
3846 + </div>
3847 + </div>
3848 + <b>' . esc_html__("AI Model For The Category Generator", 'aiomatic-automatic-ai-content-writer') . ':</b>
3849 + </td><td class="cr_min_width_200">
3850 + <select autocomplete="off" name="aiomatic_youtube_list[category_model][]" class="hideAssistant' . esc_html($cont) . ' cr_width_full">';
3851 + if(empty($category_model))
3852 + {
3853 + $category_model = AIMOGEN_DEFAULT_MODEL;
3854 + }
3855 + foreach($all_models as $modelx)
3856 + {
3857 + $output .= '<option value="' . esc_html($modelx) .'"';
3858 + if ($category_model == $modelx)
3859 + {
3860 + $output .= " selected";
3861 + }
3862 + else
3863 + {
3864 + $output .= (($assistant_id != '') ? ' disabled ' : '');
3865 + }
3866 + $output .= '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
3867 + }
3868 + $output .= '</select>
3869 + </div>
3870 + </td></tr>
3871 + <tr><td class="cr_min_width_200">
3872 + <div>
3873 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3874 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set list of prompt commands (one on each line) you want to send to AI category generator. You can use the following shortcodes here: %%post_title%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%%. You can also add a link to a TXT file, containing keywords (one per line), or to an RSS feed. If you use RSS feeds, you can also use the following additional shortcodes: %%post_content%%, %%post_content_plain_text%%, %%post_excerpt%%, %%post_cats%%, %%author_name%%, %%current_date_time%%, %%post_link%%. The length of this command should not be greater than the max token count set in the settings for the prompt command - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You can also add here a link to a .txt file, where you can add multiple prompts (one per line) and the plugin will select a random one at each run. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '&nbsp;' . sprintf( wp_kses( __( "Please check some tips and tricks about writing prompt commands, <a href='%s' target='_blank'>here</a>.", 'aiomatic-automatic-ai-content-writer'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), 'https://coderevolution.ro/knowledge-base/faq/how-to-create-a-good-seed-prompt-command-for-aiomatic-for-openai-gpt-3-api/') . '
3875 + </div>
3876 + </div>
3877 + <b>' . esc_html__("Prompt For The AI Category Generator", 'aiomatic-automatic-ai-content-writer') . ':</b>&nbsp;<b><a href="https://coderevolution.ro/knowledge-base/faq/how-to-create-a-good-seed-prompt-command-for-aiomatic-for-openai-gpt-3-api/" target="_blank">&#9432;</a></b>
3878 +
3879 + </td><td>
3880 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[category_ai_command][]" placeholder="Write a comma separated list of categories, for the post title: %%post_title%%" class="cr_width_full">' . esc_textarea($category_ai_command) . '</textarea>
3881 +
3882 + </div>
3883 + </td></tr><tr><td class="cr_min_width_200">
3884 + <div>
3885 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3886 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the post category that you want for the automatically generated posts to have.", 'aiomatic-automatic-ai-content-writer') . '
3887 + </div>
3888 + </div>
3889 + <b>' . esc_html__("Additional Post Category", 'aiomatic-automatic-ai-content-writer') . ':</b>
3890 +
3891 + </td><td>
3892 +
3893 + <select multiple class="cr_width_full" id="default_category' . esc_html($cont) . '" name="aiomatic_youtube_list[default_category' . esc_html($cont) . '][]" onmouseover="this.size=this.length;" onmouseout="this.size=4;">
3894 + <option value="aiomatic_no_category_12345678"';
3895 + if(!is_array($default_category))
3896 + {
3897 + $default_category = array($default_category);
3898 + }
3899 + if(count($default_category) == 1)
3900 + {
3901 + foreach($default_category as $dc)
3902 + {
3903 + if ("aiomatic_no_category_12345678" == $dc) {
3904 + $output .= ' selected';
3905 + break;
3906 + }
3907 + }
3908 + }
3909 + $output .= '>' . esc_html__("Do Not Add a Category", 'aiomatic-automatic-ai-content-writer') . '</option>';
3910 + if(!isset($cats_arr[$def_type]))
3911 + {
3912 + if($def_type == 'product')
3913 + {
3914 + $cat_args['taxonomy'] = 'product_cat';
3915 + }
3916 + elseif(isset($cat_args['taxonomy']))
3917 + {
3918 + unset($cat_args['taxonomy']);
3919 + }
3920 + $cats_arr[$def_type] = get_categories($cat_args);
3921 +
3922 + }
3923 + $categories = $cats_arr[$def_type];
3924 + foreach ($categories as $category) {
3925 + $output .= '<option value="' . esc_attr($category->term_id) . '"';
3926 + foreach($default_category as $dc)
3927 + {
3928 + if ($category->term_id == $dc) {
3929 + $output .= ' selected';
3930 + break;
3931 + }
3932 + }
3933 + $output .= '>' . sanitize_text_field($category->name) . ' - ID ' . esc_html($category->term_id) . '</option>';
3934 + }
3935 + $output .= '</select>
3936 + </div>
3937 + </td></tr><tr><td>
3938 + <div>
3939 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3940 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("This feature will try to remove the WordPress\'s default post category. This may fail in case no additional categories are added, because WordPress requires at least one post category for every post.", 'aiomatic-automatic-ai-content-writer') . '
3941 + </div>
3942 + </div>
3943 + <b>' . esc_html__("Remove WP Default Post Category", 'aiomatic-automatic-ai-content-writer') . ':</b>
3944 +
3945 + </td><td>
3946 + <input type="checkbox" id="remove_default' . esc_html($cont) . '" name="aiomatic_youtube_list[remove_default][]"';
3947 + if($remove_default == '1')
3948 + {
3949 + $output .= ' checked';
3950 + }
3951 + $output .= '>
3952 +
3953 + </div>
3954 + </td></tr><tr><td>
3955 + <div>
3956 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3957 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("This option will make the plugin not create categories which are not already existing on your site. For best results in this case, be sure to add to the prompt the list of categories from where the AI should select.", 'aiomatic-automatic-ai-content-writer') . '
3958 + </div>
3959 + </div>
3960 + <b>' . esc_html__("Do Not Add Inexistent Categories", 'aiomatic-automatic-ai-content-writer') . ':</b>
3961 +
3962 + </td><td>
3963 + <input type="checkbox" id="skip_inexist' . esc_html($cont) . '" name="aiomatic_youtube_list[skip_inexist][]"';
3964 + if($skip_inexist == '1')
3965 + {
3966 + $output .= ' checked';
3967 + }
3968 + $output .= '>
3969 +
3970 + </div>
3971 + </td></tr>
3972 + <tr><td colspan="2"><h3>' . esc_html__('Post Tag Options', 'aiomatic-automatic-ai-content-writer') . ':</h3></td></tr><tr><td>
3973 + <div>
3974 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3975 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Do you want to automatically add post tags from the feed items?", 'aiomatic-automatic-ai-content-writer') . '
3976 + </div>
3977 + </div>
3978 + <b>' . esc_html__("Auto Add Tags", 'aiomatic-automatic-ai-content-writer') . ':</b>
3979 +
3980 + </td><td>
3981 + <select autocomplete="off" class="cr_width_full" id="auto_tags' . esc_html($cont) . '" name="aiomatic_youtube_list[auto_tags][]">
3982 + <option value="disabled"';
3983 + if ($auto_tags == 'disabled') {
3984 + $output .= ' selected';
3985 + }
3986 + $output .= '>' . esc_html__("Disabled", 'aiomatic-automatic-ai-content-writer') . '</option>
3987 + <option value="ai"';
3988 + if ($auto_tags == 'ai') {
3989 + $output .= ' selected';
3990 + }
3991 + $output .= '>' . esc_html__("AI Generated", 'aiomatic-automatic-ai-content-writer') . '</option>
3992 + <option value="title"';
3993 + if ($auto_tags == 'title') {
3994 + $output .= ' selected';
3995 + }
3996 + $output .= '>' . esc_html__("Title", 'aiomatic-automatic-ai-content-writer') . '</option>
3997 + <option value="content"';
3998 + if ($auto_tags == 'content') {
3999 + $output .= ' selected';
4000 + }
4001 + $output .= '>' . esc_html__("Content", 'aiomatic-automatic-ai-content-writer') . '</option>
4002 + <option value="both"';
4003 + if ($auto_tags == 'both') {
4004 + $output .= ' selected';
4005 + }
4006 + $output .= '>' . esc_html__("Title and Content", 'aiomatic-automatic-ai-content-writer') . '</option>
4007 + </select>
4008 + </div>
4009 + </td></tr><tr><td>
4010 + <div>
4011 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4012 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the AI Model to be used for the tag generator. You can add this to the post tags, if you select 'AI Generated Tags' in the 'Auto Add Tags' settings field.", 'aiomatic-automatic-ai-content-writer') . '
4013 + </div>
4014 + </div>
4015 + <b>' . esc_html__("AI Model For The Post Tag Generator", 'aiomatic-automatic-ai-content-writer') . ':</b>
4016 + </td><td class="cr_min_width_200">
4017 + <select autocomplete="off" name="aiomatic_youtube_list[tag_model][]" class="hideAssistant' . esc_html($cont) . ' cr_width_full">';
4018 + if(empty($tag_model))
4019 + {
4020 + $tag_model = AIMOGEN_DEFAULT_MODEL;
4021 + }
4022 + foreach($all_models as $modelx)
4023 + {
4024 + $output .= '<option value="' . esc_html($modelx) .'"';
4025 + if ($tag_model == $modelx)
4026 + {
4027 + $output .= " selected";
4028 + }
4029 + else
4030 + {
4031 + $output .= (($assistant_id != '') ? ' disabled ' : '');
4032 + }
4033 + $output .= '>' . esc_html($modelx) . esc_html(aiomatic_get_model_provider($modelx)) . '</option>';
4034 + }
4035 + $output .= '</select>
4036 + </div>
4037 + </td></tr>
4038 + <tr><td class="cr_min_width_200">
4039 + <div>
4040 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4041 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set list of prompt commands (one on each line) you want to send to AI tag generator. You can use the following shortcodes here: %%post_title%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%%. You can also add a link to a TXT file, containing keywords (one per line), or to an RSS feed. If you use RSS feeds, you can also use the following additional shortcodes: %%post_content%%, %%post_content_plain_text%%, %%post_excerpt%%, %%post_cats%%, %%author_name%%, %%current_date_time%%, %%post_link%%. The length of this command should not be greater than the max token count set in the settings for the prompt command - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You can also add here a link to a .txt file, where you can add multiple prompts (one per line) and the plugin will select a random one at each run. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '&nbsp;' . sprintf( wp_kses( __( "Please check some tips and tricks about writing prompt commands, <a href='%s' target='_blank'>here</a>.", 'aiomatic-automatic-ai-content-writer'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), 'https://coderevolution.ro/knowledge-base/faq/how-to-create-a-good-seed-prompt-command-for-aiomatic-for-openai-gpt-3-api/' ) . '
4042 + </div>
4043 + </div>
4044 + <b>' . esc_html__("Prompt For The AI Post Tag Generator", 'aiomatic-automatic-ai-content-writer') . ':</b>&nbsp;<b><a href="https://coderevolution.ro/knowledge-base/faq/how-to-create-a-good-seed-prompt-command-for-aiomatic-for-openai-gpt-3-api/" target="_blank">&#9432;</a></b>
4045 +
4046 + </td><td>
4047 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[tag_ai_command][]" placeholder="Write a comma separated list of tags, for the post title: %%post_title%%" class="cr_width_full">' . esc_textarea($tag_ai_command) . '</textarea>
4048 +
4049 + </div>
4050 + </td></tr><tr><td>
4051 + <div>
4052 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4053 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the post tags that you want for the automatically generated posts to have. Spintax supported.", 'aiomatic-automatic-ai-content-writer') . '
4054 + </div>
4055 + </div>
4056 + <b>' . esc_html__("Additional Post Tags", 'aiomatic-automatic-ai-content-writer') . ':</b>
4057 +
4058 + </td><td>
4059 + <input class="cr_width_full" type="text" name="aiomatic_youtube_list[default_tags][]" value="' . esc_attr($default_tags) . '" placeholder="Please insert your additional post tags here" >
4060 +
4061 + </div>
4062 + </td></tr>
4063 + <tr><td colspan="2"><h3>' . esc_html__('Advanced AI Text Generator Options', 'aiomatic-automatic-ai-content-writer') . ':</h3></td></tr>
4064 + <tr><td class="cr_min_width_200">
4065 + <div>
4066 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4067 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the maximum number of API tokens to use with each request. This will define the length of the resulting API response. Each token usually consists of approximately 4 characters. Note that in this value the number of tokens sent to the API as an article prompt will also be counted. The maximum amount which can be set is 4000. For other models, the maximum is 2048.", 'aiomatic-automatic-ai-content-writer') . '
4068 + </div>
4069 + </div>
4070 + <b>' . esc_html__("Maximum Total Token Count To Use Per API Request", 'aiomatic-automatic-ai-content-writer') . ':</b>
4071 + </td><td>
4072 + <input type="number" min="1" name="aiomatic_youtube_list[max_tokens][]" value="' . esc_attr($max_tokens) . '" placeholder="2048" class="cr_width_full">
4073 +
4074 + </div>
4075 + </td></tr><tr><td class="cr_min_width_200">
4076 + <div>
4077 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4078 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the maximum number of prompt API tokens to use with each request. This will define the length of the resulting API response. Each token usually consists of approximately 4 characters. This defines how much content does the API receive each time you call it. If the API gets more initial data, better quality results will be expected. The maximum amount which can be set is 1000.", 'aiomatic-automatic-ai-content-writer') . '
4079 + </div>
4080 + </div>
4081 + <b>' . esc_html__("Maximum Prompt Token Count To Use Per API Request", 'aiomatic-automatic-ai-content-writer') . ':</b>
4082 + </td><td>
4083 + <input type="number" min="1" name="aiomatic_youtube_list[max_seed_tokens][]" value="' . esc_attr($max_seed_tokens) . '" placeholder="1000" class="cr_width_full">
4084 +
4085 + </div>
4086 + </td></tr><tr><td class="cr_min_width_200">
4087 + <div>
4088 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4089 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the maximum number of continue API tokens to use with each request. This will define the length of the resulting API response. Each token usually consists of approximately 4 characters. This defines how much content does the API receive each time you call it. If the API gets more initial data, better quality results will be expected. The maximum amount which can be set is 500.", 'aiomatic-automatic-ai-content-writer') . '
4090 + </div>
4091 + </div>
4092 + <b>' . esc_html__("Maximum Continue Token Count To Use Per API Request", 'aiomatic-automatic-ai-content-writer') . ':</b>
4093 + </td><td>
4094 + <input type="number" min="1" name="aiomatic_youtube_list[max_continue_tokens][]" value="' . esc_attr($max_continue_tokens) . '" placeholder="500" class="cr_width_full">
4095 +
4096 + </div>
4097 + </td></tr><tr><td class="cr_min_width_200">
4098 + <div>
4099 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4100 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("What sampling temperature to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer. We generally recommend altering this or top_p but not both.", 'aiomatic-automatic-ai-content-writer') . '
4101 + </div>
4102 + </div>
4103 + <b>' . esc_html__("AI Temperature", 'aiomatic-automatic-ai-content-writer') . ':</b>
4104 + </td><td>
4105 + <input type="number" min="0" step="0.01" max="2" name="aiomatic_youtube_list[temperature][]" value="' . esc_attr($temperature) . '" placeholder="1" class="cr_width_full">
4106 +
4107 + </div>
4108 + </td></tr>
4109 + <tr><td class="cr_min_width_200">
4110 + <div>
4111 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4112 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.", 'aiomatic-automatic-ai-content-writer') . '
4113 + </div>
4114 + </div>
4115 + <b>' . esc_html__("AI Top_p", 'aiomatic-automatic-ai-content-writer') . ':</b>
4116 + </td><td>
4117 + <input type="number" min="0" step="0.01" max="1" name="aiomatic_youtube_list[top_p][]" value="' . esc_attr($top_p) . '" placeholder="1" class="cr_width_full">
4118 +
4119 + </div>
4120 + </td></tr>
4121 + <tr><td class="cr_min_width_200">
4122 + <div>
4123 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4124 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.", 'aiomatic-automatic-ai-content-writer') . '
4125 + </div>
4126 + </div>
4127 + <b>' . esc_html__("AI Presence Penalty", 'aiomatic-automatic-ai-content-writer') . ':</b>
4128 + </td><td>
4129 + <input type="number" min="-2" max="2" step="0.01" name="aiomatic_youtube_list[presence_penalty][]" value="' . esc_attr($presence_penalty) . '" placeholder="0" class="cr_width_full">
4130 +
4131 + </div>
4132 + </td></tr>
4133 + <tr><td class="cr_min_width_200">
4134 + <div>
4135 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4136 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.", 'aiomatic-automatic-ai-content-writer') . '
4137 + </div>
4138 + </div>
4139 + <b>' . esc_html__("AI Frequency Penalty", 'aiomatic-automatic-ai-content-writer') . ':</b>
4140 + </td><td>
4141 + <input type="number" min="-2" step="0.01" max="2" name="aiomatic_youtube_list[frequency_penalty][]" value="' . esc_attr($frequency_penalty) . '" placeholder="0" class="cr_width_full">
4142 +
4143 + </div>
4144 + </td></tr>
4145 + <tr><td colspan="2"><h3>' . esc_html__('Image Generator Options', 'aiomatic-automatic-ai-content-writer') . ':</h3></td></tr>
4146 + <tr><td>
4147 + <div>
4148 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4149 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Do you want to set a featured image for the created post (royalty free or AI generated)? Please note that for this feature to function you must configure the plugin (add API keys) in the plugin\'s \'Settings\' menu -> \'Royalty Free Featured Image Importing Options\' section.", 'aiomatic-automatic-ai-content-writer') . '
4150 + </div>
4151 + </div>
4152 + <b>' . esc_html__("Auto Set A Featured Image For Posts (Select Source Below)", 'aiomatic-automatic-ai-content-writer') . ':</b>
4153 +
4154 + </td><td>
4155 + <select autocomplete="off" name="aiomatic_youtube_list[royalty_free][]" class="cr_width_full">
4156 + <option value="0"';
4157 + if ($royalty_free == '0') {
4158 + $output .= ' selected';
4159 + }
4160 + $output .= '>' . esc_html__("Disabled", 'aiomatic-automatic-ai-content-writer') . '</option>
4161 + <option value="1"';
4162 + if ($royalty_free == '1') {
4163 + $output .= ' selected';
4164 + }
4165 + $output .= '>' . esc_html__("AI Image From Below Selector", 'aiomatic-automatic-ai-content-writer') . '</option>
4166 + <option value="2"';
4167 + if ($royalty_free == '2') {
4168 + $output .= ' selected';
4169 + }
4170 + $output .= '>' . esc_html__("YouTube Video Thumbnail", 'aiomatic-automatic-ai-content-writer') . '</option>
4171 + </select>
4172 +
4173 + </div>
4174 + </td></tr>
4175 + <tr><td class="cr_min_width_200">
4176 + <div>
4177 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4178 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the search query repetition mode, when searching royalty free images.", 'aiomatic-automatic-ai-content-writer') . '
4179 + </div>
4180 + </div>
4181 + <b>' . esc_html__("Search Query Repetition", 'aiomatic-automatic-ai-content-writer') . ':</b>
4182 + </td><td>
4183 + <select autocomplete="off" name="aiomatic_youtube_list[search_query_repetition][]" class="cr_width_full">
4184 + <option value="0"';
4185 + if ($search_query_repetition == '0') {
4186 + $output .= ' selected';
4187 + }
4188 + $output .= '>' . esc_html__("Use Different Search Queries For Images", 'aiomatic-automatic-ai-content-writer') . '</option>
4189 + <option value="1"';
4190 + if ($search_query_repetition == '1') {
4191 + $output .= ' selected';
4192 + }
4193 + $output .= '>' . esc_html__("Use The Same Search Query For Images", 'aiomatic-automatic-ai-content-writer') . '</option>
4194 + </select>
4195 + </div>
4196 + </td></tr>
4197 + <tr><td class="cr_min_width_200">
4198 + <div>
4199 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4200 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Do you want to enable the AI Image Generator and to replace Royalty Free Images with AI generated images? If you select 'Default Featured Image List', you can add the image URLs in the 'Default Featured Image List' settings field.", 'aiomatic-automatic-ai-content-writer') . '
4201 + </div>
4202 + </div>
4203 + <b>' . esc_html__("Article Image Source", 'aiomatic-automatic-ai-content-writer') . ':</b>
4204 + </td><td>
4205 + <select id="enable_ai_images' . esc_html($cont) . '" autocomplete="off" onchange="hideImage(' . esc_html($cont) . ');" name="aiomatic_youtube_list[enable_ai_images][]" class="cr_width_full">
4206 + <option value="0"';
4207 + if ($enable_ai_images == '0') {
4208 + $output .= ' selected';
4209 + }
4210 + $output .= '>' . esc_html__("Royalty Free", 'aiomatic-automatic-ai-content-writer') . '</option>
4211 + <option value="1"';
4212 + if ($enable_ai_images == '1') {
4213 + $output .= ' selected';
4214 + }
4215 + $output .= '>' . esc_html__("OpenAI/AiomaticAPI", 'aiomatic-automatic-ai-content-writer') . '</option>
4216 + <option value="2"';
4217 + if ($enable_ai_images == '2') {
4218 + $output .= ' selected';
4219 + }
4220 + $output .= '>' . esc_html__("Stability.AI", 'aiomatic-automatic-ai-content-writer') . '</option>
4221 + <option value="4"';
4222 + if ($enable_ai_images == '4') {
4223 + $output .= ' selected';
4224 + }
4225 + $output .= '>' . esc_html__("Midjourney", 'aiomatic-automatic-ai-content-writer') . '</option>
4226 + <option value="5"';
4227 + if ($enable_ai_images == '5') {
4228 + $output .= ' selected';
4229 + }
4230 + $output .= '>' . esc_html__("Replicate", 'aiomatic-automatic-ai-content-writer') . '</option>
4231 + <option value="6"';
4232 + if ($enable_ai_images == '6') {
4233 + $output .= ' selected';
4234 + }
4235 + $output .= '>' . esc_html__("Ideogram", 'aiomatic-automatic-ai-content-writer') . '</option>
4236 + <option value="7"';
4237 + if ($enable_ai_images == '7') {
4238 + $output .= ' selected';
4239 + }
4240 + $output .= '>' . esc_html__("Google", 'aiomatic-automatic-ai-content-writer') . '</option>
4241 + <option value="3"';
4242 + if ($enable_ai_images == '3') {
4243 + $output .= ' selected';
4244 + }
4245 + $output .= '>' . esc_html__("Manual URL List", 'aiomatic-automatic-ai-content-writer') . '</option>
4246 + </select>
4247 + </div>
4248 + </td></tr>
4249 + <tr class="hideImg' . esc_html($cont) . '"><td class="cr_min_width_200">
4250 + <div>
4251 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4252 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set list of prompt commands (one on each line) you want to send to the AI image generator. This command can be any given task or order, based on which, it will generate images. You can use the following shortcodes: %%post_title%%, %%post_content%%, %%post_content_plain_text%%, %%post_excerpt%%, %%post_cats%%, %%post_tags%%, %%featured_image%%, %%blog_title%%, %%author_name%%, %%current_date_time%%, %%post_link%%, %%random_sentence%%, %%random_sentence2%%. The length of this command should not be greater than 1000 characters (4000 characters for Dall-E 3), otherwise the plugin will strip it to 1000 characters length. - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You can also add here a link to a .txt file, where you can add multiple prompts (one per line) and the plugin will select a random one at each run. If you use Royalty Free Images as a source, you can also set their keywords here, if no keywords set, they will be automatically generated. You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '&nbsp;' . sprintf( wp_kses( __( "Please check some tips and tricks about writing prompt commands, <a href='%s' target='_blank'>here</a>. The [aicontent] shortcode is able to be used also here.", 'aiomatic-automatic-ai-content-writer'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), 'https://coderevolution.ro/knowledge-base/faq/how-to-create-a-good-seed-prompt-command-for-aiomatic-image-generating-for-openai-dall-e-api/' ) . '
4253 + </div>
4254 + </div>
4255 + <b>' . esc_html__("Prompt For The AI Image Generator", 'aiomatic-automatic-ai-content-writer') . ':</b>&nbsp;<b><a href="https://coderevolution.ro/knowledge-base/faq/how-to-create-a-good-seed-prompt-command-for-aiomatic-image-generating-for-openai-dall-e-api/" target="_blank">&#9432;</a></b>
4256 +
4257 + </td><td>
4258 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[ai_command_image][]" placeholder="Please insert a command for the AI image generator" class="cr_width_full">' . esc_textarea($ai_command_image) . '</textarea>
4259 +
4260 + </div>
4261 + </td></tr>
4262 + <tr class="hideDalle' . esc_html($cont) . '"><td>
4263 + <div>
4264 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4265 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the AI model you wish to use for image the image generator.", 'aiomatic-automatic-ai-content-writer') . '
4266 + </div>
4267 + </div>
4268 + <b>' . esc_html__("AI Image Model", 'aiomatic-automatic-ai-content-writer') . ':</b>
4269 + </td><td class="cr_min_width_200">
4270 + <select autocomplete="off" name="aiomatic_youtube_list[image_model][]" class="cr_width_full">';
4271 + foreach(AIMOGEN_DALLE_IMAGE_MODELS as $modelx)
4272 + {
4273 + $output .= '<option value="' . esc_html($modelx) .'"';
4274 + if ($modelx == $image_model) { $output .= ' selected'; }
4275 + $output .= '>' . esc_html($modelx) . '</option>';
4276 + }
4277 + $output .= '</select>
4278 + </div>
4279 + </td></tr>
4280 + <tr class="hideImg' . esc_html($cont) . '"><td>
4281 + <div>
4282 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4283 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the size of the generated image.", 'aiomatic-automatic-ai-content-writer') . '
4284 + </div>
4285 + </div>
4286 + <b>' . esc_html__("Generated Image Size", 'aiomatic-automatic-ai-content-writer') . ':</b>
4287 + </td><td class="cr_min_width_200">
4288 + <select autocomplete="off" name="aiomatic_youtube_list[image_size][]" class="cr_width_full">
4289 + <option value="256x256"';
4290 + if ($image_size == '256x256') {
4291 + $output .= ' selected';
4292 + }
4293 + $output .= '>' . esc_html__("256x256 (only for Dall-E 2)", 'aiomatic-automatic-ai-content-writer') . '</option>
4294 + <option value="512x512"';
4295 + if ($image_size == '512x512') {
4296 + $output .= ' selected';
4297 + }
4298 + $output .= '>' . esc_html__("512x512 (only for Dall-E 2 & Stable Diffusion)", 'aiomatic-automatic-ai-content-writer') . '</option>
4299 + <option value="1024x1024"';
4300 + if ($image_size == '1024x1024') {
4301 + $output .= ' selected';
4302 + }
4303 + $output .= '>' . esc_html__("1024x1024", 'aiomatic-automatic-ai-content-writer') . '</option>
4304 + <option value="1792x1024"';
4305 + if ($image_size == '1792x1024') {
4306 + $output .= ' selected';
4307 + }
4308 + $output .= '>' . esc_html__("1792x1024 (only for Dall-E 3)", 'aiomatic-automatic-ai-content-writer') . '</option>
4309 + <option value="1024x1792"';
4310 + if ($image_size == '1024x1792') {
4311 + $output .= ' selected';
4312 + }
4313 + $output .= '>' . esc_html__("1024x1792 (only for Dall-E 3)", 'aiomatic-automatic-ai-content-writer') . '</option>
4314 + <option value="1536x1024"';
4315 + if ($image_size == '1536x1024') {
4316 + $output .= ' selected';
4317 + }
4318 + $output .= '>' . esc_html__("1536x1024 (only for gpt-image-1, gpt-image-1-mini, gpt-image-1.5, chatgpt-image-latest)", 'aiomatic-automatic-ai-content-writer') . '</option>
4319 + <option value="1024x1536"';
4320 + if ($image_size == '1024x1536') {
4321 + $output .= ' selected';
4322 + }
4323 + $output .= '>' . esc_html__("1024x1536 (only for gpt-image-1, gpt-image-1-mini, gpt-image-1.5, chatgpt-image-latest)", 'aiomatic-automatic-ai-content-writer') . '</option>
4324 + </select>
4325 + </div>
4326 + </td></tr><tr><td>
4327 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4328 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Insert a comma separated list of links to valid images that will be set randomly for the featured image for the posts that do not have a valid image attached or if you disabled automatical featured image generator. You can also use image numeric IDs from images found in the Media Gallery. To disable this feature, leave this field blank. Spintax supported. You can also use the %%random_image[keyword]%% shortcode to automatically import a random image from Google Image Search with the Creative Commons filter applied. To get a related image, you can also use: %%random_image[%%post_title%%]%%", 'aiomatic-automatic-ai-content-writer') . '
4329 + </div>
4330 + </div>
4331 + <b>' . esc_html__("Default Featured Image List", 'aiomatic-automatic-ai-content-writer') . ':</b>
4332 + </td><td>
4333 + <textarea rows="1" class="cr_width_60p" name="aiomatic_youtube_list[image_url][]" placeholder="Please insert the link to a valid image (spintax supported)">' . esc_textarea($image_url) . '</textarea>
4334 +
4335 + </td></tr>
4336 + <tr><td colspan="2"><h3>' . esc_html__('Posting Options', 'aiomatic-automatic-ai-content-writer') . ':</h3></td></tr>
4337 + <tr><td class="cr_min_width_200">
4338 + <div>
4339 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4340 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Enter a HTML text that should be prepended to the AI generated content in each created post. You can use the following shortcodes: %%custom_html%%, %%custom_html2%%, %%video_title%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%sections_count%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%%, %%random_image[keyword]%%, %%random_image_url[keyword]%%, %%random_video[keyword]%%, %%royalty_free_image_attribution%% - you can also use an optional parameter in the random_image and random_video shortcodes, which will add a percentage chance for the media to appear or not - example: %%random_video[keyword][60]%% - a video will appear in 60% of cases, in the rest of 40%, nothing will be returned by the shortcode - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '
4341 + </div>
4342 + </div>
4343 + <b>' . esc_html__("HTML Text To Prepend To AI Created Content", 'aiomatic-automatic-ai-content-writer') . ':</b>&nbsp;<b><a href="https://coderevolution.ro/knowledge-base/faq/post-template-reference-advanced-usage/" target="_blank">&#9432;</a></b>
4344 + </td><td>
4345 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[post_prepend][]" placeholder="HTML content to prepend to the AI generated content" class="cr_width_full">' . esc_textarea($post_prepend) . '</textarea>
4346 + </div>
4347 + </td></tr><tr><td class="cr_min_width_200">
4348 + <div>
4349 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4350 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Enter a HTML text that should be append to the AI generated content in each created post. You can use the following shortcodes: %%custom_html%%, %%custom_html2%%, %%video_title%%, %%video_descripton%%, %%video_url%%, %%video_id%%, %%video_captions%%, %%language%%, %%writing_style%%, %%writing_tone%%, %%sections_count%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%%, %%random_image[keyword]%%, %%random_image_url[keyword]%%, %%random_video[keyword]%%, %%royalty_free_image_attribution%% - you can also use an optional parameter in the random_image and random_video shortcodes, which will add a percentage chance for the media to appear or not - example: %%random_video[keyword][60]%% - a video will appear in 60% of cases, in the rest of 40%, nothing will be returned by the shortcode - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators.", 'aiomatic-automatic-ai-content-writer') . '
4351 + </div>
4352 + </div>
4353 + <b>' . esc_html__("HTML Text To Append To AI Created Content", 'aiomatic-automatic-ai-content-writer') . ':</b>&nbsp;<b><a href="https://coderevolution.ro/knowledge-base/faq/post-template-reference-advanced-usage/" target="_blank">&#9432;</a></b>
4354 + </td><td>
4355 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[post_append][]" placeholder="HTML content to append to the AI generated content" class="cr_width_full">' . esc_textarea($post_append) . '</textarea>
4356 + </div>
4357 + </td></tr><tr><td class="cr_min_width_200">
4358 + <div>
4359 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4360 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Custom AI generated content shortcode creator. If you wish to create content from multiple AI prompts, and use them in post content/post custom fields/taxonomies, you can configure this from here. Also, these shortcodes will be able to be used in custom fields or custom taxonomies which the plugin will create. Syntax for this field: shortcode_name => AI_MODEL_TO_USE @@ TEXTUAL_PROMPT_TO_USE (to specify multiple shortcodes and crawling values, separate them by a new line. Example: my_custom_shortcode => gpt-4.1-mini @@ Write a short poem. Afterwards, you can use shortcodes in any settings field that supports shortcodes (ex: 'HTML Text To Append To AI Created Content' settings field), like this: %%my_custom_shortcode%%. Official format is %%name_of_custom_shortcode%%", 'aiomatic-automatic-ai-content-writer') . '
4361 + </div>
4362 + </div>
4363 + <b>' . esc_html__("Custom Shortcode Creator (Optional)", 'aiomatic-automatic-ai-content-writer') . ':</b><span class="tool" data-tip="Supported models: ' . implode(',', aiomatic_get_all_models()) . '">&nbsp;&#9432;</span>
4364 + </td><td>
4365 + <textarea rows="2" cols="70" name="aiomatic_youtube_list[custom_shortcodes][]" placeholder="shortcode_name => AI_MODEL @@ AI_PROMPT" class="cr_width_full">' . esc_textarea($custom_shortcodes) . '</textarea>
4366 + </div>
4367 + </td></tr><tr><td>
4368 + <div>
4369 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4370 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("The AI writer might add the title of the post to the created post content. Check this checkbox if you want to remove the title from the post content", 'aiomatic-automatic-ai-content-writer') . '
4371 + </div>
4372 + </div>
4373 + <b>' . esc_html__("Strip Title From Content", 'aiomatic-automatic-ai-content-writer') . ':</b>
4374 +
4375 + </td><td>
4376 + <input type="checkbox" id="strip_title' . esc_html($cont) . '" name="aiomatic_youtube_list[strip_title][]"';
4377 + if($strip_title == '1')
4378 + {
4379 + $output .= ' checked';
4380 + }
4381 + $output .= '>
4382 +
4383 + </div>
4384 + </td></tr><tr><td>
4385 + <div>
4386 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4387 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Do you want to skip spinning of posts generated by this rule?", 'aiomatic-automatic-ai-content-writer') . '
4388 + </div>
4389 + </div>
4390 + <b>' . esc_html__("Do Not Spin Posts Generated By This Rule", 'aiomatic-automatic-ai-content-writer') . ':</b>
4391 +
4392 + </td><td>
4393 + <input type="checkbox" id="skip_spin' . esc_html($cont) . '" name="aiomatic_youtube_list[skip_spin][]"';
4394 + if($skip_spin == '1')
4395 + {
4396 + $output .= ' checked';
4397 + }
4398 + $output .= '>
4399 + </div>
4400 + </td></tr><tr><td>
4401 + <div>
4402 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4403 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Do you want to skip translating of posts generated by this rule?", 'aiomatic-automatic-ai-content-writer') . '
4404 + </div>
4405 + </div>
4406 + <b>' . esc_html__("Do Not Translate Posts Generated By This Rule", 'aiomatic-automatic-ai-content-writer') . ':</b>
4407 +
4408 + </td><td>
4409 + <input type="checkbox" id="skip_translate' . esc_html($cont) . ' name="aiomatic_youtube_list[skip_translate][]"';
4410 + if($skip_translate == '1')
4411 + {
4412 + $output .= ' checked';
4413 + }
4414 + $output .= '>
4415 + </div>
4416 + </td></tr><tr><td>
4417 + <div>
4418 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4419 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select if you want to process each title from the added list only once.", 'aiomatic-automatic-ai-content-writer') . '
4420 + </div>
4421 + </div>
4422 + <b>' . esc_html__("Process Each Title/Video Only Once", 'aiomatic-automatic-ai-content-writer') . ':</b>
4423 +
4424 + </td><td>
4425 + <input type="checkbox" id="title_once' . esc_html($cont) . '" name="aiomatic_youtube_list[title_once][]"';
4426 + if($title_once == '1')
4427 + {
4428 + $output .= ' checked';
4429 + }
4430 + $output .= '>
4431 +
4432 + </div>
4433 + </td></tr><tr><td>
4434 + <div>
4435 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4436 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select if you want to overwrite existing posts during the publishing process.", 'aiomatic-automatic-ai-content-writer') . '
4437 + </div>
4438 + </div>
4439 + <b>' . esc_html__("Overwrite Existing Posts", 'aiomatic-automatic-ai-content-writer') . ':</b>
4440 +
4441 + </td><td>
4442 + <input type="checkbox" id="overwrite_existing' . esc_html($cont) . '" name="aiomatic_youtube_list[overwrite_existing][]"';
4443 + if($overwrite_existing == '1')
4444 + {
4445 + $output .= ' checked';
4446 + }
4447 + $output .= '>
4448 +
4449 + </div>
4450 + </td></tr><tr><td>
4451 + <div>
4452 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4453 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select if you want to process added YouTube videos in order of entry or in random order.", 'aiomatic-automatic-ai-content-writer') . '
4454 + </div>
4455 + </div>
4456 + <b>' . esc_html__("Process Videos In Order Of Entry", 'aiomatic-automatic-ai-content-writer') . ':</b>
4457 +
4458 + </td><td>
4459 + <input type="checkbox" id="no_random' . esc_html($cont) . '" name="aiomatic_youtube_list[no_random][]"';
4460 + if($no_random == '1')
4461 + {
4462 + $output .= ' checked';
4463 + }
4464 + $output .= '>
4465 +
4466 + </div>
4467 + </td></tr><tr><td>
4468 + <div>
4469 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4470 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Run regex on post content. To disable this feature, leave this field blank. No Regex separators are required here. You can add multiple Regex expressions, each on a different line.", 'aiomatic-automatic-ai-content-writer') . '
4471 + </div>
4472 + </div>
4473 + <b>' . esc_html__("Run Regex On Content", 'aiomatic-automatic-ai-content-writer') . ':</b>
4474 +
4475 + </td><td>
4476 + <textarea rows="1" class="cr_width_full" name="aiomatic_youtube_list[strip_by_regex][]" placeholder="regex" class="cr_width_full">' . esc_textarea($strip_by_regex) . '</textarea>
4477 +
4478 + </div>
4479 + </td></tr><tr><td>
4480 + <div>
4481 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4482 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Replace the above regex matches with this regex expression. If you want to strip matched content, leave this field blank. No Regex separators are required here. You can add multiple replacement expressions, each on a different line.", 'aiomatic-automatic-ai-content-writer') . '
4483 + </div>
4484 + </div>
4485 + <b>' . esc_html__("Replace Matches From Regex (Content)", 'aiomatic-automatic-ai-content-writer') . ':</b>
4486 +
4487 + </td><td>
4488 + <textarea rows="1" class="cr_width_full" name="aiomatic_youtube_list[replace_regex][]" placeholder="regex replacement" class="cr_width_full">' . esc_textarea($replace_regex) . '</textarea>
4489 +
4490 + </div>
4491 + </td></tr><tr><td>
4492 + <div>
4493 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4494 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the author that you want to assign for the automatically generated posts.", 'aiomatic-automatic-ai-content-writer') . '
4495 + </div>
4496 + </div>
4497 + <b>' . esc_html__("Post Author", 'aiomatic-automatic-ai-content-writer') . ':</b>
4498 + </td><td class="cr_min_width_200">
4499 + <select autocomplete="off" id="post_author' . esc_html($cont) . '" name="aiomatic_youtube_list[post_author][]" class="cr_width_full">';
4500 + $output .= '<option value="rand"';
4501 + if ($post_user_name == "rand") {
4502 + $output .= " selected";
4503 + }
4504 + $output .= '>' . esc_html__("Random user", 'aiomatic-automatic-ai-content-writer') . '</option>';
4505 + $blogusers = get_users( [ 'role__in' => [ 'contributor', 'author', 'editor', 'administrator' ] ] );
4506 + foreach ($blogusers as $user) {
4507 + $output .= '<option value="' . esc_html($user->ID) . '"';
4508 + if ($post_user_name == $user->ID) {
4509 + $output .= " selected";
4510 + }
4511 + $output .= '>' . esc_html($user->display_name) . '</option>';
4512 + }
4513 + $output .= '</select>
4514 + </div>
4515 + </td></tr><tr><td>
4516 + <div>
4517 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4518 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the status that you want for the automatically generated posts to have.", 'aiomatic-automatic-ai-content-writer') . '
4519 + </div>
4520 + </div>
4521 + <b>' . esc_html__("Post Status", 'aiomatic-automatic-ai-content-writer') . ':</b>
4522 + </td><td class="cr_min_width_200">
4523 + <select autocomplete="off" id="submit_status' . esc_html($cont) . '" name="aiomatic_youtube_list[submit_status][]" class="cr_width_full">
4524 + <option value="pending"';
4525 + if ($status == 'pending') {
4526 + $output .= ' selected';
4527 + }
4528 + $output .= '>' . esc_html__("Pending -> Moderate", 'aiomatic-automatic-ai-content-writer') . '</option>
4529 + <option value="draft"';
4530 + if ($status == 'draft') {
4531 + $output .= ' selected';
4532 + }
4533 + $output .= '>' . esc_html__("Draft -> Moderate", 'aiomatic-automatic-ai-content-writer') . '</option>
4534 + <option value="publish"';
4535 + if ($status == 'publish') {
4536 + $output .= ' selected';
4537 + }
4538 + $output .= '>' . esc_html__("Published", 'aiomatic-automatic-ai-content-writer') . '</option>
4539 + <option value="private"';
4540 + if ($status == 'private') {
4541 + $output .= ' selected';
4542 + }
4543 + $output .= '>' . esc_html__("Private", 'aiomatic-automatic-ai-content-writer') . '</option>
4544 + <option value="trash"';
4545 + if ($status == 'trash') {
4546 + $output .= ' selected';
4547 + }
4548 + $output .= '>' . esc_html__("Trash", 'aiomatic-automatic-ai-content-writer') . '</option>
4549 + </select>
4550 + </div>
4551 + </td></tr><tr><td>
4552 + <div>
4553 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4554 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the type (post/page) for your automatically generated item.", 'aiomatic-automatic-ai-content-writer') . '
4555 + </div>
4556 + </div>
4557 + <b>' . esc_html__("Item Type", 'aiomatic-automatic-ai-content-writer') . ':</b>
4558 + </td><td class="cr_min_width_200">
4559 + <select autocomplete="off" id="default_type' . esc_html($cont) . '" name="aiomatic_youtube_list[default_type][]" class="cr_width_full" onchange="go_change_cats(this, \'' . esc_html($cont) . '\');">';
4560 + foreach ( get_post_types( '', 'names' ) as $post_type ) {
4561 + if(strstr($post_type, 'aiomatic_'))
4562 + {
4563 + continue;
4564 + }
4565 + $output .= '<option value="' . esc_attr($post_type) . '"';
4566 + if ($def_type == $post_type) {
4567 + $output .= ' selected';
4568 + }
4569 + $output .= '>' . esc_html($post_type) . '</option>';
4570 + }
4571 + $output .= '</select>
4572 + </div>
4573 + </td></tr><tr><td>
4574 + <div>
4575 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4576 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__('If your template supports "Post Formats", than you can select one here. If not, leave this at it\'s default value.', 'aiomatic-automatic-ai-content-writer') . '
4577 + </div>
4578 + </div>
4579 + <b>' . esc_html__("Generated Post Format", 'aiomatic-automatic-ai-content-writer') . ':</b>
4580 + </td><td>
4581 + <select autocomplete="off" id="post_format' . esc_html($cont) . '" name="aiomatic_youtube_list[post_format][]" class="cr_width_full">
4582 + <option value="post-format-standard"';
4583 + if ($post_format == 'post-format-standard') {
4584 + $output .= ' selected';
4585 + }
4586 + $output .= '>' . esc_html__("Standard", 'aiomatic-automatic-ai-content-writer') . '</option>
4587 + <option value="post-format-aside"';
4588 + if ($post_format == 'post-format-aside') {
4589 + $output .= ' selected';
4590 + }
4591 + $output .= '>' . esc_html__("Aside", 'aiomatic-automatic-ai-content-writer') . '</option>
4592 + <option value="post-format-gallery"';
4593 + if ($post_format == 'post-format-gallery') {
4594 + $output .= ' selected';
4595 + }
4596 + $output .= '>' . esc_html__("Gallery", 'aiomatic-automatic-ai-content-writer') . '</option>
4597 + <option value="post-format-link"';
4598 + if ($post_format == 'post-format-link') {
4599 + $output .= ' selected';
4600 + }
4601 + $output .= '>' . esc_html__("Link", 'aiomatic-automatic-ai-content-writer') . '</option>
4602 + <option value="post-format-image"';
4603 + if ($post_format == 'post-format-image') {
4604 + $output .= ' selected';
4605 + }
4606 + $output .= '>' . esc_html__("Image", 'aiomatic-automatic-ai-content-writer') . '</option>
4607 + <option value="post-format-quote"';
4608 + if ($post_format == 'post-format-quote') {
4609 + $output .= ' selected';
4610 + }
4611 + $output .= '>' . esc_html__("Quote", 'aiomatic-automatic-ai-content-writer') . '</option>
4612 + <option value="post-format-status"';
4613 + if ($post_format == 'post-format-status') {
4614 + $output .= ' selected';
4615 + }
4616 + $output .= '>' . esc_html__("Status", 'aiomatic-automatic-ai-content-writer') . '</option>
4617 + <option value="post-format-video"';
4618 + if ($post_format == 'post-format-video') {
4619 + $output .= ' selected';
4620 + }
4621 + $output .= '>' . esc_html__("Video", 'aiomatic-automatic-ai-content-writer') . '</option>
4622 + <option value="post-format-audio"';
4623 + if ($post_format == 'post-format-audio') {
4624 + $output .= ' selected';
4625 + }
4626 + $output .= '>' . esc_html__("Audio", 'aiomatic-automatic-ai-content-writer') . '</option>
4627 + <option value="post-format-chat"';
4628 + if ($post_format == 'post-format-chat') {
4629 + $output .= ' selected';
4630 + }
4631 + $output .= '>' . esc_html__("Chat", 'aiomatic-automatic-ai-content-writer') . '</option>
4632 + </select>
4633 + </div>
4634 + </td></tr><tr><td>
4635 + <div>
4636 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4637 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the ID of the parent of created posts. This is useful for BBPress integration, to assign forum IDs for created topics or for other similar functionalities.", 'aiomatic-automatic-ai-content-writer') . '
4638 + </div>
4639 + </div>
4640 + <b>' . esc_html__("Post Parent ID", 'aiomatic-automatic-ai-content-writer') . ':</b>
4641 +
4642 + </td><td>
4643 + <input type="text" class="cr_width_full" name="aiomatic_youtube_list[parent_id][]" value="' . esc_attr($parent_id) . '" placeholder="Post parent ID" class="cr_width_full">
4644 +
4645 + </div>
4646 + </td></tr><tr><td>
4647 + <div>
4648 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4649 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Do you want to enable comments for the generated posts?", 'aiomatic-automatic-ai-content-writer') . '
4650 + </div>
4651 + </div>
4652 + <b>' . esc_html__("Enable Comments For Posts", 'aiomatic-automatic-ai-content-writer') . ':</b>
4653 +
4654 + </td><td>
4655 + <input type="checkbox" id="enable_comments' . esc_html($cont) . '" name="aiomatic_youtube_list[enable_comments][]"';
4656 + if ($enable_comments == '1') {
4657 + $output .= ' checked';
4658 + }
4659 + $output .= '>
4660 +
4661 + </div>
4662 + </td></tr><tr><td>
4663 + <div>
4664 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4665 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Do you want to enable pingbacks and trackbacks for the generated posts?", 'aiomatic-automatic-ai-content-writer') . '
4666 + </div>
4667 + </div>
4668 + <b>' . esc_html__("Enable Pingback/Trackback", 'aiomatic-automatic-ai-content-writer') . ':</b>
4669 +
4670 + </td><td>
4671 + <input type="checkbox" id="enable_pingback' . esc_html($cont) . '" name="aiomatic_youtube_list[enable_pingback][]"';
4672 + if ($enable_pingback == '1') {
4673 + $output .= ' checked';
4674 + }
4675 + $output .= '>
4676 +
4677 + </div>
4678 + </td></tr><tr><td>
4679 + <div>
4680 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4681 + <div class="bws_hidden_help_text cr_min_260px">' . sprintf( wp_kses( __( "Do you want to set a custom post publish date for posts? Set the range in the below field Accepted values for this field are listed: <a href='%s' target='_blank'>here</a>. To disable this feature, leave this field blank.", 'aiomatic-automatic-ai-content-writer'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url_raw( 'https://www.php.net/manual/en/datetime.formats.php' ) ) . '
4682 + </div>
4683 + </div>
4684 + <b>' . esc_html__("Set a Custom Post Publish Date Range", 'aiomatic-automatic-ai-content-writer') . ':</b>
4685 +
4686 + </td><td>
4687 + <input type="text" id="min_time' . esc_html($cont) . '" name="aiomatic_youtube_list[min_time][]" placeholder="Start time" value="' . esc_attr($min_time) . '" class="cr_half"> - <input type="text" id="max_time' . esc_html($cont) . '" name="aiomatic_youtube_list[max_time][]" value="' . esc_attr($max_time) . '" placeholder="End time" class="cr_half">
4688 + </div>
4689 + </td></tr><tr><td class="cr_min_width_200">
4690 + <div>
4691 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4692 + <div class="bws_hidden_help_text_top cr_min_260px">' . esc_html__("Set the custom fields that will be set for generated posts. The syntax for this field is the following: custom_field_name1 => custom_field_value1, custom_field_name2 => custom_field_value2, ... . You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators. You can also use the following topic based shortcodes: %%post_title%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%%", 'aiomatic-automatic-ai-content-writer') . '
4693 + </div>
4694 + </div>
4695 + <b>' . esc_html__("Post Custom Fields", 'aiomatic-automatic-ai-content-writer') . ':</b>&nbsp;<b><a href="https://coderevolution.ro/knowledge-base/faq/post-template-reference-advanced-usage/" target="_blank">&#9432;</a></b>
4696 +
4697 + </td><td>
4698 + <textarea rows="1" cols="70" name="aiomatic_youtube_list[custom_fields][]" placeholder="Please insert your desired custom fields. Example: title_custom_field => %%post_title%%" class="cr_width_full">' . esc_textarea($custom_fields) . '</textarea>
4699 +
4700 + </div>
4701 + </td></tr><tr><td class="cr_min_width_200">
4702 + <div>
4703 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4704 + <div class="bws_hidden_help_text_top cr_min_260px">' . esc_html__("Set the custom taxonomies that will be set for generated posts. The syntax for this field is the following: custom_taxonomy_name1 => custom_taxonomy_value1A, custom_taxonomy_value1B; custom_taxonomy_name2 => custom_taxonomy_value2A, custom_taxonomy_value2B; ... . You can also set hierarhical taxonomies (parent > child), in this format: custom_taxonomy_name => parent1 > child1 . You will also be able to use the custom shortcodes defined in the 'Custom Shortcode Creator' feature from the rule settings - this will allow you to create partially or fully AI generated prompts which will be used for the content generators. You can also use the following topic based shortcodes: %%post_title%%, %%random_sentence%%, %%random_sentence2%%, %%blog_title%%", 'aiomatic-automatic-ai-content-writer') . '
4705 + </div>
4706 + </div>
4707 + <b>' . esc_html__("Post Custom Taxonomies", 'aiomatic-automatic-ai-content-writer') . ':</b>&nbsp;<b><a href="https://coderevolution.ro/knowledge-base/faq/post-template-reference-advanced-usage/" target="_blank">&#9432;</a></b>
4708 + </td><td>
4709 + <textarea rows="1" cols="70" name="aiomatic_youtube_list[custom_tax][]" placeholder="Please insert your desired custom taxonomies. Example: custom_taxonomy_name => %%post_title%%" class="cr_width_full">' . esc_textarea($custom_tax) . '</textarea>
4710 + </div>
4711 + </td></tr><tr><td>
4712 + <div>
4713 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4714 + <div class="bws_hidden_help_text_top cr_min_260px">' . esc_html__("Enter a 2 letter language code that will be assigned as the WPML/Polylang language for posts. Example: for German, input: de", 'aiomatic-automatic-ai-content-writer') . '
4715 + </div>
4716 + </div>
4717 + <b>' . esc_html__("Assign WPML/Polylang Language to Posts", 'aiomatic-automatic-ai-content-writer') . ':</b>
4718 +
4719 + </td><td>
4720 + <input type="text" class="cr_width_full" name="aiomatic_youtube_list[wpml_lang][]" value="' . esc_attr($wpml_lang) . '" placeholder="WPML/Polylang language" class="cr_width_full">
4721 +
4722 + </div>
4723 + </td></tr>
4724 + <tr><td colspan="2"><h3>' . esc_html__('Scheduling Restrictions', 'aiomatic-automatic-ai-content-writer') . ':</h3></td></tr><tr><td class="cr_min_width_200">
4725 + <div>
4726 + <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4727 + <div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the days of the week when you don't want to run this rule. You can enter a comma separate list of day names.", 'aiomatic-automatic-ai-content-writer') . '
4728 + </div>
4729 + </div>
4730 + <b>' . esc_html__("Do Not Run This Rule On The Following Days Of The Week", 'aiomatic-automatic-ai-content-writer') . ':</b>
4731 + <br/>' . esc_html__("Current Server Time:", 'aiomatic-automatic-ai-content-writer') . '&nbsp;' . date('l', time()) . ', ' . date("Y-m-d H:i:s") . '
4732 + </td><td>
4733 + <input type="text" class="cr_width_full" name="aiomatic_youtube_list[days_no_run][]" value="' . esc_attr($days_no_run) . '" placeholder="Mo,Tu,We,Th,Fr,Sa,Su" class="cr_width_full">
4734 + </div>
4735 + </td></tr></table></div>
4736 + </div>
4737 + <div class="codemodalfzr-footer">
4738 + <br/>
4739 + <h3 class="cr_inline">Aimogen Automatic Post Generator</h3><span id="aiomatic_ok' . esc_html($cont) . '" class="codeokfzr cr_inline">OK&nbsp;</span>
4740 + <br/><br/>
4741 + </div>
4742 + </div>
4743 +
4744 + </div>
4745 + </td>
4746 + <td class="cr_shrt_td2"><span class="wpaiomatic-delete">X</span></td>
4747 + <td class="cr_short_td"><input type="checkbox" name="aiomatic_youtube_list[active][]" class="activateDeactivateClass" value="1"';
4748 + if (isset($active) && $active === '1') {
4749 + $output .= ' checked';
4750 + }
4751 + $output .= '/>
4752 + <input type="hidden" name="aiomatic_youtube_list[last_run][]" value="' . esc_attr($last_run) . '"/>
4753 + <input type="hidden" name="aiomatic_youtube_list[rule_unique_id][]" value="' . esc_attr($rule_unique_id) . '"/></td>
4754 + <td class="cr_shrt_td2"><div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4755 + <div class="bws_hidden_help_text cr_min_260px">' . sprintf( wp_kses( __( 'Shortcode for this rule<br/>(to cross-post from this plugin in other plugins):', 'aiomatic-automatic-ai-content-writer'), array( 'br' => array( ) ) ) ) . '<br/><b>%%aiomatic_1_' . esc_html($cont) . '%% and %%aiomatic_title_1_' . esc_html($cont) . '%%</b><br/>' . esc_html__('Posts Generated:', 'aiomatic-automatic-ai-content-writer') . ' ' . esc_html($generated_posts) . '<br/>';
4756 + if ($generated_posts != 0) {
4757 + $output .= '<a href="' . get_admin_url() . 'edit.php?coderevolution_post_source=Aiomatic_1_' . esc_html($cont) . '&post_type=' . esc_html($def_type) . '" target="_blank">' . esc_html__('View Generated Posts', 'aiomatic-automatic-ai-content-writer') . '</a><br/>';
4758 + }
4759 + $output .= esc_html__('Last Run: ', 'aiomatic-automatic-ai-content-writer');
4760 + if ($last_run == '1988-01-27 00:00:00') {
4761 + $output .= 'Never';
4762 + } else {
4763 + $output .= $last_run;
4764 + }
4765 + $output .= '<br/>' . esc_html__('Next Run: ', 'aiomatic-automatic-ai-content-writer');
4766 + if($unlocker == '1')
4767 + {
4768 + $nextrun = aiomatic_add_minute($last_run, $schedule);
4769 + }
4770 + else
4771 + {
4772 + $nextrun = aiomatic_add_hour($last_run, $schedule);
4773 + }
4774 + $now = aiomatic_get_date_now();
4775 + if (isset($active) && $active === '1') {
4776 + if($unlocker == '1')
4777 + {
4778 + $aiomatic_hour_diff = (int)aiomatic_minute_diff($now, $nextrun);
4779 + }
4780 + else
4781 + {
4782 + $aiomatic_hour_diff = (int)aiomatic_hour_diff($now, $nextrun);
4783 + }
4784 + if ($aiomatic_hour_diff >= 0) {
4785 + if($unlocker == '1')
4786 + {
4787 + $append = 'Now.';
4788 + }
4789 + else
4790 + {
4791 + $append = 'Now.';
4792 + }
4793 + $cron = _get_cron_array();
4794 + if ($cron != FALSE) {
4795 + $date_format = _x('Y-m-d H:i:s', 'Date Time Format1', 'aiomatic-automatic-ai-content-writer');
4796 + foreach ($cron as $timestamp => $cronhooks) {
4797 + foreach ((array) $cronhooks as $hook => $events) {
4798 + if ($hook == 'aiomaticaction') {
4799 + foreach ((array) $events as $key => $event) {
4800 + $append = date_i18n($date_format, $timestamp);
4801 + }
4802 + }
4803 + }
4804 + }
4805 + }
4806 + $output .= $append;
4807 + } else {
4808 + $output .= $nextrun;
4809 + }
4810 + } else {
4811 + $output .= esc_html__('Rule Disabled', 'aiomatic-automatic-ai-content-writer');
4812 + }
4813 + $output .= '<br/>' . esc_html__('Local Time: ', 'aiomatic-automatic-ai-content-writer') . $now;
4814 + if(isset($aiomatic_Main_Settings['rule_webhook']) && $aiomatic_Main_Settings['rule_webhook'] == 'on')
4815 + {
4816 + $attsx = array();
4817 + $attsx['secret'] = aiomatic_generate_site_secret();
4818 + $attsx['ruleid'] = $cont;
4819 + $attsx['ruletype'] = '1';
4820 + $queryParams = http_build_query($attsx);
4821 + $webhookUrl = esc_url(get_site_url() . '/wp-json/aiomatic/v1/rules?' . $queryParams);
4822 + $webhookUrl = '<a href="' . $webhookUrl . '" target="_blank">' . $webhookUrl . '</a>';
4823 + $output .= '<br/>' . esc_html__('Webhook To Run Rule: ', 'aiomatic-automatic-ai-content-writer') . '<br/>' . $webhookUrl;
4824 + }
4825 + $output .= '</div>
4826 + </div></td>
4827 + <td class="cr_center">
4828 + <div>
4829 + <img id="run_img' . esc_html($cont) . '" src="' . plugin_dir_url(dirname(__FILE__)) . 'images/running.gif' . '" alt="Running" class="cr_status_icon';
4830 + if (!empty($running)) {
4831 + if (!in_array(array($cont => 1), $running)) {
4832 + $f = fopen(get_temp_dir() . 'aiomatic_1_' . $cont, 'w');
4833 + if($f !== false)
4834 + {
4835 + flock($f, LOCK_UN);
4836 + fclose($f);
4837 + global $wp_filesystem;
4838 + if ( ! is_a( $wp_filesystem, 'WP_Filesystem_Base') ){
4839 + include_once(ABSPATH . 'wp-admin/includes/file.php');$creds = request_filesystem_credentials( site_url() );
4840 + wp_filesystem($creds);
4841 + }
4842 + $wp_filesystem->delete(get_temp_dir() . 'aiomatic_1_' . $cont);
4843 + }
4844 + $output .= ' cr_hidden';
4845 + }
4846 + else
4847 + {
4848 + $f = fopen(get_temp_dir() . 'aiomatic_1_' . $cont, 'w');
4849 + if($f !== false)
4850 + {
4851 + if (!flock($f, LOCK_EX | LOCK_NB)) {
4852 + }
4853 + else
4854 + {
4855 + $output .= ' cr_hidden';
4856 + flock($f, LOCK_UN);
4857 + if (($xxkey = array_search(array($cont => 1), $running)) !== false) {
4858 + unset($running[$xxkey]);
4859 + aiomatic_update_option('aiomatic_running_list', $running);
4860 + }
4861 + }
4862 + }
4863 + }
4864 + }
4865 + else
4866 + {
4867 + $f = fopen(get_temp_dir() . 'aiomatic_1_' . $cont, 'w');
4868 + if($f !== false)
4869 + {
4870 + flock($f, LOCK_UN);
4871 + fclose($f);
4872 + global $wp_filesystem;
4873 + if ( ! is_a( $wp_filesystem, 'WP_Filesystem_Base') ){
4874 + include_once(ABSPATH . 'wp-admin/includes/file.php');$creds = request_filesystem_credentials( site_url() );
4875 + wp_filesystem($creds);
4876 + }
4877 + $wp_filesystem->delete(get_temp_dir() . 'aiomatic_1_' . $cont);
4878 + }
4879 + $output .= ' cr_hidden';
4880 + }
4881 + $output .= '" title="status">
4882 + <div class="codemainfzr cr_width_80p">
4883 + <select autocomplete="off" class="codemainfzr" id="actions' . esc_html($cont) . '" class="actions" name="actions" onchange="actionsChangedManual(' . esc_html($cont) . ', this.value, 1, \'' . esc_html($rule_unique_id) . '\');" onfocus="this.selectedIndex = 0;">
4884 + <option value="select" disabled selected>' . esc_html__("Select an Action", 'aiomatic-automatic-ai-content-writer') . '</option>
4885 + <option value="run">' . esc_html__("Run This Rule Now", 'aiomatic-automatic-ai-content-writer') . '</option>
4886 + <option value="duplicate">' . esc_html__("Duplicate This Rule", 'aiomatic-automatic-ai-content-writer') . '</option>
4887 + <option value="up">' . esc_html__("Move This Rule Up", 'aiomatic-automatic-ai-content-writer') . '</option>
4888 + <option value="down">' . esc_html__("Move This Rule Down", 'aiomatic-automatic-ai-content-writer') . '</option>
4889 + <option value="trash">' . esc_html__("Send All Posts To Trash", 'aiomatic-automatic-ai-content-writer') . '</option>
4890 + <option value="delete">' . esc_html__("Permanently Delete All Posts", 'aiomatic-automatic-ai-content-writer') . '</option>
4891 + </select>
4892 + </div>
4893 + </div>
4894 + </td>
4895 + </tr>
4896 + ';
4897 + $cont = $cont + 1;
4898 + }
4899 + }
4900 + return $output;
4901 + }
4902 + ?>