Skip to content

Commit bf1fa4d

Browse files
authored
Merge pull request #70 from badasswp/release-1.8.0
Release 1.8.0
2 parents 97ecfcf + cc7a75b commit bf1fa4d

File tree

6 files changed

+20
-6
lines changed

6 files changed

+20
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 1.8.0
4+
* Feat: Add Search & Replace feature for table head, foot & caption.
5+
* Fix: Reset `Replace` input field.
6+
* Tested up to WP 6.8.
7+
38
## 1.7.0
49
* Fix: Issue with rich content replacement (HTML bearing string).
510
* Feat: On Modal open, show items found for Highlighted text.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "search-and-replace",
3-
"version": "1.7.0",
3+
"version": "1.8.0",
44
"description": "Search and Replace text within the Block Editor.",
55
"author": "badasswp",
66
"license": "GPL-2.0-or-later",
@@ -70,4 +70,4 @@
7070
"block",
7171
"editor"
7272
]
73-
}
73+
}

readme.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: badasswp, rajanand346, jargovi
33
Tags: search, replace, text, block, editor.
44
Requires at least: 6.0
55
Tested up to: 6.8
6-
Stable tag: 1.7.0
6+
Stable tag: 1.8.0
77
Requires PHP: 7.4
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -63,6 +63,11 @@ Want to add your personal touch? All of our documentation can be found [here](ht
6363

6464
== Changelog ==
6565

66+
= 1.8.0 =
67+
* Feat: Add Search & Replace feature for table head, foot & caption.
68+
* Fix: Reset `Replace` input field.
69+
* Tested up to WP 6.8.
70+
6671
= 1.7.0 =
6772
* Fix: Issue with rich content replacement (HTML bearing string).
6873
* Feat: On Modal open, show items found for Highlighted text.

search-replace-for-block-editor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Search and Replace for Block Editor
44
* Plugin URI: https://github.com/badasswp/search-and-replace
55
* Description: Search and Replace text within the Block Editor.
6-
* Version: 1.7.0
6+
* Version: 1.8.0
77
* Author: badasswp
88
* Author URI: https://github.com/badasswp
99
* License: GPL v2 or later

src/core/app.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const SearchReplaceForBlockEditor = (): JSX.Element => {
4040
const [ caseSensitive, setCaseSensitive ] = useState< boolean >( false );
4141
const [ context, setContext ] = useState< boolean >( false );
4242

43-
// Reference to the first field inside the modal
43+
// Reference to the first field inside the modal.
4444
const searchFieldRef = useRef< HTMLInputElement | null >( null );
4545

4646
/**
@@ -58,10 +58,11 @@ const SearchReplaceForBlockEditor = (): JSX.Element => {
5858
.getSelection()
5959
.toString();
6060

61-
// By default, reset count and search input.
61+
// By default, reset count, search & replace inputs.
6262
if ( ! selectedText ) {
6363
setReplacements( 0 );
6464
setSearchInput( '' );
65+
setReplaceInput( '' );
6566
}
6667
};
6768

src/core/filters.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ addAction(
3333
break;
3434

3535
case 'core/table':
36+
replaceBlockAttribute( args, 'head' );
3637
replaceBlockAttribute( args, 'body' );
38+
replaceBlockAttribute( args, 'foot' );
39+
replaceBlockAttribute( args, 'caption' );
3740
break;
3841

3942
default:

0 commit comments

Comments
 (0)