Changeset 3241565
- Timestamp:
- 02/17/2025 03:25:22 AM (13 months ago)
- Location:
- ai-content-generation
- Files:
-
- 61 added
- 3 edited
-
tags/1.2.92 (added)
-
tags/1.2.92/assets (added)
-
tags/1.2.92/assets/css (added)
-
tags/1.2.92/assets/css/admin.css (added)
-
tags/1.2.92/assets/css/jquery-ui.css (added)
-
tags/1.2.92/assets/css/sweetalert2.min.css (added)
-
tags/1.2.92/assets/img (added)
-
tags/1.2.92/assets/img/Video.png (added)
-
tags/1.2.92/assets/img/icon.svg (added)
-
tags/1.2.92/assets/img/logo.png (added)
-
tags/1.2.92/assets/img/logo.svg (added)
-
tags/1.2.92/assets/js (added)
-
tags/1.2.92/assets/js/admin.js (added)
-
tags/1.2.92/assets/js/classic-editor.js (added)
-
tags/1.2.92/assets/js/post-generator.js (added)
-
tags/1.2.92/assets/js/seo.js (added)
-
tags/1.2.92/assets/js/showdown.min.js (added)
-
tags/1.2.92/assets/js/sweetalert2.all.min.js (added)
-
tags/1.2.92/assets/js/vue.global.js (added)
-
tags/1.2.92/assets/js/woocommerce.js (added)
-
tags/1.2.92/assets/js/wpwand-gutenberg.js (added)
-
tags/1.2.92/inc (added)
-
tags/1.2.92/inc/Finestics (added)
-
tags/1.2.92/inc/Finestics/Client.php (added)
-
tags/1.2.92/inc/Finestics/Insights.php (added)
-
tags/1.2.92/inc/WooCommerce.php (added)
-
tags/1.2.92/inc/admin.php (added)
-
tags/1.2.92/inc/api.php (added)
-
tags/1.2.92/inc/config.php (added)
-
tags/1.2.92/inc/data.php (added)
-
tags/1.2.92/inc/editor.php (added)
-
tags/1.2.92/inc/frontend.php (added)
-
tags/1.2.92/inc/gutenberg.php (added)
-
tags/1.2.92/inc/helper-functions.php (added)
-
tags/1.2.92/inc/modules (added)
-
tags/1.2.92/inc/modules/elementor (added)
-
tags/1.2.92/inc/modules/elementor/assets (added)
-
tags/1.2.92/inc/modules/elementor/assets/css (added)
-
tags/1.2.92/inc/modules/elementor/assets/css/editor.css (added)
-
tags/1.2.92/inc/modules/elementor/assets/css/jquery-ui.css (added)
-
tags/1.2.92/inc/modules/elementor/assets/img (added)
-
tags/1.2.92/inc/modules/elementor/assets/img/Video.png (added)
-
tags/1.2.92/inc/modules/elementor/assets/img/icon.png (added)
-
tags/1.2.92/inc/modules/elementor/assets/img/icon.svg (added)
-
tags/1.2.92/inc/modules/elementor/assets/js (added)
-
tags/1.2.92/inc/modules/elementor/assets/js/editor.js (added)
-
tags/1.2.92/inc/modules/elementor/assets/js/showdown.min.js (added)
-
tags/1.2.92/inc/modules/elementor/inc (added)
-
tags/1.2.92/inc/modules/elementor/inc/controls (added)
-
tags/1.2.92/inc/modules/elementor/inc/controls/text.php (added)
-
tags/1.2.92/inc/modules/elementor/inc/controls/textarea.php (added)
-
tags/1.2.92/inc/modules/elementor/inc/controls/wysiwyg.php (added)
-
tags/1.2.92/inc/modules/elementor/inc/elementor.php (added)
-
tags/1.2.92/inc/modules/elementor/readme.txt (added)
-
tags/1.2.92/inc/modules/elementor/wp-wand-elementor.php (added)
-
tags/1.2.92/inc/post-generator.php (added)
-
tags/1.2.92/inc/view (added)
-
tags/1.2.92/inc/view/post-generator.php (added)
-
tags/1.2.92/inc/white-label.php (added)
-
tags/1.2.92/readme.txt (added)
-
tags/1.2.92/wp-wand.php (added)
-
trunk/inc/data.php (modified) (10 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/wp-wand.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ai-content-generation/trunk/inc/data.php
r3241564 r3241565 8 8 add_action('plugins_loaded', 'wpwand_load_template_strings', 0); 9 9 10 function wpwand_load_template_strings() { 10 function wpwand_load_template_strings() 11 { 11 12 // Hardcode all possible template strings that could come from the API 12 13 $template_strings = array( … … 36 37 __('Facebook Post', 'wp-wand'), 37 38 __('Generate a highly engaging post for Facebook', 'wp-wand'), 38 39 39 40 // Pro Templates 40 41 __('Meta Title', 'wp-wand'), … … 126 127 function wpwand_templates() 127 128 { 128 wpwand_sync_transient(); 129 129 130 $all_prompts = get_option('wpwand_data'); 130 131 $custom_data = get_option('wpwand_custom_data', []); 131 132 wpwand_sync_transient(); 132 133 if (get_option('wpwand_pro_activated') == 'activation') { 133 134 wpwand_sync_date(); … … 135 136 } 136 137 if (isset($all_prompts['free']) && isset($all_prompts['pro'])) { 137 // Translate the template strings 138 foreach ($all_prompts as $type => $templates) { 139 foreach ($templates as $key => $template) { 140 if (isset($template['title'])) { 141 $all_prompts[$type][$key]['title'] = __($template['title'], 'wp-wand'); 142 } 143 if (isset($template['description'])) { 144 $all_prompts[$type][$key]['description'] = __($template['description'], 'wp-wand'); 145 } 146 if (isset($template['prompt'])) { 147 $all_prompts[$type][$key]['prompt'] = __($template['prompt'], 'wp-wand'); 148 } 149 } 150 } 138 151 139 return array_merge($custom_data, $all_prompts['free'], $all_prompts['pro']); 152 140 } 153 141 return []; 154 142 } 143 155 144 function wpwand_sync_date() 156 145 { 157 if (defined('DOING_AJAX')){158 if (!isset($_POST['nonce']) || !wp_verify_nonce(sanitize_text_field( wp_unslash( $_POST['nonce'] )), 'wpwand_global_nonce')) {146 if (defined('DOING_AJAX')) { 147 if (!isset($_POST['nonce']) || !wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['nonce'])), 'wpwand_global_nonce')) { 159 148 wp_send_json_error('Nonce verification failed.', 403); 160 149 } … … 166 155 wpwand_get_data(true); 167 156 } 168 169 170 157 } 171 158 add_action('wp_ajax_wpwand_sync_date', 'wpwand_sync_date'); … … 218 205 219 206 // Add a helper function to retrieve and translate the stored strings 220 function wpwand_translate_template_string($string) { 207 function wpwand_translate_template_string($string) 208 { 221 209 if (empty($string)) { 222 210 return $string; … … 230 218 } 231 219 } 232 220 233 221 return $string; 234 222 } … … 293 281 'Vietnamese' => 'vi', 294 282 ]; 295 296 283 } 297 284 … … 397 384 398 385 // Add this new function 399 function wpwand_register_template_strings() { 386 function wpwand_register_template_strings() 387 { 400 388 $templates = get_option('wpwand_data'); 401 389 402 390 if (!empty($templates) && is_array($templates)) { 403 391 foreach ($templates as $type => $type_templates) { … … 421 409 // Add this action hook at the end of the file 422 410 add_action('init', 'wpwand_register_template_strings'); 423 -
ai-content-generation/trunk/readme.txt
r3241564 r3241565 5 5 Requires at least: 5.0 6 6 Tested up to: 6.7.2 7 Stable Tag: 1.2.9 17 Stable Tag: 1.2.92 8 8 License: GPL-2.0+ 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.txt -
ai-content-generation/trunk/wp-wand.php
r3241564 r3241565 5 5 * Plugin URI: https://wpwand.com/ 6 6 * Description: WP Wand is a AI content generation plugin for WordPress that helps your team create high quality content 10X faster and 50x cheaper. No monthly subscription required. 7 * Version: 1.2.9 17 * Version: 1.2.92 8 8 * Author: WP Wand 9 9 * Author URI: https://wpwand.com/
Note: See TracChangeset
for help on using the changeset viewer.