Skip to content

ThaiTop Custom PHP Shortcode v1.0.2 - Dynamic Attributes Update

Latest

Choose a tag to compare

@thaitop thaitop released this 28 Jan 08:18
· 1 commit to main since this release

πŸŽ‰ What's New in v1.0.2

✨ New Features

  • Dynamic Attributes Support: Now you can pass custom variables to your PHP code using shortcode attributes
  • Enhanced Admin Interface: Added comprehensive examples and documentation in the admin panel
  • Improved Visual Identity: Added custom menu icon for better plugin recognition

πŸ”§ Technical Improvements

  • Added attribute sanitization system for enhanced security
  • Implemented extract() function for easy attribute access in PHP code
  • Added support for accessing attributes both as variables and array format
  • Added comprehensive error handling for attribute processing

πŸ“š Documentation Updates

  • Added detailed examples of attribute usage
  • Updated README with new features and security guidelines
  • Added changelog section to track version history
  • Added code examples for common use cases

πŸ›‘οΈ Security Enhancements

  • Added input sanitization for all attribute values
  • Added recommendations for secure attribute handling
  • Improved error reporting for invalid inputs

πŸ’‘ Example Usage

[php_code id="calculator" price="10.99" quantity="3"]

PHP Code:

$total = floatval($price) * intval($quantity);
echo "Total Price: $" . number_format($total, 2);

πŸ” Testing Notes

  • Please test attribute handling with various data types
  • Verify sanitization of special characters
  • Test error handling with invalid inputs

πŸ“‹ Requirements

  • WordPress 5.0 or higher
  • PHP 7.2 or higher

πŸ”„ Upgrade Instructions

  • Backup your existing plugin data
  • Deactivate and delete the old version
  • Install and activate the new version
  • No database migration required