Changeset 3468460
- Timestamp:
- 02/24/2026 09:41:59 AM (5 weeks ago)
- Location:
- clearpost-simple-ai-auto-post
- Files:
-
- 8 edited
- 1 copied
-
tags/2.0.22 (copied) (copied from clearpost-simple-ai-auto-post/trunk)
-
tags/2.0.22/assets/js/dashboard.js (modified) (8 diffs)
-
tags/2.0.22/includes/dashboard.php (modified) (2 diffs)
-
tags/2.0.22/readme.txt (modified) (2 diffs)
-
tags/2.0.22/simple-ai-auto-post.php (modified) (2 diffs)
-
trunk/assets/js/dashboard.js (modified) (8 diffs)
-
trunk/includes/dashboard.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/simple-ai-auto-post.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
clearpost-simple-ai-auto-post/tags/2.0.22/assets/js/dashboard.js
r3468416 r3468460 13 13 let calendarVariant = 'locked'; 14 14 let trialDayLimit = 7; 15 let totalPlannedCount = 0; // Total planned posts across all months (from backend) 15 16 16 17 // Setup loader state … … 158 159 if (response.success && response.data.items && response.data.items.length > 0) { 159 160 // Calendar items exist! Hide loader and show calendar 160 onSetupComplete(response.data .items);161 onSetupComplete(response.data); 161 162 } 162 163 // If no items yet, keep polling … … 171 172 * Handle setup completion - hide loader, show calendar, update status. 172 173 */ 173 function onSetupComplete(items) { 174 function onSetupComplete(data) { 175 var items = data.items || []; 176 174 177 // Stop polling and status cycling 175 178 if (setupPollingInterval) { … … 202 205 // Store the items and render calendar 203 206 calendarData = items; 207 // Update total planned count (all planned items across all months) 208 if (typeof data.total_planned_count !== 'undefined') { 209 totalPlannedCount = data.total_planned_count; 210 } 204 211 currentMonth = new Date(); 205 212 renderCalendar(); 206 213 207 // Update scheduled count (after calendarDatais set)214 // Update scheduled count (after totalPlannedCount is set) 208 215 updateScheduledCount(); 209 216 … … 458 465 * Update the "Posts Scheduled" metric count. 459 466 * 460 * Counts planned calendar items (not yet generated) and updates the metric display.461 * Called after calendar data is loaded to ensure the count reflects actual scheduled items.467 * Uses totalPlannedCount from the backend (all planned items across all months, 468 * not just the current month view). 462 469 */ 463 470 function updateScheduledCount() { 464 // Count planned items (items that are scheduled but not yet generated)465 var plannedCount = 0;466 if (calendarData && calendarData.length) {467 calendarData.forEach(function(item) {468 if (item.status === 'planned') {469 plannedCount++;470 }471 });472 }473 474 471 // Update the "Posts Scheduled" metric card value 475 472 var $metricCards = $('.saiap-metric-card'); … … 478 475 var labelText = $card.find('.saiap-metric-card__label').text().toLowerCase(); 479 476 if (labelText.indexOf('scheduled') !== -1) { 480 $card.find('.saiap-metric-card__value').text( plannedCount);477 $card.find('.saiap-metric-card__value').text(totalPlannedCount); 481 478 } 482 479 }); … … 631 628 if (response.success) { 632 629 calendarData = response.data.items || []; 630 // Update total planned count (all planned items across all months) 631 if (typeof response.data.total_planned_count !== 'undefined') { 632 totalPlannedCount = response.data.total_planned_count; 633 } 633 634 renderCalendar(); 634 635 updateScheduledCount(); … … 891 892 // Update calendar data and re-render 892 893 calendarData = data.items || []; 894 // Update total planned count (all planned items across all months) 895 if (typeof data.total_planned_count !== 'undefined') { 896 totalPlannedCount = data.total_planned_count; 897 } 893 898 currentMonth = new Date(); 894 899 renderCalendar(); -
clearpost-simple-ai-auto-post/tags/2.0.22/includes/dashboard.php
r3468416 r3468460 1206 1206 set_transient( 'saiap_calendar_items_count', count( $body['items'] ), HOUR_IN_SECONDS ); 1207 1207 1208 // Count planned items (scheduled but not yet generated). 1209 $planned_count = 0; 1210 foreach ( $body['items'] as $item ) { 1211 if ( isset( $item['status'] ) && 'planned' === $item['status'] ) { 1212 ++$planned_count; 1213 } 1214 } 1215 set_transient( 'saiap_planned_calendar_items_count', $planned_count, HOUR_IN_SECONDS ); 1208 // Use backend-provided total planned count (all planned items, not filtered by date). 1209 if ( isset( $body['total_planned_count'] ) ) { 1210 set_transient( 'saiap_planned_calendar_items_count', (int) $body['total_planned_count'], HOUR_IN_SECONDS ); 1211 } 1216 1212 1217 1213 // Enrich calendar items with local WP post IDs. … … 1729 1725 } 1730 1726 1727 // Update the planned count cache from backend response. 1728 if ( isset( $body['total_planned_count'] ) ) { 1729 set_transient( 'saiap_planned_calendar_items_count', (int) $body['total_planned_count'], HOUR_IN_SECONDS ); 1730 } 1731 1731 1732 wp_send_json_success( $body ); 1732 1733 } -
clearpost-simple-ai-auto-post/tags/2.0.22/readme.txt
r3468416 r3468460 4 4 Requires at least: 5.0 5 5 Tested up to: 6.9 6 Stable tag: 2.0.2 16 Stable tag: 2.0.22 7 7 Requires PHP: 7.2 8 8 License: GPLv2 or later … … 233 233 234 234 == Changelog == 235 236 = 2.0.22 = 237 * Fixed: "Posts Scheduled" metric now shows total across all months, not just the current month view. 235 238 236 239 = 2.0.21 = -
clearpost-simple-ai-auto-post/tags/2.0.22/simple-ai-auto-post.php
r3468416 r3468460 4 4 Description: Your AI Agent for SEO, in WordPress. An AI content marketer that knows your site, then schedules and generates posts every day. 5 5 Plugin URI: https://clearpostplugin.com/ 6 Version: 2.0.2 16 Version: 2.0.22 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 18 18 19 19 // Define plugin version 20 define( 'SAIAP_VERSION', '2.0.2 1' );20 define( 'SAIAP_VERSION', '2.0.22' ); 21 21 22 22 // Define premium API URL -
clearpost-simple-ai-auto-post/trunk/assets/js/dashboard.js
r3468416 r3468460 13 13 let calendarVariant = 'locked'; 14 14 let trialDayLimit = 7; 15 let totalPlannedCount = 0; // Total planned posts across all months (from backend) 15 16 16 17 // Setup loader state … … 158 159 if (response.success && response.data.items && response.data.items.length > 0) { 159 160 // Calendar items exist! Hide loader and show calendar 160 onSetupComplete(response.data .items);161 onSetupComplete(response.data); 161 162 } 162 163 // If no items yet, keep polling … … 171 172 * Handle setup completion - hide loader, show calendar, update status. 172 173 */ 173 function onSetupComplete(items) { 174 function onSetupComplete(data) { 175 var items = data.items || []; 176 174 177 // Stop polling and status cycling 175 178 if (setupPollingInterval) { … … 202 205 // Store the items and render calendar 203 206 calendarData = items; 207 // Update total planned count (all planned items across all months) 208 if (typeof data.total_planned_count !== 'undefined') { 209 totalPlannedCount = data.total_planned_count; 210 } 204 211 currentMonth = new Date(); 205 212 renderCalendar(); 206 213 207 // Update scheduled count (after calendarDatais set)214 // Update scheduled count (after totalPlannedCount is set) 208 215 updateScheduledCount(); 209 216 … … 458 465 * Update the "Posts Scheduled" metric count. 459 466 * 460 * Counts planned calendar items (not yet generated) and updates the metric display.461 * Called after calendar data is loaded to ensure the count reflects actual scheduled items.467 * Uses totalPlannedCount from the backend (all planned items across all months, 468 * not just the current month view). 462 469 */ 463 470 function updateScheduledCount() { 464 // Count planned items (items that are scheduled but not yet generated)465 var plannedCount = 0;466 if (calendarData && calendarData.length) {467 calendarData.forEach(function(item) {468 if (item.status === 'planned') {469 plannedCount++;470 }471 });472 }473 474 471 // Update the "Posts Scheduled" metric card value 475 472 var $metricCards = $('.saiap-metric-card'); … … 478 475 var labelText = $card.find('.saiap-metric-card__label').text().toLowerCase(); 479 476 if (labelText.indexOf('scheduled') !== -1) { 480 $card.find('.saiap-metric-card__value').text( plannedCount);477 $card.find('.saiap-metric-card__value').text(totalPlannedCount); 481 478 } 482 479 }); … … 631 628 if (response.success) { 632 629 calendarData = response.data.items || []; 630 // Update total planned count (all planned items across all months) 631 if (typeof response.data.total_planned_count !== 'undefined') { 632 totalPlannedCount = response.data.total_planned_count; 633 } 633 634 renderCalendar(); 634 635 updateScheduledCount(); … … 891 892 // Update calendar data and re-render 892 893 calendarData = data.items || []; 894 // Update total planned count (all planned items across all months) 895 if (typeof data.total_planned_count !== 'undefined') { 896 totalPlannedCount = data.total_planned_count; 897 } 893 898 currentMonth = new Date(); 894 899 renderCalendar(); -
clearpost-simple-ai-auto-post/trunk/includes/dashboard.php
r3468416 r3468460 1206 1206 set_transient( 'saiap_calendar_items_count', count( $body['items'] ), HOUR_IN_SECONDS ); 1207 1207 1208 // Count planned items (scheduled but not yet generated). 1209 $planned_count = 0; 1210 foreach ( $body['items'] as $item ) { 1211 if ( isset( $item['status'] ) && 'planned' === $item['status'] ) { 1212 ++$planned_count; 1213 } 1214 } 1215 set_transient( 'saiap_planned_calendar_items_count', $planned_count, HOUR_IN_SECONDS ); 1208 // Use backend-provided total planned count (all planned items, not filtered by date). 1209 if ( isset( $body['total_planned_count'] ) ) { 1210 set_transient( 'saiap_planned_calendar_items_count', (int) $body['total_planned_count'], HOUR_IN_SECONDS ); 1211 } 1216 1212 1217 1213 // Enrich calendar items with local WP post IDs. … … 1729 1725 } 1730 1726 1727 // Update the planned count cache from backend response. 1728 if ( isset( $body['total_planned_count'] ) ) { 1729 set_transient( 'saiap_planned_calendar_items_count', (int) $body['total_planned_count'], HOUR_IN_SECONDS ); 1730 } 1731 1731 1732 wp_send_json_success( $body ); 1732 1733 } -
clearpost-simple-ai-auto-post/trunk/readme.txt
r3468416 r3468460 4 4 Requires at least: 5.0 5 5 Tested up to: 6.9 6 Stable tag: 2.0.2 16 Stable tag: 2.0.22 7 7 Requires PHP: 7.2 8 8 License: GPLv2 or later … … 233 233 234 234 == Changelog == 235 236 = 2.0.22 = 237 * Fixed: "Posts Scheduled" metric now shows total across all months, not just the current month view. 235 238 236 239 = 2.0.21 = -
clearpost-simple-ai-auto-post/trunk/simple-ai-auto-post.php
r3468416 r3468460 4 4 Description: Your AI Agent for SEO, in WordPress. An AI content marketer that knows your site, then schedules and generates posts every day. 5 5 Plugin URI: https://clearpostplugin.com/ 6 Version: 2.0.2 16 Version: 2.0.22 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 18 18 19 19 // Define plugin version 20 define( 'SAIAP_VERSION', '2.0.2 1' );20 define( 'SAIAP_VERSION', '2.0.22' ); 21 21 22 22 // Define premium API URL
Note: See TracChangeset
for help on using the changeset viewer.