A WordPress Gutenberg block plugin that provides a customizable link block with advanced styling options and hover effects.
LinkStar adds a powerful link block to the WordPress block editor with extensive customization options including hover effects, icon support, and advanced styling controls. The block is perfect for creating call-to-action buttons, styled navigation elements, and interactive link components.
- WordPress: 6.7 or higher
- PHP: 7.4 or higher
- Node.js: 18.0 or higher
- npm/yarn: Latest stable version
- Clone the repository into your WordPress plugins directory:
cd wp-content/plugins/
git clone <repository-url> link-star
cd link-star- Install dependencies:
npm install
# or
yarn install- Start development mode:
npm start
# or
yarn start- Activate the plugin in WordPress admin
| Command | Description |
|---|---|
npm start |
Start development mode with hot reload and blocks manifest |
npm run build |
Build production-ready files with blocks manifest |
npm run format |
Format code using WordPress Prettier config |
npm run lint:js |
Lint JavaScript files |
npm run lint:css |
Lint CSS/SCSS files |
npm run packages-update |
Update @wordpress packages to latest versions |
npm run plugin-zip |
Create a distributable plugin ZIP file |
- Start Development Server:
npm startThis will watch for changes and automatically rebuild the block.
-
Make Your Changes:
- Edit files in
src/linkstar/ - Changes will be hot-reloaded in the editor
- Edit files in
-
Build for Production:
npm run build- Test Your Changes:
- Add the block to a page/post in the WordPress editor
- Test all features and styling options
- Check browser console for errors
npm run buildThis will:
- Compile and minify JavaScript
- Process and minify SCSS to CSS
- Generate asset dependency files
- Create blocks manifest
- Output to
build/directory
npm run plugin-zipThis creates a link-star.zip file ready for:
- WordPress.org submission
- Manual installation
- Client delivery
The plugin ZIP includes:
build/- Compiled assetslanguages/- Translation fileslink-star.php- Main plugin filereadme.txt- WordPress.org readme- Excludes:
node_modules/,src/, dev config files
The plugin uses the text domain: link-star
In JavaScript:
import { __ } from '@wordpress/i18n';
const label = __('Link URL', 'linkstar');In PHP:
__( 'LinkStar', 'linkstar' );Translation files should be placed in the languages/ directory following WordPress naming conventions.
Happy Coding! 🚀