Rename plugin to SoloFilters Image Enhancements to avoid slug collision

This commit is contained in:
Keith Solomon
2026-08-05 18:37:07 -05:00
parent c2843f724a
commit bf3ee12e51
15 changed files with 40 additions and 40 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
{
"name": "image-filters",
"name": "solofilters-image-enhancements",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "image-filters",
"name": "solofilters-image-enhancements",
"version": "0.1.0",
"devDependencies": {
"@playwright/test": "^1.62.1",
+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "image-filters",
"name": "solofilters-image-enhancements",
"version": "0.1.0",
"private": true,
"description": "Instagram-style CSS filters for WordPress images.",
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @package ImageFilters
* @package SoloFiltersImageEnhancements
*
* Playwright configuration for the e2e smoke test.
*
+1 -1
View File
@@ -1,4 +1,4 @@
=== Image Filters ===
=== SoloFilters Image Enhancements ===
Contributors: ksolo
Tags: block, image, filter, instagram
Requires at least: 6.4
@@ -1,6 +1,6 @@
<?php
/**
* Plugin Name: Image Filters
* Plugin Name: SoloFilters Image Enhancements
* Description: Add Instagram-style CSS filters to images in the block editor.
* Version: 0.1.0
* Requires at least: 6.4
@@ -8,20 +8,20 @@
* Author: ksolo
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: image-filters
* Text Domain: solofilters-image-enhancements
* Domain Path: /languages
*
* @package ImageFilters
* @package SoloFiltersImageEnhancements
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'IMAGE_FILTERS_VERSION', '0.1.0' );
define( 'IMAGE_FILTERS_FILE', __FILE__ );
define( 'IMAGE_FILTERS_DIR', plugin_dir_path( __FILE__ ) );
define( 'IMAGE_FILTERS_URL', plugin_dir_url( __FILE__ ) );
define( 'SOLOFILTERS_IMAGE_ENHANCEMENTS_VERSION', '0.1.0' );
define( 'SOLOFILTERS_IMAGE_ENHANCEMENTS_FILE', __FILE__ );
define( 'SOLOFILTERS_IMAGE_ENHANCEMENTS_DIR', plugin_dir_path( __FILE__ ) );
define( 'SOLOFILTERS_IMAGE_ENHANCEMENTS_URL', plugin_dir_url( __FILE__ ) );
/**
* Bootstrap the plugin.
@@ -31,19 +31,19 @@ define( 'IMAGE_FILTERS_URL', plugin_dir_url( __FILE__ ) );
*
* @return void
*/
function image_filters_bootstrap(): void {
function solofilters_image_enhancements_bootstrap(): void {
if ( ! function_exists( 'register_block_type' ) ) {
return;
}
register_block_type(
IMAGE_FILTERS_DIR . 'build',
SOLOFILTERS_IMAGE_ENHANCEMENTS_DIR . 'build',
array(
'render_callback' => 'image_filters_render_block',
'render_callback' => 'solofilters_image_enhancements_render_block',
)
);
}
add_action( 'plugins_loaded', 'image_filters_bootstrap' );
add_action( 'plugins_loaded', 'solofilters_image_enhancements_bootstrap' );
/**
* Render callback for the Filtered Image block.
@@ -55,7 +55,7 @@ add_action( 'plugins_loaded', 'image_filters_bootstrap' );
* @param string $content Saved block content.
* @return string
*/
function image_filters_render_block( array $attributes, string $content = '' ): string {
function solofilters_image_enhancements_render_block( array $attributes, string $content = '' ): string {
return $content;
}
@@ -64,7 +64,7 @@ function image_filters_render_block( array $attributes, string $content = '' ):
*
* @return void
*/
function image_filters_load_textdomain(): void {
load_plugin_textdomain( 'image-filters', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
function solofilters_image_enhancements_load_textdomain(): void {
load_plugin_textdomain( 'solofilters-image-enhancements', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
}
add_action( 'init', 'image_filters_load_textdomain' );
add_action( 'init', 'solofilters_image_enhancements_load_textdomain' );
+1 -1
View File
@@ -8,7 +8,7 @@
"icon": "image-filter",
"description": "An image with an Instagram-style filter applied.",
"keywords": [ "filter", "instagram", "image" ],
"textdomain": "image-filters",
"textdomain": "solofilters-image-enhancements",
"supports": {
"align": [ "left", "center", "right", "wide", "full" ],
"anchor": true,
+5 -5
View File
@@ -6,7 +6,7 @@
* and intensity CSS custom property. The Inspector panel is mounted
* separately.
*
* @package ImageFilters
* @package SoloFiltersImageEnhancements
*/
import { __ } from '@wordpress/i18n';
@@ -40,10 +40,10 @@ export default function Edit( { attributes, setAttributes } ) {
allowedTypes={ [ 'image' ] }
multiple={ false }
labels={ {
title: __( 'Filtered Image', 'image-filters' ),
title: __( 'Filtered Image', 'solofilters-image-enhancements' ),
instructions: __(
'Upload or select an image to apply a filter.',
'image-filters'
'solofilters-image-enhancements'
),
} }
/>
@@ -60,9 +60,9 @@ export default function Edit( { attributes, setAttributes } ) {
<Button
onClick={ () => setIsEditing( true ) }
variant="secondary"
label={ __( 'Replace image', 'image-filters' ) }
label={ __( 'Replace image', 'solofilters-image-enhancements' ) }
>
{ __( 'Replace', 'image-filters' ) }
{ __( 'Replace', 'solofilters-image-enhancements' ) }
</Button>
) }
</ToolbarItem>
+3 -3
View File
@@ -1,7 +1,7 @@
/**
* Block registration entry point.
*
* @package ImageFilters
* @package SoloFiltersImageEnhancements
*/
import { registerBlockType } from '@wordpress/blocks';
@@ -48,7 +48,7 @@ function withFilterPanel( BlockEdit ) {
);
};
}
addFilter( 'editor.BlockEdit', 'image-filters/with-filter-panel', withFilterPanel );
addFilter( 'editor.BlockEdit', 'solofilters-image-enhancements/with-filter-panel', withFilterPanel );
/**
* Normalise the filter attribute on save. If the saved slug is unknown
@@ -70,7 +70,7 @@ function ensureValidFilter( settings, name ) {
}
addFilter(
'blocks.registerBlockType',
'image-filters/ensure-valid-filter',
'solofilters-image-enhancements/ensure-valid-filter',
ensureValidFilter
);
+5 -5
View File
@@ -5,7 +5,7 @@
* Both controls are Gutenberg-standard so keyboard navigation and ARIA
* behaviour are inherited from the framework.
*
* @package ImageFilters
* @package SoloFiltersImageEnhancements
*/
import { __ } from '@wordpress/i18n';
@@ -29,14 +29,14 @@ export function FilterPanel( { attributes, setAttributes } ) {
return (
<PanelBody
title={ __( 'Filter', 'image-filters' ) }
title={ __( 'Filter', 'solofilters-image-enhancements' ) }
initialOpen={ true }
className="ksolo-image-filter-panel"
>
<div
className="ksolo-image-filter-presets"
role="group"
aria-label={ __( 'Filter presets', 'image-filters' ) }
aria-label={ __( 'Filter presets', 'solofilters-image-enhancements' ) }
>
{ PRESETS.map( ( preset ) => {
const isActive = preset.slug === filter;
@@ -62,7 +62,7 @@ export function FilterPanel( { attributes, setAttributes } ) {
} ) }
</div>
<RangeControl
label={ __( 'Filter intensity', 'image-filters' ) }
label={ __( 'Filter intensity', 'solofilters-image-enhancements' ) }
value={ intensity }
min={ 0 }
max={ 100 }
@@ -72,7 +72,7 @@ export function FilterPanel( { attributes, setAttributes } ) {
onChange={ ( value ) => setAttributes( { intensity: value } ) }
help={ __(
'Set to 0 to disable the filter, 100 for full strength.',
'image-filters'
'solofilters-image-enhancements'
) }
/>
</PanelBody>
+1 -1
View File
@@ -5,7 +5,7 @@
* Adding a preset = add an entry here + add a matching .has-filter-<slug>
* rule in style.scss. Do not duplicate filter values elsewhere.
*
* @package ImageFilters
* @package SoloFiltersImageEnhancements
*/
export const PRESETS = [
+1 -1
View File
@@ -6,7 +6,7 @@
* saved HTML is fully static and no client-side JS is needed to display
* it.
*
* @package ImageFilters
* @package SoloFiltersImageEnhancements
*/
import { useBlockProps } from '@wordpress/block-editor';
+1 -1
View File
@@ -4,7 +4,7 @@
* The swatch grid and inspector panel live here — they only need to render
* inside the editor canvas.
*
* @package ImageFilters
* @package SoloFiltersImageEnhancements
*/
.ksolo-image-filter-panel {
+1 -1
View File
@@ -18,7 +18,7 @@
* is 0 — visually darker than identity, but the only shape that keeps
* intensity=1 exact.
*
* @package ImageFilters
* @package SoloFiltersImageEnhancements
*/
.wp-block-ksolo-image-filter {
+1 -1
View File
@@ -5,7 +5,7 @@
* - "From" core Image: copies image attributes, sets filter="normal",
* intensity=100.
*
* @package ImageFilters
* @package SoloFiltersImageEnhancements
*/
import { DEFAULT_PRESET } from './presets';
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @package ImageFilters
* @package SoloFiltersImageEnhancements
*
* End-to-end smoke test for the Filtered Image block.
*