Cb Copyright GitLab
by The WordPress Contributors · gitlab.com/personal-projects9890238/first-custom-block-wordpress-react-plugin
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://gitlab.com/personal-projects9890238/first-custom-block-wordpress-react-plugin/-/archive/master/first-custom-block-wordpress-react-plugin-master.zipReadme
Here's the updated README.md with the requested link added:
# CB Copyright Block
The **CB Copyright** block is a dynamic WordPress block that lets you easily display copyright information on your site. It includes an option to display a starting date, making it flexible for use cases like showing the first year of publication.
## Features
- **Dynamic Rendering:** Automatically updates copyright year using server-side rendering.
- **Customizable Starting Date:** Option to display the starting year alongside the current year.
- **React-powered:** Built with React and WordPress's block editor tools for seamless integration.
- **Modern Design:** Simple and stylish, with customizable styles.
## Installation
To use this block in your WordPress project:
1. Clone or download this repository.
2. Place the folder in the `wp-content/plugins/` directory of your WordPress installation.
3. Navigate to the block's directory and install dependencies:
```bash
npm install
- Build the block:
npm run build - Activate the plugin in the WordPress admin dashboard.
Usage
- Open the WordPress block editor.
- Search for the CB Copyright block in the block inserter.
- Add it to your page or post.
- Customize the block settings:
- Toggle the "Displaying starting date" option to show or hide the starting year.
- Enter the starting year in the provided input field (if the option is enabled).
Resources
- WordPress Block Editor Components Reference: https://developer.wordpress.org/block-editor/reference-guides/components/
Screenshots
Default Block

With Starting Date

Files and Structure
src/: Source code for the block (React components).build/: Compiled JavaScript files for production.block.json: Metadata file for block registration.index.php: Server-side block registration and rendering logic.
Development
To modify or enhance the block:
- Start the development server:
npm start - Edit the files in the
src/directory. Changes will be reflected in real time.
Scripts
npm start: Start the development server.npm run build: Build the block for production.npm run format: Format the code with Prettier.npm run lint:css: Lint CSS files.npm run lint:js: Lint JavaScript files.
Requirements
- WordPress 5.8 or higher
- Node.js 14 or higher
- npm 6 or higher
License
This project is licensed under the MIT License.
Contributing
Contributions are welcome! If you find issues or have ideas for improvements, feel free to open an issue or submit a pull request.
Acknowledgments
This block was created using the @wordpress/create-block package.
The new "Resources" section includes the link to the WordPress Block Editor Components reference.