=== bcodecraft Blocks === Contributors: mrboydwp Donate link: https://ko-fi.com/boyduang Tags: blocks, snippets, reusable-content, gutenberg, editor Requires at least: 6.0 Tested up to: 6.8 Requires PHP: 7.4 Stable tag: 1.2.3 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html A modern WordPress plugin for managing and reusing content snippets with seamless Block Editor integration and advanced search functionality. == Description == **bcodecraft Blocks** helps you manage reusable content on your WordPress site efficiently. Create content snippets once and use them anywhere with our modern, intuitive interface. = Key Features = * **🎯 Modern Modal Interface** - Beautiful, searchable snippet selection with live preview * **📝 Block Editor Integration** - Seamless workflow with smooth animations and transitions * **⚙️ Classic Editor Support** - TinyMCE button for one-click shortcode insertion * **🌟 Smart Placeholder State** - Guided onboarding for new users * **📱 Responsive Design** - Optimized for all devices and screen sizes * **🚀 Performance Optimized** - Server-side pagination and efficient loading for large collections * **🔍 Advanced Search** - Real-time search with debouncing and server-side filtering * **🔒 Secure & Reliable** - Built with security best practices and input validation = Perfect For = * **Contact Information** - Address, phone, email that appears on multiple pages * **Call-to-Action Blocks** - Reusable promotional content and banners * **Legal Text** - Terms, privacy policies, disclaimers * **Product Features** - Standard descriptions for products and services * **Social Media Links** - Consistent social media widgets = How It Works = 1. **Create Snippets** - Use the familiar WordPress Block Editor to create your content snippets 2. **Insert Anywhere** - Add snippets via the beautiful modal interface in Block Editor or Classic Editor 3. **Live Preview** - See exactly how your content will look before publishing 4. **Automatic Updates** - Change a snippet once, and it updates everywhere it's used = User Experience = * **Intuitive Modal Interface** - No more dropdown menus, search and select from a beautiful grid * **Real-time Search** - Find snippets instantly with live filtering * **Visual Feedback** - Smooth animations and hover effects throughout * **Cross-Editor Consistency** - Same experience in Block Editor and Classic Editor = Developer Friendly = * **REST API Endpoints** - `wp-json/bccb-blocks/v1/snippets` for custom integrations * **WordPress Hooks** - Filters and actions for customization * **Clean Code** - Following WordPress coding standards and best practices * **Modern Architecture** - Built with React and modern JavaScript = Requirements = * WordPress 6.0+ * PHP 7.4+ == Installation == = Automatic Installation = 1. Go to Plugins > Add New in your WordPress admin 2. Search for "bcodecraft Blocks" 3. Click Install Now and then Activate 4. Start creating your first snippet! = Manual Installation = 1. Download the plugin zip file 2. Go to Plugins > Add New > Upload Plugin 3. Choose the `bcodecraft-blocks.zip` file and click Install Now 4. Activate the plugin 5. You'll see "Snippets" appear in your admin menu = Getting Started = 1. Go to **Snippets** in your WordPress admin 2. Click **Add New** to create your first snippet 3. Use the Block Editor to create your content 4. Publish your snippet 5. Add a bcodecraft Block to any post or page and select your snippet == Frequently Asked Questions == = How do I create a snippet? = Go to Snippets > Add New in your WordPress admin, create your content using the Block Editor, and publish. Your snippet will be available for use anywhere on your site. = Can I use snippets in both Block Editor and Classic Editor? = Yes! bcodecraft Blocks works seamlessly in both editors. In Block Editor, add a "bcodecraft Block" and select from the modal. In Classic Editor, click the bcodecraft Blocks button in the toolbar. = Will changing a snippet update it everywhere it's used? = Absolutely! That's the power of bcodecraft Blocks. Edit a snippet once, and it automatically updates everywhere you've used it. = Can I use shortcodes manually? = Yes, you can copy the shortcode from the snippets list (e.g., `[bccb_block id="123"]`) and paste it anywhere in your content. = Is there a limit to how many snippets I can create? = No, you can create unlimited snippets. The plugin is designed to handle large numbers of snippets efficiently. = What happens when I delete/uninstall the plugin? = When you deactivate the plugin, your snippets remain in the database. If you completely uninstall (delete) the plugin, your snippet data is preserved by default as a safety feature. To completely remove all data, you would need to modify the uninstall.php file. = Does it work with page builders? = Yes, snippets work anywhere shortcodes are supported, including most page builders and themes. = Is the plugin translation ready? = Yes, bcodecraft Blocks is fully internationalized and ready for translation into any language. == Screenshots == 1. **Modern Modal Interface** - Beautiful snippet selection with search and preview 2. **Block Editor Integration** - Seamless workflow with live preview 3. **Snippet Management** - Clean admin interface for managing all your snippets 4. **Classic Editor Support** - TinyMCE button for shortcode insertion 5. **Placeholder State** - Intuitive onboarding for new users 6. **Mobile Responsive** - Works perfectly on all devices == Changelog == = 1.2.3 - 2025-09-13 = **Bug Fixes & Stability** **Fixed:** * Block registration namespace warning in WordPress admin * Improved block type registration with explicit file path handling * Enhanced fallback registration for better compatibility **Technical Improvements:** * Updated block registration method with proper namespace handling * Added comprehensive fallback system for block registration * Improved error handling for missing block.json files = 1.2.2 - 2025-09-13 = **Bug Fixes & Stability** **Fixed:** * Fatal Error - Fixed missing `includes/` directory issue that caused plugin activation failures * Block Registration - Fixed WordPress block registration warning by using proper directory path method * File Structure - Cleaned up duplicate class files to prevent loading conflicts **Technical Improvements:** * SVN Deployment - Improved deployment script to ensure correct file structure * Code Organization - Consolidated PHP class files to `includes/` directory only * Block Registration Method - Updated to use proper directory-based registration = 1.2.1 - 2025-08-28 = **Performance & Security Improvements** **Performance Enhancements:** * Server-side pagination with 20 items per page for large datasets * Real-time search with 300ms debouncing and server-side filtering * "Load More" functionality for progressive content loading * Memory optimization preventing performance degradation * Efficient handling of large snippet collections * Reduced JavaScript bundle size to 11.3KB **Enhanced Security:** * Improved input validation and XSS prevention * Rate limiting to prevent abuse * Content sanitization and validation * Secure API endpoints with proper authentication **UI/UX Improvements:** * User-friendly pagination controls and navigation * Real-time search feedback and loading states * Enhanced mobile experience with touch-friendly controls * Production-ready error handling for better UX **Technical Improvements:** * Consistent API pagination response structure * Code quality improvements with linting compliance * Updated documentation with performance and security guides * Bug fixes for BlockControls error and date field issues = 1.2.0 - 2025-08-27 = **Major UX Improvements Release** **Added:** * Modern modal interface for snippet selection (replacing old dropdown) * Beautiful placeholder state with clear call-to-action buttons * TinyMCE integration for Classic Editor with consistent modal interface * Advanced animations and micro-interactions throughout the interface * Enhanced search experience with visual feedback and filtering * Staggered card animations for snippet selection * Visual feedback system with loading states and hover effects **Enhanced:** * Complete UI/UX overhaul focusing on modern design principles * Streamlined Block Editor workflow with modal-based selection * Full Classic Editor support with TinyMCE toolbar button * Responsive design optimized for all screen sizes * Performance optimizations for smooth user experience **Technical Improvements:** * Modernized CSS architecture with animations and transitions * Implemented cubic-bezier easing functions for natural motion * Built scalable modal component with backdrop blur effects * Optimized search with real-time filtering * Separated TinyMCE assets for better modularity = 1.1.1 - 2025-08-27 = * Fixed duplicate related posts issue * Improved plugin compatibility * Enhanced content rendering = 1.1.0 - 2025-08-26 = * WordPress 6.8 compatibility * Performance optimizations * Production-ready release = 1.0.0 - 2025-08-26 = * Initial release == Upgrade Notice == = 1.2.1 = Performance and security improvements with enhanced search functionality and better mobile experience. == Support == For support and bug reports, please use the WordPress.org support forum for this plugin. == Privacy == bcodecraft Blocks does not collect any personal data. All content is stored locally in your WordPress database and no external connections are made.