Changeset 3110406
- Timestamp:
- 07/01/2024 11:40:33 AM (21 months ago)
- Location:
- writetext-ai/trunk
- Files:
-
- 8 edited
-
CHANGELOG.md (modified) (1 diff)
-
assets/css/admin-installed.css (modified) (2 diffs)
-
assets/js/admin-installed.js (modified) (3 diffs)
-
includes/class-wtai-product-dashboard.php (modified) (2 diffs)
-
includes/functions.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
-
templates/admin/metabox/keywords-competitor.php (modified) (2 diffs)
-
writetext-ai.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
writetext-ai/trunk/CHANGELOG.md
r3110204 r3110406 9 9 The format is based on [Keep a Changelog](http://keepachangelog.com/) 10 10 and this project adheres to [Semantic Versioning](http://semver.org/). 11 12 ## [1.30.2] - 2024-07-01 13 14 ### Changed 15 16 - Remove "Rank" column in Keyword Analysis > Keywords your competitors are ranking on. 17 - Update selected state for the image alt text. If at least one image is selected, when moving from the previous or to the next product, all images for that product should be selected by default. 11 18 12 19 ## [1.30.1] - 2024-06-28 -
writetext-ai/trunk/assets/css/admin-installed.css
r3110204 r3110406 11528 11528 width: 35% 11529 11529 } 11530 .wtai-keyword-table.wtai-keyword-table-competitor-keywords.has-rank-intent-data .col-keyword{ 11531 width: 45% 11532 } 11530 11533 .wtai-keyword-table.has-rank-intent-data .col-action, 11531 11534 .wtai-keyword-table.has-rank-intent-data .col-difficulty, … … 12269 12272 top: auto; 12270 12273 bottom: calc(100% + 10px); 12271 right: 0 12274 right: 0; 12275 font-weight: 400 12272 12276 } 12273 12277 -
writetext-ai/trunk/assets/js/admin-installed.js
r3110204 r3110406 10283 10283 function record_preselected_field_types(){ 10284 10284 var selectedTypes = []; 10285 $('#postbox-container-2').find('.writetext-metabox .postbox-header .checkboxes , .alt-writetext-metabox .postbox-header .checkboxes').each(function(){10285 $('#postbox-container-2').find('.writetext-metabox .postbox-header .checkboxes').each(function(){ 10286 10286 var cb = $(this); 10287 10287 var type = cb.attr('data-type'); … … 10291 10291 } 10292 10292 }); 10293 10294 if( $('.alt-writetext-metabox .postbox-header .checkboxes:checked').length > 0 ){ 10295 selectedTypes.push( 'image_alt_text' ); 10296 } 10293 10297 10294 10298 var product_id = $('#edit_post_id').val(); … … 12793 12797 }, 12794 12798 error: function() { 12795 callback(); 12799 try{ 12800 callback(); 12801 } 12802 catch( err ){ 12803 } 12796 12804 }, 12797 12805 success: function(res) { -
writetext-ai/trunk/includes/class-wtai-product-dashboard.php
r3110204 r3110406 2311 2311 } 2312 2312 2313 $selected_image_ids = array_filter( $selected_image_ids ); 2314 2313 2315 if ( $selected_image_ids ) { 2314 $selected_image_ids = array_filter( $selected_image_ids ); 2316 $selected_types[] = 'image_alt_text'; 2317 } else { 2318 // Search for the key of the value. 2319 $image_alt_text_key = array_search( 'image_alt_text', $selected_types, true ); 2320 2321 // Check if the value exists in the array. 2322 if ( false !== $image_alt_text_key ) { 2323 // Remove the element. 2324 unset( $selected_types[ $image_alt_text_key ] ); 2325 } 2326 2327 // Reset array keys if needed. 2328 $selected_types = array_values( $selected_types ); 2315 2329 } 2316 2330 … … 3760 3774 $current_alt_image_ids = wtai_get_product_image( $product_id ); 3761 3775 foreach ( $current_alt_image_ids as $image_id ) { 3762 $image_ids_to_process[] = $image_id; 3776 foreach ( $alt_image_ids as $ai_inner_alt_id ) { 3777 if ( intval( $ai_inner_alt_id ) === intval( $image_id ) ) { 3778 $image_ids_to_process[] = $image_id; 3779 break; 3780 } 3781 } 3763 3782 } 3764 3783 } -
writetext-ai/trunk/includes/functions.php
r3110204 r3110406 4417 4417 ob_start(); 4418 4418 if ( $product_images ) { 4419 $alt_user_preference = wtai_ get_image_alt_user_preference();4419 $alt_user_preference = wtai_is_image_alt_text_selected(); 4420 4420 $img_ctr = 1; 4421 4421 … … 4443 4443 $product_alt_user_preference = array(); 4444 4444 $checked = false; 4445 if ( isset( $alt_user_preference[ $product_id ] ) ) { 4446 $product_alt_user_preference = $alt_user_preference[ $product_id ]; 4447 if ( $product_alt_user_preference ) { 4448 foreach ( $product_alt_user_preference as $pref_image_id ) { 4449 if ( intval( $pref_image_id ) === intval( $attachment_id ) ) { 4450 $checked = true; 4451 break; 4452 } 4453 } 4454 } 4445 if ( $alt_user_preference ) { 4446 $checked = true; 4455 4447 } 4456 4448 … … 4641 4633 4642 4634 /** 4635 * Check if image alt text should be selected per user preference. 4636 */ 4637 function wtai_is_image_alt_text_selected() { 4638 $current_user_id = get_current_user_id(); 4639 4640 if ( ! $current_user_id ) { 4641 return false; 4642 } 4643 4644 $is_checked = false; 4645 4646 $wtai_preselected_types = get_user_meta( $current_user_id, 'wtai_preselected_types', true ); 4647 4648 if ( in_array( 'image_alt_text', $wtai_preselected_types, true ) ) { 4649 $is_checked = true; 4650 } 4651 4652 return $is_checked; 4653 } 4654 4655 /** 4643 4656 * Get field type labels. 4644 4657 */ -
writetext-ai/trunk/readme.txt
r3110204 r3110406 5 5 Requires at least: 6.0 6 6 Tested up to: 6.5.2 7 Stable tag: 1.30. 17 Stable tag: 1.30.2 8 8 Requires PHP: 7.4 9 9 License: GPLv3 or later … … 157 157 158 158 == Changelog == 159 160 = 1.30.2 2024-07-01 = 161 162 * Update - Remove "Rank" column in Keyword Analysis > Keywords your competitors are ranking on. 163 * Update - Update selected state for the image alt text. If at least one image is selected, when moving from the previous or to the next product, all images for that product should be selected by default. 159 164 160 165 = 1.30.1 2024-06-28 = … … 571 576 == Upgrade Notice == 572 577 573 = 1.30. 1=578 = 1.30.2 = 574 579 575 580 Please upgrade, to ensure all plugin features works as expected. -
writetext-ai/trunk/templates/admin/metabox/keywords-competitor.php
r3110204 r3110406 119 119 <span><?php echo wp_kses_post( __( 'Keyword ideas', 'writetext-ai' ) ); ?></span> 120 120 <span class="wta-keyword-by-relevance-label" style="<?php echo ( 'relevance' === $sort_type_selected ) ? '' : 'display: none;'; ?>" ><?php echo wp_kses_post( __( '(by relevance)', 'writetext-ai' ) ); ?></span> 121 </div>122 </div>123 </th>124 <th class="col-rank col-normal-mobile">125 <div class="sort-ideas-btn sort-style2" >126 <div class="sort-ideas-select sort-ideas-select-rank hover-sorting <?php echo ( 'rank' === $sort_type_selected ) ? 'active-sort' : ''; ?>" data-type="rank" >127 <span class="lbl"><?php echo wp_kses_post( __( 'Rank', 'writetext-ai' ) ); ?></span>128 129 121 </div> 130 122 </div> … … 288 280 </div> 289 281 </td> 290 <td class="col-rank col-normal-mobile" data-value="<?php echo wp_kses_post( $rank ); ?>" ><?php echo wp_kses_post( $rank ); ?></td>291 282 <td class="col-intent col-normal-mobile" data-value="<?php echo wp_kses_post( $intent ); ?>" ><?php echo wp_kses_post( $intent ); ?></td> 292 283 <td class="col-volume col-normal-mobile" data-filter-value="<?php echo wp_kses_post( $search_vol ); ?>" data-value="<?php echo wp_kses_post( $search_vol ); ?>" ><?php echo wp_kses_post( $search_vol ); ?></td> -
writetext-ai/trunk/writetext-ai.php
r3110204 r3110406 4 4 * Plugin URI: https://writetext.ai/woocommerce 5 5 * Description: Let AI automatically generate product descriptions and other content from your product data. 6 * Version: 1.30. 16 * Version: 1.30.2 7 7 * Author: 1902 Software 8 8 * Author URI: https://writetext.ai/ … … 56 56 57 57 if ( ! defined( 'WTAI_VERSION' ) ) { 58 define( 'WTAI_VERSION', '1.30. 1' );58 define( 'WTAI_VERSION', '1.30.2' ); 59 59 } 60 60
Note: See TracChangeset
for help on using the changeset viewer.