{"id":42520723,"url":"https://github.com/badasswp/search-and-replace","last_synced_at":"2026-01-28T15:18:06.980Z","repository":{"id":246648162,"uuid":"821733024","full_name":"badasswp/search-and-replace","owner":"badasswp","description":"Search and Replace text within the WP Block Editor.","archived":false,"fork":false,"pushed_at":"2025-10-27T16:47:58.000Z","size":987,"stargazers_count":8,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-30T01:44:44.953Z","etag":null,"topics":["gutenberg","plugin","replace","search","wordpress"],"latest_commit_sha":null,"homepage":"https://wordpress.org/plugins/search-replace-for-block-editor/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/badasswp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-29T09:27:01.000Z","updated_at":"2025-10-27T16:41:35.000Z","dependencies_parsed_at":"2024-06-29T11:34:38.884Z","dependency_job_id":"408e7494-56b0-4cdd-96d5-421a5416825d","html_url":"https://github.com/badasswp/search-and-replace","commit_stats":null,"previous_names":["badasswp/search-and-replace"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/badasswp/search-and-replace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badasswp%2Fsearch-and-replace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badasswp%2Fsearch-and-replace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badasswp%2Fsearch-and-replace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badasswp%2Fsearch-and-replace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badasswp","download_url":"https://codeload.github.com/badasswp/search-and-replace/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badasswp%2Fsearch-and-replace/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28846203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gutenberg","plugin","replace","search","wordpress"],"created_at":"2026-01-28T15:18:06.321Z","updated_at":"2026-01-28T15:18:06.973Z","avatar_url":"https://github.com/badasswp.png","language":"TypeScript","readme":"# search-and-replace\nSearch and Replace text within the Block Editor quickly and easily.\n\n\u003cimg width=\"446\" alt=\"search-and-replace\" src=\"https://github.com/badasswp/search-and-replace/assets/149586343/c3febf99-e9db-4b7b-82fd-c01e5428123a\"\u003e\n\n## Download\n\nDownload from [WordPress plugin repository](https://wordpress.org/plugins/search-replace-for-block-editor/).\n\nYou can also get the latest version from any of our [release tags](https://github.com/badasswp/search-and-replace/releases).\n\n## Why Search and Replace for Block Editor?\n\nThis plugin brings the familiar __Search and Replace__ functionality that PC users have grown accustomed to while using __Microsoft Word__ and __Google Docs__ to the Block Editor.\n\nNow you can easily search and replace text right in the Block Editor. Its easy and does exactly what it says. You can also match the text case using the 'Match Case | Expression' toggle.\n\nhttps://github.com/badasswp/search-and-replace/assets/149586343/d4acfab3-338b-434f-b09c-769df9331095\n\n### Hooks\n\n#### `search-replace-for-block-editor.allowedBlocks`\n\nThis custom hook (filter) provides the ability to include the search and replace functionality for your custom block:\n\n```js\nimport { addFilter } from '@wordpress/hooks';\n\naddFilter(\n\t'search-replace-for-block-editor.allowedBlocks',\n\t'yourBlocks',\n\t( allowedBlocks ) =\u003e {\n\t\tif ( allowedBlocks.indexOf( 'your/block' ) === -1 ) {\n\t\t\tallowedBlocks.push( 'your/block' );\n\t\t}\n\n\t\treturn allowedBlocks;\n\t}\n);\n```\n\n**Parameters**\n\n- allowedBlocks _`{string[]}`_ List of Allowed Blocks.\n\u003cbr/\u003e\n\n#### `search-replace-for-block-editor.replaceBlockAttribute`\n\nThis custom hook (action) provides the ability to include search and replace functionality for custom blocks with custom properties:\n\n```js\nimport { addAction } from '@wordpress/hooks';\n\naddAction(\n\t'search-replace-for-block-editor.replaceBlockAttribute',\n\t'yourBlock',\n\t( replaceBlockAttribute, name, args ) =\u003e {\n\t\tconst prop = 'title';\n\n\t\tswitch ( name ) {\n\t\t\tcase 'namespace/your-block':\n\t\t\t\treplaceBlockAttribute( args, prop );\n\t\t\t\tbreak;\n\t\t}\n\t}\n);\n```\n\n**Parameters**\n\n- replaceBlockAttribute _`{Function}`_ By default, this is a function that takes in an `args` and `property` as params.\n- name _`{string}`_ By default, this is a string containing the `name` of the block.\n- args _`{Object}`_ By default, this is an object containing the `element`, `pattern`, `text` and `status`.\n\u003cbr/\u003e\n\n#### `search-replace-for-block-editor.handleAttributeReplacement`\n\nThis custom hook (filter) provides a way to modify how the search and replace functionality works for custom attributes for e.g. non-text attributes or objects.\n\n```js\nimport { addFilter } from '@wordpress/hooks';\n\naddFilter(\n\t'search-replace-for-block-editor.handleAttributeReplacement',\n\t'yourNamespace',\n\t( oldAttr, args ) =\u003e {\n\t\tconst { name, pattern, handleAttributeReplacement } = args;\n\n\t\tif ( 'your-custom-block' === name ) {\n\t\t\tconst newAttr = oldAttr.replace(\n\t\t\t\tpattern,\n\t\t\t\thandleAttributeReplacement\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tnewAttr,\n\t\t\t\tisChanged: oldAttr === newAttr,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tnewAttr: oldAttr,\n\t\t\tisChanged: false,\n\t\t};\n\t}\n);\n```\n\n**Parameters**\n\n- oldAttr _`{any}`_ Old Attribute.\n- name _`{string}`_ Name of Block.\n- pattern _`{RegExp}`_ Regular Expression pattern.\n- handleAttributeReplacement _`{Function}`_ Replace Callback.\n\u003cbr/\u003e\n\n#### `search-replace-for-block-editor.keyboardShortcut`\n\nThis custom hook (filter) provides a way for users to specify their preferred keyboard shortcut option. For e.g to use the 'K' option on your keyboard, you could do like so:\n\n```js\nimport { addFilter } from '@wordpress/hooks';\n\naddFilter(\n\t'search-replace-for-block-editor.keyboardShortcut',\n\t'yourShortcut',\n\t( shortcut ) =\u003e {\n\t\treturn {\n\t\t\tcharacter: 'k',\n\t\t\t...shortcut,\n\t\t};\n\t}\n);\n```\n\n**Parameters**\n\n- shortcut _`{Object}`_ By default this is an object, containing `modifier` and `character` properties which together represent the following command `CMD + SHIFT + F`.\n\u003cbr/\u003e\n\n#### `search-replace-for-block-editor.caseSensitive`\n\nThis custom hook (filter) provides a way for users to specify the case sensitivity of each Search \u0026 Replace activity. For e.g. to make it case sensitive, you can do like so:\n\n```js\nimport { addFilter } from '@wordpress/hooks';\n\naddFilter(\n\t'search-replace-for-block-editor.caseSensitive',\n\t'yourCaseSensitivity',\n\t( isCaseSensitive ) =\u003e {\n\t\treturn true;\n\t}\n);\n```\n\n**Parameters**\n\n- isCaseSensitive _`{bool}`_ By default, this is a falsy value.\n\n---\n\n## Contribute\n\nContributions are __welcome__ and will be fully __credited__. To contribute, please fork this repo and raise a PR (Pull Request) against the `master` branch.\n\n### Pre-requisites\n\nYou should have the following tools before proceeding to the next steps:\n\n- Composer\n- Yarn\n- Docker\n\nTo enable you start development, please run:\n\n```bash\nyarn start\n```\n\nThis should spin up a local WP env instance for you to work with at:\n\n```bash\nhttp://srbe.localhost:5187\n```\n\nYou should now have a functioning local WP env to work with. To login to the `wp-admin` backend, please use `admin` for username \u0026 `password` for password.\n\n__Awesome!__ - Thanks for being interested in contributing your time and code to this project!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadasswp%2Fsearch-and-replace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadasswp%2Fsearch-and-replace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadasswp%2Fsearch-and-replace/lists"}