REST API blocks
A simple plugin to add block data in json format into the rest api. Once installed, there will be two new fields added to the rest api, has_blocks and blocks. For example output. "has_blocks": true, "block_data": [ { "blockName": "core/image", "attrs": { "url": "https://www.spacedmonkey.com/wp-content/uploads/2018/12/test-image.jpg", "alt": "Terminal de aeropuerto", "caption": "fsfsdfdsfdssfd", "href": "https://www.spacedmonkey.com/test-image", "rel": "noreferrer noopener", "linkClass": "jonny-123", "linkTarget": "_blank", "id": 147355, "width": 582, "height": 327, "linkDestination": "attachment" }, "innerBlocks": [ ], "innerHTML": "\n fsfsdfdsfdssfd \n", "innerContent": [ "\n fsfsdfdsfdssfd \n" ], "rendered": "\n fsfsdfdsfdssfd \n" } ], Technical Notes Requires PHP 5.6+. Requires WordPress 5.5+. Issues and Pull requests welcome on the GitHub repository: https://github.com/spacedmonkey/wp-rest-blocks Development This plugin uses @wordpress/env for local development and testing. Prerequisites Node.js 20+ and npm Docker Desktop (must be installed and running) Setup Clone the repository Install dependencies: bash npm install composer install Start the WordPress environment: bash npm run env:start This will start a local WordPress instance at http://localhost:8888 (admin: http://localhost:8888/wp-admin with username admin and password password) Note: Docker must be running for this to work. The first time you run this, it will download WordPress and set up the database, which may take a few minutes. Available Commands npm run env:start – Start the WordPress environment npm run env:stop – Stop the WordPress environment npm run env:reset – Reset the environment (clean database) npm run env:destroy – Destroy the environment completely npm run test:php – Run PHPUnit tests npm run test:php:multisite – Run PHPUnit tests in multisite mode npm run lint:php – Run PHP CodeSniffer npm run lint:php:fix – Fix PHP coding standards issues automatically Running Tests After starting the environment with npm run env:start, you can run the tests: `bash npm run test:php ` For multisite tests: `bash npm run test:php:multisite ` Accessing the Site Development site: http://localhost:8888 Admin dashboard: http://localhost:8888/wp-admin (admin/password) Test site: http://localhost:8889 Test admin: http://localhost:8889/wp-admin (admin/password)
Top keywords
- run17×4.94%
- npm14×4.07%
- npm run12×3.49%
- php9×2.62%
- env7×2.03%
- wordpress7×2.03%
- admin6×1.74%
- environment6×1.74%
- http6×1.74%
- http localhost6×1.74%
- localhost6×1.74%
- npm run env6×1.74%
Store-IT – Contact
The Store-IT Contact plugin allows you to create and manage contact forms that automatically sync submissions with the Store-IT API. The plugin provides a complete form builder with styling options, field management, and multi-language support. Features Form Builder: Create unlimited contact forms with customizable fields Store-IT API Integration: Automatic submission synchronization with Store-IT services Multi-language Support: Available in English, Dutch, German, Spanish, Finnish, French, and Italian Customizable Styling: Full control over form appearance including colors, fonts, and spacing Field Management: Configure field visibility, requirements, labels, and validation reCAPTCHA Support: Built-in Google reCAPTCHA integration for spam protection Responsive Design: Mobile-friendly forms that adapt to any screen size Admin Dashboard: Complete management interface for forms and submissions Supported Form Fields Location (dropdown of available facilities) Request Type (dropdown of available request categories) Title (optional title field with predefined options) First Name (text input) Surname (text input) Phone Number (telephone input with validation) Email (email input with validation – required) Message (textarea for message content) reCAPTCHA (Google reCAPTCHA verification) Submit Button (form submission button) Multi-language Support The plugin includes translations for: * English (en) * Dutch (nl) * German (de) * Spanish (es) * Finnish (fi) * French (fr) * Italian (it) Configuration API Settings Navigate to Store-IT Contact > Global Settings Configure your API credentials: Base URL: Your Store-IT API endpoint Username: Your Store-IT API username Password: Your Store-IT API password Grant Type: Authentication method (default: password) Client ID: Your Store-IT API client ID reCAPTCHA Setup (Optional) Go to Store-IT Contact > Global Settings > reCAPTCHA Enter your Google reCAPTCHA credentials: Site Key: Your reCAPTCHA site key Secret Key: Your reCAPTCHA secret key Usage Creating a Contact Form Navigate to Store-IT Contact > Add New Form Configure the form settings (name, title, language, request types, locations) Customize styling in the Styling tab Configure fields in the Fields tab Set up notifications in the Notifications tab Displaying Forms Use the shortcode to display your form: [store_it_contact_form id=”your_form_id”] Requirements WordPress 5.0 or higher PHP 7.4 or higher Store-IT API access credentials cURL support for API communication External services This plugin relies on external services to provide its functionality: Store-IT API Integration The plugin connects to the Store-IT API to synchronize form submissions and create customer records. * Service Provider: Store-IT (https://store-it.eu/) * API Endpoints: – https://api.store-it365.eu (main API endpoint) – https://token.store-it365.eu/auth (authentication endpoint) * Data Sent: Form submission data including contact information (name, email, phone, address), request type, location, and message content * When Data is Sent: Every time a contact form is submitted on your website * Purpose: To create customer records and tasks in the Store-IT system for business management * Terms of Service: https://store-it.atlassian.net/wiki/x/EgDS5g * Privacy Policy: https://store-it.atlassian.net/wiki/x/EgDS5g Google reCAPTCHA (Optional) When enabled, the plugin uses Google reCAPTCHA to prevent spam submissions. * Service Provider: Google LLC * Service Endpoint: https://www.google.com/recaptcha/api.js * Data Sent: User interaction data and IP address for verification purposes * When Data is Sent: When users interact with the reCAPTCHA widget on the contact form * Purpose: Spam protection and bot detection * Terms of Service: https://policies.google.com/terms * Privacy Policy: https://policies.google.com/privacy Support For support and documentation, visit: * Store-IT Website: https://store-it.eu/ * Store-IT Software: https://store-it.eu/store356-de-software/ License This plugin is licensed under the GPL v2 or later. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA