Add CSV Format search/replace to Search & Replace Tab#82
Merged
Conversation
Created CSV entry in Search & Replace tab Pass csv data to replace_values function Note: Change counter will only increment on cells changed and not number of changes made in a cell Missing: Multilingual support
CSV label now uses esc_html_e function. Updated default to no longer include "(optional)" for improved readability. Still lacking translation to other langauges.
Per the important GUID note here: https://codex.wordpress.org/Changing_The_Site_URL#Important_GUID_Note
Author
|
@devbanana Do you have thoughts on this pull request? I'd like to fix issues if they exist. |
bueltge
reviewed
Jun 15, 2017
bueltge
left a comment
Contributor
There was a problem hiding this comment.
@devbanana THe codex of the source is wrong. I added two hints an two examples, maybe you will fix this and add this to the pull request? Thanks a lot for your effort.
| //check if we need to replace something | ||
| //skip primary_key | ||
| if ( $search !== '' && $column !== $primary_key ) { | ||
| if ( $search !== '' && $column !== $primary_key && $column !== "guid") { |
Contributor
There was a problem hiding this comment.
Always we use single quote mark, is much faster.
| $value | ||
| ); | ||
|
|
||
| if($csv != null) { |
Contributor
There was a problem hiding this comment.
We need whitespace, like in this example if ( $csv !== null ) { and also a identical usage, strict !== instead of ==.
Contributor
|
I merge this pull request in a new branch to fix the formatting issues. |
bueltge
added a commit
that referenced
this pull request
Jun 15, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've found myself in need of a bulk search/replace function for some time now to handle broken links that occur when importing a site from HTML to Wordpress. To that end, I've added a CSV option to the Search & Replace tab.
The CSV option's label is missing translations for German and Chinese.