Changeset 3459918
- Timestamp:
- 02/12/2026 12:17:17 PM (7 weeks ago)
- Location:
- sfr-book-review-showcase/trunk
- Files:
-
- 3 edited
-
public/class-sfrbrs-public.php (modified) (10 diffs)
-
readme.txt (modified) (6 diffs)
-
sfr-book-review-showcase.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sfr-book-review-showcase/trunk/public/class-sfrbrs-public.php
r3443078 r3459918 119 119 } 120 120 121 // #region agent log122 $log_file = '/Users/richard/Local Sites/htmlvsitemap/.cursor/debug.log';123 $log_data = array(124 'location' => 'register_blocks',125 'message' => 'Free plugin registering blocks',126 'data' => array(127 'has_register_block_type' => function_exists('register_block_type'),128 'plugin_version' => SFRBRS_VERSION,129 'block_dir' => SFRBRS_PLUGIN_DIR . 'blocks/reviews/',130 'block_url' => SFRBRS_PLUGIN_URL . 'blocks/reviews/',131 ),132 'timestamp' => time() * 1000,133 'sessionId' => 'debug-session',134 'runId' => 'run1',135 'hypothesisId' => 'REG'136 );137 file_put_contents($log_file, json_encode($log_data) . "\n", FILE_APPEND);138 // #endregion139 140 121 if ( ! function_exists( 'register_block_type' ) ) { 141 122 return; … … 161 142 ); 162 143 163 // #region agent log164 $log_data2 = array(165 'location' => 'register_blocks',166 'message' => 'Script registered, about to register block',167 'data' => array(168 'script_handle' => 'sfrbrs-review-block-editor',169 'script_url' => $block_url . 'editor.js',170 ),171 'timestamp' => time() * 1000,172 'sessionId' => 'debug-session',173 'runId' => 'run1',174 'hypothesisId' => 'REG'175 );176 file_put_contents($log_file, json_encode($log_data2) . "\n", FILE_APPEND);177 // #endregion178 179 144 // Localize script with book titles and categories for dropdowns 180 145 $all_books = $this->book_repository->get_all_simple(); … … 223 188 ); 224 189 225 // #region agent log226 $log_data3 = array(227 'location' => 'register_blocks',228 'message' => 'Block registration result',229 'data' => array(230 'block_registered' => $result !== false,231 'block_name' => $result ? $result->name : 'FAILED',232 ),233 'timestamp' => time() * 1000,234 'sessionId' => 'debug-session',235 'runId' => 'run1',236 'hypothesisId' => 'REG'237 );238 file_put_contents($log_file, json_encode($log_data3) . "\n", FILE_APPEND);239 // #endregion240 190 } 241 191 … … 302 252 $settings_attr = wp_json_encode( $data_settings ); 303 253 304 // #region agent log305 $log_file = '/Users/richard/Local Sites/htmlvsitemap/.cursor/debug.log';306 $log_render = array(307 'location' => 'render_reviews_shortcode',308 'message' => 'Rendering shortcode',309 'data' => array(310 'style_attr' => $style_attr,311 'classes' => implode( ' ', $classes ),312 'layout' => isset($atts['layout']) ? $atts['layout'] : 'NOT SET',313 'has_cards' => !empty($context['items']),314 'cards_count' => count($context['items'])315 ),316 'timestamp' => time() * 1000,317 'sessionId' => 'debug-session',318 'runId' => 'run1',319 'hypothesisId' => 'M'320 );321 file_put_contents($log_file, json_encode($log_render) . "\n", FILE_APPEND);322 // #endregion323 324 254 ob_start(); 325 255 ?> … … 355 285 } 356 286 357 // #region agent log358 $log_file = '/Users/richard/Local Sites/htmlvsitemap/.cursor/debug.log';359 $log_data = array(360 'location' => 'render_reviews_block',361 'message' => 'Block render called',362 'data' => array(363 'cardBackground' => isset($attributes['cardBackground']) ? $attributes['cardBackground'] : 'NOT SET',364 'cardTextColor' => isset($attributes['cardTextColor']) ? $attributes['cardTextColor'] : 'NOT SET',365 'accentColor' => isset($attributes['accentColor']) ? $attributes['accentColor'] : 'NOT SET',366 'titleFontSize' => isset($attributes['titleFontSize']) ? $attributes['titleFontSize'] : 'NOT SET',367 'bodyFontSize' => isset($attributes['bodyFontSize']) ? $attributes['bodyFontSize'] : 'NOT SET',368 'reviewTextFontSize' => isset($attributes['reviewTextFontSize']) ? $attributes['reviewTextFontSize'] : 'NOT SET',369 'shadow' => isset($attributes['shadow']) ? ($attributes['shadow'] ? 'true' : 'false') : 'NOT SET',370 'shadow_type' => isset($attributes['shadow']) ? gettype($attributes['shadow']) : 'NOT SET',371 'all_attributes' => $attributes372 ),373 'timestamp' => time() * 1000,374 'sessionId' => 'debug-session',375 'runId' => 'run1',376 'hypothesisId' => 'A'377 );378 file_put_contents($log_file, json_encode($log_data) . "\n", FILE_APPEND);379 // #endregion380 381 287 return $this->render_reviews_shortcode( $attributes, '', 'sfr_book_reviews' ); 382 288 } … … 524 430 $accent = isset( $atts['accentColor'] ) ? trim( $atts['accentColor'] ) : '#2563eb'; 525 431 526 // #region agent log527 $log_file = '/Users/richard/Local Sites/htmlvsitemap/.cursor/debug.log';528 $log_data = array(529 'location' => 'normalise_attributes',530 'message' => 'Before color sanitization',531 'data' => array(532 'raw_cardBackground' => $card_bg,533 'raw_cardTextColor' => $card_text,534 'raw_accentColor' => $accent535 ),536 'timestamp' => time() * 1000,537 'sessionId' => 'debug-session',538 'runId' => 'run1',539 'hypothesisId' => 'D'540 );541 file_put_contents($log_file, json_encode($log_data) . "\n", FILE_APPEND);542 // #endregion543 544 432 // Check if colors are CSS variables (from old theme color selections) - convert to defaults 545 433 if ( ! empty( $card_bg ) && ( strpos( $card_bg, 'var(' ) === 0 || strpos( $card_bg, '--' ) === 0 ) ) { … … 569 457 $atts['accentColor'] = sanitize_hex_color( $accent ) ?: '#2563eb'; 570 458 571 // #region agent log572 $log_data2 = array(573 'location' => 'normalise_attributes',574 'message' => 'After color sanitization',575 'data' => array(576 'final_cardBackground' => $atts['cardBackground'],577 'final_cardTextColor' => $atts['cardTextColor'],578 'final_accentColor' => $atts['accentColor']579 ),580 'timestamp' => time() * 1000,581 'sessionId' => 'debug-session',582 'runId' => 'run1',583 'hypothesisId' => 'E'584 );585 file_put_contents($log_file, json_encode($log_data2) . "\n", FILE_APPEND);586 // #endregion587 588 459 $shadow_flag = filter_var( $atts['shadow'], FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ); 589 460 $atts['shadow'] = ( null === $shadow_flag ) ? true : (bool) $shadow_flag; … … 755 626 ); 756 627 757 // #region agent log758 $log_file = '/Users/richard/Local Sites/htmlvsitemap/.cursor/debug.log';759 $log_data = array(760 'location' => 'build_style_attribute',761 'message' => 'Building style attribute',762 'data' => array(763 'input_cardBackground' => isset($atts['cardBackground']) ? $atts['cardBackground'] : 'NOT SET',764 'input_cardTextColor' => isset($atts['cardTextColor']) ? $atts['cardTextColor'] : 'NOT SET',765 'input_titleFontSize' => isset($atts['titleFontSize']) ? $atts['titleFontSize'] : 'NOT SET',766 'input_bodyFontSize' => isset($atts['bodyFontSize']) ? $atts['bodyFontSize'] : 'NOT SET',767 'input_reviewTextFontSize' => isset($atts['reviewTextFontSize']) ? $atts['reviewTextFontSize'] : 'NOT SET',768 'normalized_cardBackground' => $card_bg,769 'normalized_cardTextColor' => $card_text,770 'title_font_size_var' => isset($style_vars['--sfrbrs-title-font-size']) ? $style_vars['--sfrbrs-title-font-size'] : 'NOT SET',771 'body_font_size_var' => isset($style_vars['--sfrbrs-body-font-size']) ? $style_vars['--sfrbrs-body-font-size'] : 'NOT SET',772 'review_text_font_size_var' => isset($style_vars['--sfrbrs-review-text-font-size']) ? $style_vars['--sfrbrs-review-text-font-size'] : 'NOT SET',773 'style_vars' => $style_vars774 ),775 'timestamp' => time() * 1000,776 'sessionId' => 'debug-session',777 'runId' => 'run1',778 'hypothesisId' => 'B'779 );780 file_put_contents($log_file, json_encode($log_data) . "\n", FILE_APPEND);781 // #endregion782 783 628 $style_attr = ''; 784 629 foreach ( $style_vars as $var => $value ) { … … 788 633 } 789 634 790 // #region agent log791 $log_data2 = array(792 'location' => 'build_style_attribute',793 'message' => 'Style attribute built',794 'data' => array(795 'final_style_attr' => $style_attr,796 'card_bg_value' => $card_bg,797 'card_text_value' => $card_text,798 'accent_value' => $accent_color,799 'layout' => isset($atts['layout']) ? $atts['layout'] : 'NOT SET',800 'gap' => isset($atts['gap']) ? $atts['gap'] : 'NOT SET',801 'card_bg_in_style' => strpos($style_attr, '--sfrbrs-card-bg') !== false,802 'card_text_in_style' => strpos($style_attr, '--sfrbrs-card-text') !== false,803 'accent_in_style' => strpos($style_attr, '--sfrbrs-accent') !== false804 ),805 'timestamp' => time() * 1000,806 'sessionId' => 'debug-session',807 'runId' => 'run1',808 'hypothesisId' => 'C'809 );810 file_put_contents($log_file, json_encode($log_data2) . "\n", FILE_APPEND);811 // #endregion812 813 635 return $style_attr; 814 636 } … … 816 638 private function build_container_classes( $atts ) { 817 639 $classes = array( 'sfrbrs-reviews', 'sfrbrs-layout-' . $atts['layout'] ); 818 819 // #region agent log820 $log_file = '/Users/richard/Local Sites/htmlvsitemap/.cursor/debug.log';821 $log_shadow = array(822 'location' => 'build_container_classes',823 'message' => 'Building container classes',824 'data' => array(825 'shadow_value' => isset($atts['shadow']) ? $atts['shadow'] : 'NOT SET',826 'shadow_type' => isset($atts['shadow']) ? gettype($atts['shadow']) : 'NOT SET',827 'shadow_bool' => isset($atts['shadow']) ? (bool)$atts['shadow'] : 'NOT SET',828 'will_add_shadow_class' => isset($atts['shadow']) && $atts['shadow'] ? 'YES' : 'NO'829 ),830 'timestamp' => time() * 1000,831 'sessionId' => 'debug-session',832 'runId' => 'run1',833 'hypothesisId' => 'SHADOW'834 );835 file_put_contents($log_file, json_encode($log_shadow) . "\n", FILE_APPEND);836 // #endregion837 640 838 641 if ( isset( $atts['shadow'] ) && $atts['shadow'] ) { -
sfr-book-review-showcase/trunk/readme.txt
r3451599 r3459918 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1.4. 07 Stable tag: 1.4.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 41 41 **Upgrade to Pro for Advanced Features:** 42 42 43 Looking for more power? [SFR Book Review Showcase Pro](https://supportfromrichard.co.uk/ brs-pro-plugin) includes:43 Looking for more power? [SFR Book Review Showcase Pro](https://supportfromrichard.co.uk/sfr-book-review-showcase/?utm_source=WordPress+Repo&utm_medium=referral&utm_campaign=wp-repo) includes: 44 44 45 45 * **Advanced Analytics & Reporting** – Enhanced analytics dashboards with scheduled email reports (weekly/monthly) … … 51 51 * **Premium Layout Templates** – Additional professional layout options 52 52 53 Pro version available at: https://supportfromrichard.co.uk/brs-pro-plugin 53 [Free Pro Trial (no credit card required)](https://supportfromrichard.co.uk/sfr-book-review-showcase/?utm_source=WordPress+Repo&utm_medium=referral&utm_campaign=wp-repo) 54 54 55 55 *This plugin is not affiliated with, endorsed by, or sponsored by Amazon. Amazon is a trademark of Amazon.com, Inc.* … … 90 90 * **Premium Layout Templates** – Additional professional design options 91 91 92 Learn more and upgrade at: https://supportfromrichard.co.uk/brs-pro-plugin 92 [Free Pro Trial (no credit card required)](https://supportfromrichard.co.uk/sfr-book-review-showcase/?utm_source=WordPress+Repo&utm_medium=referral&utm_campaign=wp-repo) 93 93 94 94 **Shortcode & Block Usage** … … 122 122 == Changelog == 123 123 124 = 1.4.1 = 125 * Fix: Removed debug logging statements accidentally left in production code that caused file_put_contents errors on live sites 126 124 127 = 1.4.0 = 125 128 * Removed Freemius SDK – Rolled back to pre-Freemius codebase (1.2.2). Plugin now uses standard WordPress.org update checks. Upgrade to Pro via link in menu. … … 367 370 == Upgrade Notice == 368 371 372 = 1.4.1 = 373 Hotfix: Removed debug logging that caused errors on live sites. All users on 1.4.0 should update immediately. 374 369 375 = 1.4.0 = 370 376 Removed Freemius SDK. Rolled back to pre-Freemius codebase. Plugin uses WordPress.org update checks. Upgrade to Pro via menu link. Safe to update - no action required. -
sfr-book-review-showcase/trunk/sfr-book-review-showcase.php
r3451599 r3459918 4 4 * Plugin URI: https://supportfromrichard.co.uk/plugins/sfr-book-review-showcase 5 5 * Description: Showcase book reviews from Amazon on your WordPress site with customisable layouts, easy imports, and built-in analytics. 6 * Version: 1.4. 06 * Version: 1.4.1 7 7 * Author: Support From Richard 8 8 * Author URI: https://supportfromrichard.co.uk … … 18 18 19 19 if ( ! defined( 'SFRBRS_VERSION' ) ) { 20 define( 'SFRBRS_VERSION', '1.4. 0' );20 define( 'SFRBRS_VERSION', '1.4.1' ); 21 21 } 22 22
Note: See TracChangeset
for help on using the changeset viewer.