You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 42c9851
Browse filesBrowse the repository at this point in the historyBrowse files
Log the value --callback returned instead of an ordinary replacement
The log (and the dry-run preview) simulated replacing the matches with
<new>. Keep the before/after strings of the actual callback run and log
the part that changed, without calling the callback again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UWTd5pwpi2xQfDA6mUYkkx
And I run `wp post create --post_title='foo bar' --porcelain`
283
+
And save STDOUT as {POST_ID}
284
+
285
+
When I run `wp search-replace 'foo''baz' wp_posts --include-columns=post_title --callback='test_callback' --require=callback-function.php --dry-run --log`
286
+
Then STDOUT should contain:
287
+
"""
288
+
Success: 1 replacement to be made.
289
+
"""
290
+
And STDOUT should contain:
291
+
"""
292
+
wp_posts.post_title:{POST_ID}
293
+
< foo bar
294
+
> BAZ bar
295
+
"""
296
+
297
+
When I run `wp search-replace 'foo''baz' wp_posts --include-columns=post_title --callback='test_callback' --require=callback-function.php --log=- --before_context=2 --after_context=2`
0 commit comments