Changeset 2964507
- Timestamp:
- 09/08/2023 01:10:58 PM (3 years ago)
- Location:
- ai-content-generation
- Files:
-
- 88 added
- 9 edited
-
tags/1.2.0 (added)
-
tags/1.2.0/assets (added)
-
tags/1.2.0/assets/css (added)
-
tags/1.2.0/assets/css/admin.css (added)
-
tags/1.2.0/assets/css/jquery-ui.css (added)
-
tags/1.2.0/assets/css/sweetalert2.min.css (added)
-
tags/1.2.0/assets/img (added)
-
tags/1.2.0/assets/img/Video.png (added)
-
tags/1.2.0/assets/img/icon.svg (added)
-
tags/1.2.0/assets/img/logo.png (added)
-
tags/1.2.0/assets/img/logo.svg (added)
-
tags/1.2.0/assets/js (added)
-
tags/1.2.0/assets/js/admin.js (added)
-
tags/1.2.0/assets/js/classic-editor.js (added)
-
tags/1.2.0/assets/js/post-generator.js (added)
-
tags/1.2.0/assets/js/seo.js (added)
-
tags/1.2.0/assets/js/sweetalert2.all.min.js (added)
-
tags/1.2.0/assets/js/vue.global.js (added)
-
tags/1.2.0/assets/js/woocommerce.js (added)
-
tags/1.2.0/assets/js/wpwand-gutenberg.js (added)
-
tags/1.2.0/inc (added)
-
tags/1.2.0/inc/Finestics (added)
-
tags/1.2.0/inc/Finestics/Client.php (added)
-
tags/1.2.0/inc/Finestics/Insights.php (added)
-
tags/1.2.0/inc/WooCommerce.php (added)
-
tags/1.2.0/inc/admin.php (added)
-
tags/1.2.0/inc/api.php (added)
-
tags/1.2.0/inc/config.php (added)
-
tags/1.2.0/inc/data.php (added)
-
tags/1.2.0/inc/editor.php (added)
-
tags/1.2.0/inc/frontend.php (added)
-
tags/1.2.0/inc/gutenberg.php (added)
-
tags/1.2.0/inc/helper-functions.php (added)
-
tags/1.2.0/inc/modules (added)
-
tags/1.2.0/inc/modules/elementor (added)
-
tags/1.2.0/inc/modules/elementor/assets (added)
-
tags/1.2.0/inc/modules/elementor/assets/css (added)
-
tags/1.2.0/inc/modules/elementor/assets/css/editor.css (added)
-
tags/1.2.0/inc/modules/elementor/assets/css/jquery-ui.css (added)
-
tags/1.2.0/inc/modules/elementor/assets/img (added)
-
tags/1.2.0/inc/modules/elementor/assets/img/Video.png (added)
-
tags/1.2.0/inc/modules/elementor/assets/img/icon.png (added)
-
tags/1.2.0/inc/modules/elementor/assets/img/icon.svg (added)
-
tags/1.2.0/inc/modules/elementor/assets/js (added)
-
tags/1.2.0/inc/modules/elementor/assets/js/editor.js (added)
-
tags/1.2.0/inc/modules/elementor/inc (added)
-
tags/1.2.0/inc/modules/elementor/inc/controls (added)
-
tags/1.2.0/inc/modules/elementor/inc/controls/text.php (added)
-
tags/1.2.0/inc/modules/elementor/inc/controls/textarea.php (added)
-
tags/1.2.0/inc/modules/elementor/inc/controls/wysiwyg.php (added)
-
tags/1.2.0/inc/modules/elementor/inc/elementor.php (added)
-
tags/1.2.0/inc/modules/elementor/readme.txt (added)
-
tags/1.2.0/inc/modules/elementor/wp-wand-elementor.php (added)
-
tags/1.2.0/inc/post-generator.php (added)
-
tags/1.2.0/inc/view (added)
-
tags/1.2.0/inc/view/post-generator.php (added)
-
tags/1.2.0/inc/white-label.php (added)
-
tags/1.2.0/readme.txt (added)
-
tags/1.2.0/vendor (added)
-
tags/1.2.0/vendor/orhanerday (added)
-
tags/1.2.0/vendor/orhanerday/open-ai (added)
-
tags/1.2.0/vendor/orhanerday/open-ai/LICENSE.md (added)
-
tags/1.2.0/vendor/orhanerday/open-ai/README.md (added)
-
tags/1.2.0/vendor/orhanerday/open-ai/src (added)
-
tags/1.2.0/vendor/orhanerday/open-ai/src/OpenAi.php (added)
-
tags/1.2.0/vendor/orhanerday/open-ai/src/Url.php (added)
-
tags/1.2.0/vendor/wp-background-processing (added)
-
tags/1.2.0/vendor/wp-background-processing/.circleci (added)
-
tags/1.2.0/vendor/wp-background-processing/.circleci/config.yml (added)
-
tags/1.2.0/vendor/wp-background-processing/.gitignore (added)
-
tags/1.2.0/vendor/wp-background-processing/.phpcs.xml (added)
-
tags/1.2.0/vendor/wp-background-processing/Makefile (added)
-
tags/1.2.0/vendor/wp-background-processing/README.md (added)
-
tags/1.2.0/vendor/wp-background-processing/bin (added)
-
tags/1.2.0/vendor/wp-background-processing/bin/install-wp-tests.sh (added)
-
tags/1.2.0/vendor/wp-background-processing/classes (added)
-
tags/1.2.0/vendor/wp-background-processing/classes/wp-async-request.php (added)
-
tags/1.2.0/vendor/wp-background-processing/classes/wp-background-process.php (added)
-
tags/1.2.0/vendor/wp-background-processing/composer.json (added)
-
tags/1.2.0/vendor/wp-background-processing/composer.lock (added)
-
tags/1.2.0/vendor/wp-background-processing/license.txt (added)
-
tags/1.2.0/vendor/wp-background-processing/phpunit.xml (added)
-
tags/1.2.0/vendor/wp-background-processing/tests (added)
-
tags/1.2.0/vendor/wp-background-processing/tests/Test_Setup.php (added)
-
tags/1.2.0/vendor/wp-background-processing/tests/Test_WP_Background_Process.php (added)
-
tags/1.2.0/vendor/wp-background-processing/tests/bootstrap.php (added)
-
tags/1.2.0/vendor/wp-background-processing/wp-background-processing.php (added)
-
tags/1.2.0/wp-wand.php (added)
-
trunk/assets/css/admin.css (modified) (9 diffs)
-
trunk/assets/js/admin.js (modified) (5 diffs)
-
trunk/assets/js/post-generator.js (modified) (1 diff)
-
trunk/inc/api.php (modified) (8 diffs)
-
trunk/inc/config.php (modified) (2 diffs)
-
trunk/inc/data.php (modified) (4 diffs)
-
trunk/inc/frontend.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/wp-wand.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ai-content-generation/trunk/assets/css/admin.css
r2961912 r2964507 228 228 } 229 229 230 .wpwand-form-field input ,230 .wpwand-form-field input:not([type=checkbox]), 231 231 .wpwand-form-field select { 232 232 width: 100%; … … 474 474 border-radius: 10px; 475 475 position: relative; 476 min-height: 920px;476 min-height: fit-content; 477 477 padding-bottom: 30px; 478 478 } … … 507 507 box-shadow: unset; 508 508 outline: none; 509 background-color: #fff !important; 509 510 } 510 511 … … 2511 2512 } 2512 2513 2513 .wpwand-pcgf-heading-content input[type=checkbox] { 2514 .wpwand-pcgf-heading-content input[type=checkbox], 2515 .wpwand-form-field input[type=checkbox] { 2514 2516 margin: 0; 2515 2517 margin-right: 10px; … … 2522 2524 text-align: center; 2523 2525 border: 1px solid #8c8f9454; 2524 } 2525 2526 .wpwand-pcgf-heading-content input[type=checkbox]:checked { 2526 display: inline-flex; 2527 } 2528 2529 .wpwand-pcgf-heading-content input[type=checkbox]:checked, 2530 .wpwand-form-field input[type=checkbox]:checked { 2527 2531 background-color: var(--wpwand-brand-color); 2528 2532 } 2529 2533 2530 .wpwand-pcgf-heading-content input[type=checkbox]:checked::before { 2534 .wpwand-pcgf-heading-content input[type=checkbox]:checked::before, 2535 .wpwand-form-field input[type=checkbox]:checked::before { 2531 2536 content: '\2714'; 2532 2537 /* Unicode character for checkmark */ … … 2764 2769 border-radius: 4px; 2765 2770 background-color: #fff; 2771 } 2772 2773 .swal2-popup.swal2-modal.wpwand-swal-alert { 2774 width: 390px; 2775 padding: 30px 40px; 2766 2776 } 2767 2777 … … 2961 2971 } 2962 2972 2963 .wpwand- pgf-tabs {2973 .wpwand-nasted-tabs { 2964 2974 display: flex; 2965 2975 align-items: center; … … 2970 2980 } 2971 2981 2972 .wpwand- pgf-tabs a {2982 .wpwand-nasted-tabs a { 2973 2983 color: var(--neutral-07, #080E13); 2974 2984 text-align: center; … … 2986 2996 } 2987 2997 2988 .wpwand- pgf-tabs a:first-child {2998 .wpwand-nasted-tabs a:first-child { 2989 2999 border-right: 1px solid var(--neutral-03, #D1D6DB); 2990 3000 } 2991 3001 2992 .wpwand- pgf-tabs a.active {3002 .wpwand-nasted-tabs a.active { 2993 3003 background: var(--neutral-02, #EAEDF0); 2994 3004 } 3005 3006 .wpwand-form-field.wpwand-radio-field-wrap { 3007 display: flex; 3008 align-items: center; 3009 flex-wrap: wrap; 3010 gap: 10px 15px; 3011 } 3012 3013 .wpwand-form-field.wpwand-radio-field-wrap h4 { 3014 flex: 0 0 100%; 3015 font-weight: 600; 3016 color: #080E13; 3017 font-size: 14px; 3018 margin: 0; 3019 } 3020 3021 .wpwand-form-field.wpwand-radio-field-wrap label.wpwand-radio-label { 3022 font-weight: 400 !important; 3023 color: var(--neutral-05, #454F5C); 3024 display: inline-flex; 3025 align-items: center; 3026 } 3027 3028 3029 /* wpwand table */ 3030 .wpwand-table-wrap table.wp-list-table th { 3031 font-size: 14px; 3032 font-family: Inter; 3033 font-weight: 500; 3034 line-height: 20px; 3035 border-top: none; 3036 color: #080E13; 3037 padding: 20px; 3038 border-bottom: 1px solid rgb(22 22 23 / 7%); 3039 } 3040 3041 3042 .wpwand-table-wrap table.wp-list-table { 3043 border: none; 3044 border-radius: 10px; 3045 } 3046 3047 .wpwand-table-wrap table.wp-list-table td { 3048 padding: 15px 20px; 3049 border-bottom: 1px solid rgb(22 22 23 / 7%); 3050 font-size: 14px; 3051 font-family: Inter; 3052 line-height: 20px; 3053 color: #18181B; 3054 font-weight: 400; 3055 display: table-cell; 3056 } 3057 3058 .wpwand-table-wrap table.wp-list-table tr { 3059 background-color: #fff; 3060 } 3061 3062 3063 3064 .wpwand-table-wrap a { 3065 color: var(--wpwand-brand-color); 3066 } 3067 3068 3069 .wpwand-table-wrap table.wp-list-table td.wpwand-table-action { 3070 text-align: right; 3071 } 3072 3073 a.wpwand-table-btn { 3074 display: inline-flex; 3075 padding: 4px 12px; 3076 flex-direction: column; 3077 justify-content: center; 3078 align-items: center; 3079 gap: 10px; 3080 border-radius: 4px; 3081 background: var(--neutral-05, #454F5C); 3082 color: #fff; 3083 margin-left: 10px; 3084 /* Semi-bold/13px */ 3085 font-size: 14px; 3086 font-family: Inter; 3087 font-weight: 500; 3088 line-height: 21px; 3089 } 3090 3091 a.wpwand-table-btn.delete { 3092 background-color: #EE2626; 3093 } 3094 3095 .wpwand-table-wrap .pagination-wrap { 3096 margin: 20px 0; 3097 display: flex; 3098 border: 1px solid #E4E4E7; 3099 width: fit-content; 3100 } 3101 3102 .wpwand-table-wrap .pagination-wrap a, 3103 .wpwand-table-wrap .pagination-wrap span { 3104 box-shadow: unset; 3105 display: block; 3106 padding: 8px 13px; 3107 border: none; 3108 border-right: 1px solid #E4E4E7; 3109 text-decoration: none; 3110 background-color: #fff; 3111 color: #333; 3112 margin: 0; 3113 } 3114 3115 3116 .wpwand-table-wrap .pagination-wrap a:last-child, 3117 .wpwand-table-wrap .pagination-wrap span:last-child { 3118 border-right: none; 3119 } 3120 3121 .wpwand-table-wrap .pagination-wrap .current { 3122 color: var(--wpwand-brand-color); 3123 border: 1px solid var(--wpwand-brand-color) !important; 3124 } 3125 3126 .wpwand-table-metas { 3127 display: flex; 3128 flex-wrap: wrap; 3129 align-items: center; 3130 width: 100%; 3131 position: relative; 3132 margin-bottom: 24px; 3133 } 3134 3135 .wpwand-table-metas a.wpwand-table-btn.delete { 3136 position: absolute; 3137 right: 0; 3138 top: 0; 3139 text-decoration: none; 3140 } 3141 3142 .wpwand-table-metas .wpwand-table-meta { 3143 margin-right: 40px; 3144 /* Body/14px/Regular */ 3145 font-size: 14px; 3146 font-family: Inter; 3147 line-height: 20px; 3148 } 3149 3150 .wpwand-table-content { 3151 padding: 20px 25px; 3152 background-color: #fff; 3153 border-radius: 10px; 3154 font-family: Inter; 3155 min-height: 200px; 3156 } 3157 3158 3159 3160 .wpwand-markdown.wpwand-table-content h1 { 3161 font-weight: 600; 3162 padding: 0; 3163 margin: 15px 0; 3164 } 3165 3166 .wpwand-table-wrap { 3167 /* padding: 27px 20px; */ 3168 } 3169 3170 .wpwand-table-wrap h1 { 3171 margin-bottom: 30px; 3172 text-transform: capitalize; 3173 } -
ai-content-generation/trunk/assets/js/admin.js
r2961128 r2964507 9 9 10 10 11 // pgf tabs 12 const $nasted_tabs = $('.wpwand-nasted-tabs a'); 13 const $nasted_item = $('.wpwand-nasted-item'); 14 15 $nasted_item.not('.active').hide(); 16 17 $nasted_tabs.on('click', function (e) { 18 e.preventDefault(); 19 20 const $this = $(this); 21 const tab_id = $this.data('id'); 22 23 $nasted_tabs.removeClass('active'); 24 $nasted_item.removeClass('active'); 25 $this.addClass('active'); 26 $('#' + tab_id).show(); 27 $nasted_item.not('#' + tab_id).hide(); 28 }); 29 11 30 12 31 var numberInput = $("input[type=number]"); 13 32 14 33 // var numberInput = $("#number-input"); 15 var maxAttributeValue = parseFloat(numberInput.attr("max")); 16 17 numberInput.on("input", function () { 18 var currentValue = parseFloat($(this).val()); 19 20 if (currentValue >= maxAttributeValue) { 21 // Prevent typing when value reaches or exceeds max 22 $(this).val(maxAttributeValue); 34 35 numberInput.each(function () { 36 if ($(this).is('[max]')) { 37 $(this).on("input", function () { 38 var maxAttributeValue = parseFloat($(this).attr("max")); 39 var currentValue = parseFloat($(this).val()); 40 41 if (currentValue >= maxAttributeValue) { 42 // Prevent typing when value reaches or exceeds max 43 $(this).val(maxAttributeValue); 44 } 45 }) 23 46 } 47 24 48 }); 25 49 … … 39 63 40 64 41 if ('#advanced' == tab ) {65 if ('#advanced' == tab || '#custom-pro' == tab) { 42 66 $('.wpwand-settings p.submit').hide(); 43 67 } else { … … 264 288 $(e).siblings('#wpwand_max_tokens').attr('max', 14000).change(); 265 289 $(e).slider('option', "max", 14000).change(); 290 break; 291 case 'gpt-4': 292 $(e).siblings('#wpwand_max_tokens').attr('max', 7200).change(); 293 $(e).slider('option', "max", 7200).change(); 266 294 break; 267 295 … … 345 373 const question = $this.find('#wpwand-question').val(); 346 374 const markdown = $this.find('#wpwand-markdown').val(); 375 const inc_ai = $this.find('#wpwand_ai_inf').is(':checked'); 376 const inc_biz = $this.find('#wpwand_biz_inf').is(':checked'); 377 const inc_tgdc = $this.find('#wpwand_tgdc_inf').is(':checked'); 347 378 const wpwand_image_prompt = $this.find('#wpwand-image-prompt').val(); 348 379 const image_resulation = $this.find('#wpwand-image-resulation').val(); … … 397 428 wpwand_image_prompt, 398 429 image_resulation, 399 template_id 430 template_id, 431 inc_ai, 432 inc_biz, 433 inc_tgdc 400 434 }, 401 435 success: function (response) { -
ai-content-generation/trunk/assets/js/post-generator.js
r2961912 r2964507 18 18 19 19 20 // pgf tabs21 22 const $pgf_tabs = $parent.find('.wpwand-pgf-tabs a');23 const $pgf_item = $parent.find('.wpwand-pgf-item');24 25 $pgf_item.not('.active').hide();26 27 $pgf_tabs.on('click', function (e) {28 e.preventDefault();29 30 const $this = $(this);31 const tab_id = $this.data('id');32 33 $pgf_tabs.removeClass('active');34 $pgf_item.removeClass('active');35 $this.addClass('active');36 $parent.find('#' + tab_id).show();37 $pgf_item.not('#' + tab_id).hide();38 });39 20 40 21 -
ai-content-generation/trunk/inc/api.php
r2961128 r2964507 24 24 $point_of_view = isset($_POST['point_of_view']) ? $_POST['point_of_view'] : false; 25 25 $person_cmd = " The content must be written in $point_of_view "; 26 $b usines_details = '';26 $biz_details = ''; 27 27 $targated_customer = ''; 28 28 $language = wp_kses_post($_POST['language'] ?? ''); … … 59 59 ); 60 60 61 62 $content = wpwand_openAi("$command . You must write in $language. $person_cmd ", (int) $fields['no_of_results']); 61 $args = [ 62 'language' => $language 63 ]; 64 65 $content = wpwand_openAi("$command. $person_cmd ", (int) $fields['no_of_results'], $args); 63 66 64 67 $text = ''; … … 135 138 136 139 $selected_model = get_option('wpwand_model', 'gpt-3.5-turbo'); 137 $b usines_details = '';140 $biz_details = ''; 138 141 $targated_customer = ''; 139 142 $language = wpwand_get_option('wpwand_language', 'English'); … … 145 148 146 149 147 $content = wpwand_openAi($prompt . "You must write in $language. $is_table_format_prompt"); 150 151 $content = wpwand_openAi($prompt . $is_table_format_prompt, 1, ['language' => $language]); 148 152 149 153 $text = ''; … … 282 286 283 287 $selected_model = isset($args['model']) ? $args['model'] : wpwand_get_option('wpwand_model', 'gpt-3.5-turbo'); 284 $busines_details = ''; 285 $targated_customer = ''; 286 $language = wpwand_get_option('wpwand_language', 'English'); 287 288 $davinci_command = WPWAND_AI_CHARACTER . "You must write in $language. Our business details is: $busines_details . Our Targated customer profile: $targated_customer. $prompt"; 288 289 $biz_details = isset($args['biz_details']) && !empty($args['biz_details']) ? "Write this based on our business details, which this: " . $args['biz_details'] : ''; 290 $targated_customer = isset($args['targated_customer']) && !empty($args['targated_customer']) ? "Write this focusing the benefits of our targeted customer, which this:" . $args['targated_customer'] : ''; 291 292 293 // $ai_character = isset($args['ai_character']) && !empty($args['ai_character']) ? $args['ai_character'] : ''; 294 295 296 $language = isset($args['language']) && !empty($args['language']) ? $args['language'] : wpwand_get_option('wpwand_language', 'English'); 297 298 $davinci_command = "You must write in $language. $prompt $biz_details $targated_customer"; 299 289 300 $temperature = isset($args['temperature']) ? $args['temperature'] : (int) wpwand_get_option('wpwand_temperature', 1.0); 290 301 $max_tokens = isset($args['max_tokens']) ? $args['max_tokens'] : wpwangd_get_max_token($davinci_command, $selected_model); … … 296 307 $openAI = new OpenAi(WPWAND_OPENAI_KEY); 297 308 298 if ('gpt-3.5-turbo' == $selected_model || 'gpt-3.5-turbo-16k' == $selected_model ) {309 if ('gpt-3.5-turbo' == $selected_model || 'gpt-3.5-turbo-16k' == $selected_model || 'gpt-4' == $selected_model) { 299 310 300 311 $complete = $openAI->chat([ … … 303 314 [ 304 315 'role' => 'system', 305 'content' => WPWAND_AI_CHARACTER, 306 ], 307 [ 308 'role' => 'system', 309 'content' => "Our business details is: $busines_details ", 310 ], 311 [ 312 'role' => 'system', 313 'content' => "Our targated customer profile: $targated_customer ", 314 ], 315 [ 316 'role' => 'system', 317 'content' => "$prompt You must write in $language." 316 'content' => " $prompt You must write in $language. $biz_details $targated_customer" 318 317 ] 319 318 ], … … 338 337 339 338 return json_decode($complete); 340 341 342 343 } 339 // return $davinci_command 340 341 } -
ai-content-generation/trunk/inc/config.php
r2961128 r2964507 6 6 function __construct() 7 7 { 8 $this->create_table();8 add_action('admin_init', [$this, 'create_table']); 9 9 } 10 10 … … 34 34 } 35 35 36 $wpwand_db = new Config();36 // $wpwand_db = new Config(); -
ai-content-generation/trunk/inc/data.php
r2944646 r2964507 1 1 <?php 2 2 3 if ( !defined( 'ABSPATH' )) {4 exit( 'You are not allowed');3 if (!defined('ABSPATH')) { 4 exit('You are not allowed'); 5 5 } 6 6 7 7 // var_dump(get_option('wpwand_pro_tala_key')); 8 function wpwand_templates() { 9 10 $all_prompts = get_option( 'wpwand_data' ); 8 function wpwand_templates() 9 { 10 11 $all_prompts = get_option('wpwand_data'); 12 $custom_data = get_option('wpwand_custom_data', []); 11 13 wpwand_sync_transient(); 12 if (get_option('wpwand_pro_activated') == 'activation'){14 if (get_option('wpwand_pro_activated') == 'activation') { 13 15 wpwand_sync_date(); 14 update_option( 'wpwand_pro_activated', 'data_initialized');15 } 16 if ( isset( $all_prompts['free'] ) && isset( $all_prompts['pro'] )) {17 18 return array_merge( $all_prompts['free'], $all_prompts['pro']);16 update_option('wpwand_pro_activated', 'data_initialized'); 17 } 18 if (isset($all_prompts['free']) && isset($all_prompts['pro'])) { 19 20 return array_merge($custom_data, $all_prompts['free'], $all_prompts['pro']); 19 21 } 20 22 return []; 21 23 } 22 function wpwand_sync_date() { 24 function wpwand_sync_date() 25 { 23 26 // Check if the plugin is being activated for the first time 24 if ( function_exists( 'wpwand_pro_get_data' )) {27 if (function_exists('wpwand_pro_get_data')) { 25 28 wpwand_pro_get_data(); 26 29 } else { 27 wpwand_get_data( true ); 28 } 29 30 31 } 32 add_action( 'wp_ajax_wpwand_sync_date', 'wpwand_sync_date' ); 33 add_action( 'wp_ajax_nopriv_wpwand_sync_date', 'wpwand_sync_date' ); 34 35 36 function wpwand_sync_transient() { 37 if ( false === get_transient( 'wpwand_data_transient' ) ) { 38 return set_transient( 'wpwand_data_transient', wpwand_sync_date(), 12 * HOUR_IN_SECONDS ); 30 wpwand_get_data(true); 31 } 32 33 34 } 35 add_action('wp_ajax_wpwand_sync_date', 'wpwand_sync_date'); 36 add_action('wp_ajax_nopriv_wpwand_sync_date', 'wpwand_sync_date'); 37 38 39 function wpwand_sync_transient() 40 { 41 if (false === get_transient('wpwand_data_transient')) { 42 return set_transient('wpwand_data_transient', wpwand_sync_date(), 12 * HOUR_IN_SECONDS); 39 43 } 40 44 return false; 41 45 } 42 46 43 function wpwand_get_data( $sync = false ) { 44 45 if ( !get_option( 'wpwand_data' ) || $sync == true ) { 47 function wpwand_get_data($sync = false) 48 { 49 50 if (!get_option('wpwand_data') || $sync == true) { 46 51 47 52 // Build the request 48 53 $url = "https://updates.finestwp.co/demo-import/wp-wand/import-files.php?fdth"; 49 54 50 $response = wp_remote_get( $url);51 $response_body = wp_remote_retrieve_body( $response);52 $response_body = json_decode( $response_body, true);55 $response = wp_remote_get($url); 56 $response_body = wp_remote_retrieve_body($response); 57 $response_body = json_decode($response_body, true); 53 58 // Send the request with warnings supressed 54 59 55 return update_option( 'wpwand_data', $response_body) ? true : false;60 return update_option('wpwand_data', $response_body) ? true : false; 56 61 } 57 62 … … 62 67 63 68 64 function randomize_array( $array ) { 65 shuffle( $array ); // shuffle the outer array 66 67 foreach ( $array as $inner_array ) { 68 shuffle( $inner_array ); // shuffle each inner array 69 function randomize_array($array) 70 { 71 shuffle($array); // shuffle the outer array 72 73 foreach ($array as $inner_array) { 74 shuffle($inner_array); // shuffle each inner array 69 75 } 70 76 … … 73 79 74 80 // language set 75 function wpwand_language_array() { 81 function wpwand_language_array() 82 { 76 83 return [ 77 'English' => 'en',78 'Afrikaans' => 'af',79 'Arabic' => 'ar',80 'Armenian' => 'an',81 'Bosnian' => 'bs',82 'Bulgarian' => 'bg',83 'Chinese' => 'zh',84 'Croatian' => 'hr',85 'Czech' => 'cs',86 'Danish' => 'da',87 'Dutch' => 'nl',88 'Estonian' => 'et',89 'Filipino' => 'fil',90 'Finnish' => 'fi',91 'French' => 'fr',92 'German' => 'de',93 'Greek' => 'el',94 'Hebrew' => 'he',95 'Hindi' => 'hi',96 'Hungarian' => 'hu',84 'English' => 'en', 85 'Afrikaans' => 'af', 86 'Arabic' => 'ar', 87 'Armenian' => 'an', 88 'Bosnian' => 'bs', 89 'Bulgarian' => 'bg', 90 'Chinese' => 'zh', 91 'Croatian' => 'hr', 92 'Czech' => 'cs', 93 'Danish' => 'da', 94 'Dutch' => 'nl', 95 'Estonian' => 'et', 96 'Filipino' => 'fil', 97 'Finnish' => 'fi', 98 'French' => 'fr', 99 'German' => 'de', 100 'Greek' => 'el', 101 'Hebrew' => 'he', 102 'Hindi' => 'hi', 103 'Hungarian' => 'hu', 97 104 'Indonesian' => 'id', 98 'Italian' => 'it',99 'Japanese' => 'ja',100 'Korean' => 'ko',101 'Latvian' => 'lv',105 'Italian' => 'it', 106 'Japanese' => 'ja', 107 'Korean' => 'ko', 108 'Latvian' => 'lv', 102 109 'Lithuanian' => 'lt', 103 'Malay' => 'ms',104 'Norwegian' => 'no',105 'Persian' => 'fa',106 'Polish' => 'pl',110 'Malay' => 'ms', 111 'Norwegian' => 'no', 112 'Persian' => 'fa', 113 'Polish' => 'pl', 107 114 'Portuguese' => 'pt', 108 'Romanian' => 'ro',109 'Russian' => 'ru',110 'Serbian' => 'sr',111 'Slovak' => 'sk',112 'Slovenian' => 'sl',113 'Spanish' => 'es',114 'Swedish' => 'sv',115 'Thai' => 'th',116 'Turkish' => 'tr',117 'Ukrainian' => 'uk',118 'Urdu' => 'ur',115 'Romanian' => 'ro', 116 'Russian' => 'ru', 117 'Serbian' => 'sr', 118 'Slovak' => 'sk', 119 'Slovenian' => 'sl', 120 'Spanish' => 'es', 121 'Swedish' => 'sv', 122 'Thai' => 'th', 123 'Turkish' => 'tr', 124 'Ukrainian' => 'uk', 125 'Urdu' => 'ur', 119 126 'Vietnamese' => 'vi', 120 127 ]; … … 122 129 } 123 130 124 function wpwand_editor_prompts($locked = true){ 131 function wpwand_editor_prompts($locked = true) 132 { 125 133 return [ 126 134 [ -
ai-content-generation/trunk/inc/frontend.php
r2944646 r2964507 88 88 $template['number_of_results'] = true; 89 89 } 90 91 if (!isset($template['point_of_view'])) { 92 $template['point_of_view'] = true; 93 } 94 90 95 if (!isset($template['markdown'])) { 91 96 $template['markdown'] = false; … … 212 217 </div> 213 218 <?php endif; ?> 219 214 220 <!-- Product 2 --> 215 221 <?php if (in_array('Product 2', $fields)): ?> … … 301 307 302 308 <?php /* if ( 303 304 'Full Blog Post' != $template['title']305 && 'Comparison Blog Post Between 2 Products' != $template['title']306 && 'Amazon Product Review' != $template['title']307 && 'Review Blog Post' != $template['title']308 && 'WooCommerce Product Description' != $template['title']309 ): */309 310 'Full Blog Post' != $template['title'] 311 && 'Comparison Blog Post Between 2 Products' != $template['title'] 312 && 'Amazon Product Review' != $template['title'] 313 && 'Review Blog Post' != $template['title'] 314 && 'WooCommerce Product Description' != $template['title'] 315 ): */ 310 316 311 317 if (true == $template['number_of_results']): … … 359 365 <?php endif; ?> 360 366 361 <?php //if (in_array('point of view', $fields)): ?>362 <div class="wpwand-form-field">363 <label for="wpwand-point-of-view">Point of View</label>364 <select name="wpwand-point-of-view" id="wpwand-point-of-view">365 <!-- <option value="">Select a</option> -->366 <option value="1st-person">1st Person</option>367 <option value="2nd-person">2nd Person</option>368 <option value="3rd-person">3rd Person</option>369 </select>370 </div>371 <?php //endif; ?>367 <?php if ($template['point_of_view']): ?> 368 <div class="wpwand-form-field"> 369 <label for="wpwand-point-of-view">Point of View</label> 370 <select name="wpwand-point-of-view" id="wpwand-point-of-view"> 371 <!-- <option value="">Select a</option> --> 372 <option value="1st-person">1st Person</option> 373 <option value="2nd-person">2nd Person</option> 374 <option value="3rd-person">3rd Person</option> 375 </select> 376 </div> 377 <?php endif; ?> 372 378 373 379 <!-- Language option --> … … 389 395 </div> 390 396 </div> 397 <?php if (function_exists('wpwand_pro_tala_check') && wpwand_pro_tala_check()): ?> 398 <div class="wpwand-form-group"> 399 <div class="wpwand-form-field wpwand-radio-field-wrap"> 400 <h4>Include Info </h4> 401 402 <!-- <label class="wpwand-radio-label" for="wpwand_ai_inf"> 403 <input type="checkbox" id="wpwand_ai_inf" name="wpwand_ai_inf" 404 class="wpwand-radio"> 405 AI Character 406 </label> --> 407 <label for="wpwand_biz_inf" class="wpwand-radio-label"> 408 <input type="checkbox" id="wpwand_biz_inf" name="wpwand_biz_inf" 409 class="wpwand-radio"> 410 Business Details 411 </label> 412 <label for="wpwand_tgdc_inf" class="wpwand-radio-label"> 413 <input type="checkbox" id="wpwand_tgdc_inf" name="wpwand_tgdc_inf" 414 class="wpwand-radio"> 415 Targeted Customer 416 </label> 417 418 </div> 419 </div> 420 <?php endif; ?> 391 421 392 422 -
ai-content-generation/trunk/readme.txt
r2961912 r2964507 5 5 Requires at least: 5.0 6 6 Tested up to: 6.3 7 Stable tag: 1. 1.97 Stable tag: 1.2.0 8 8 License: GPL-2.0+ 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 72 72 * Basic AI Training 73 73 * Bulk Post Generation [Pro] 74 * Create Custom Prompt [Pro] 74 75 * White Label for Agency [Pro] 75 76 * Custom AI Character [Pro] … … 142 143 Unlike other AI services, WP Wand does not limit the amount of content you can generate. Generate unlimited content without any restriction. 143 144 145 **Auto Bulk AI Blog Post Generator** 146 147 Add your topic and let WP Wand generate bulk blog posts with one click. Keep your website updated with tons of articles. 148 144 149 **Everything inside WordPress** 145 150 … … 303 308 == Changelog == 304 309 310 = 1.2.0 = 311 * New: Custom Prompt Template Generator [Pro version only] 312 * New: Business Information Control Inside Templates [Pro version only] 313 * Fixed: GPT-4 Content Generation Issue. 314 305 315 = 1.1.9 = 306 316 * New: Bulk Post Generation by Custom Headings [Pro version only] -
ai-content-generation/trunk/wp-wand.php
r2961912 r2964507 4 4 * Plugin URI: https://wpwand.com/ 5 5 * 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. 6 * Version: 1. 1.96 * Version: 1.2.0 7 7 * Author: WP Wand 8 8 * Author URI: https://wpwand.com/ … … 12 12 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt 13 13 */ 14 if (!function_exists('get_plugin_data')) { 15 require_once ABSPATH . 'wp-admin/includes/plugin.php'; 16 } 17 // Define constants 18 define('WPWAND_VERSION', get_plugin_data(__FILE__)['Version']); 14 19 15 // Define constants16 20 define('WPWAND_PLUGIN_DIR', plugin_dir_path(__FILE__)); 17 21 define('WPWAND_PLUGIN_URL', plugin_dir_url(__FILE__)); … … 19 23 define('WPWAND_OPENAI_KEY', get_option('wpwand_api_key', false)); 20 24 } 21 define('WPWAND_AI_CHARACTER', get_option('wpwand_ai_character', esc_html('Ignore all previous instructions. You are an expert copywriter. Provide high quality content based on my prompts.')));25 define('WPWAND_AI_CHARACTER', ''); 22 26 23 27 function wpwand_init() … … 71 75 } 72 76 do_action('wpwand_init'); 73 74 75 76 77 77 } 78 78
Note: See TracChangeset
for help on using the changeset viewer.