• It would be a really nice feature if this plugin supported JSON strings in the database. For example, Elementor saves a lot of JSON to the wp_postmeta table and BSR won’t catch it unless you know to JSON encode your find and replace strings.

    I’ve implemented this pretty simply before, i.e.:

    $find = 'https://example.com';
    $replace = 'https://replaced.com';
    $data = '[{"url":"https:\/\/example.com"}]';

    $jsonDecoded = json_decode( $data );
    $isJson = is_array( $jsonDecoded ) || is_object( $jsonDecoded );
    $findTerm = $find;
    $replaceTerm = $replace;

    if ($isJson) {
    $findTerm = trim( json_encode( $find ), '"' );
    $replaceTerm = trim( json_encode( $replace ), '"' );
    }

    // now replace $findTerm with $replaceTerm
    • This topic was modified 1 day, 17 hours ago by afwebdev.
    • This topic was modified 1 day, 17 hours ago by afwebdev.

You must be logged in to reply to this topic.