Skip to content

Releases: thaitop/thaitop-php-shortcode

ThaiTop Custom PHP Shortcode v1.0.2 - Dynamic Attributes Update

Choose a tag to compare

@thaitop thaitop released this 28 Jan 08:18

🎉 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

v1.0.1: Initial Release - ThaiTop Custom PHP Shortcode Plugin

Choose a tag to compare

@thaitop thaitop released this 27 Jan 09:15

Initial release of ThaiTop Custom PHP Shortcode Plugin for WordPress

Key Features:

  • Execute PHP code snippets using simple shortcodes [php_code id="your_id"]
  • User-friendly admin interface for managing code snippets
  • Built-in code editor with preview functionality
  • One-click shortcode copying
  • Database-backed storage with caching support
  • Secure code execution and error handling

Technical Details:

  • WordPress 5.0+ compatible
  • PHP 7.4+ required
  • Built with WordPress coding standards
  • Includes uninstall cleanup
  • Database table prefix support
  • XSS protection implemented

Security Features:

  • Nonce verification for all admin actions
  • SQL injection prevention using prepared statements
  • Input sanitization and validation
  • Access control checks
  • Error logging and handling

Documentation:

  • Comprehensive README.md included
  • Code examples provided
  • Installation instructions
  • Usage guidelines
  • Security recommendations

This release provides a solid foundation for executing PHP code snippets safely within WordPress while maintaining good performance and security practices.

Full Changelog: https://github.com/thaitop/thaitop-php-shortcode/commits/v1.0.1