Plugin Directory

Changeset 3013685


Ignore:
Timestamp:
12/23/2023 05:02:51 PM (2 years ago)
Author:
easywpstuff
Message:

update

Location:
easy-search-replace
Files:
12 added
2 edited

Legend:

Unmodified
Added
Removed
  • easy-search-replace/trunk/easy-search-replace.php

    r3013680 r3013685  
    33 * Plugin Name: Easy Search Replace
    44 * Description: Easy Search Replace is a plugin that allows you to search and replace text within your WordPress.
    5  * Version: 1.0.0
     5 * Version: 1.0.1
    66 * Author: Uzair
    77 * Author URI: https://easywpstuff.com
     
    1515
    1616require_once 'inc/options.php';
     17require_once 'lib/dom.php';
    1718
    1819function esrn_search_replace_start($buffer) {
     
    3435        // Perform the search and replace
    3536        if (!empty($selector)) {
    36             $buffer = str_replace($search, $replace, $buffer);
     37            $dom = esr_str_get_html($buffer, false, true, 'UTF-8', false, PHP_EOL, ' ');
     38
     39            $elements = $dom->find($selector);
     40
     41            foreach ($elements as $element) {
     42                $element->innertext = str_replace($search, $replace, $element->innertext);
     43            }
     44
     45            $buffer = $dom->save();
    3746        } else {
    3847            $buffer = str_replace($search, $replace, $buffer);
  • easy-search-replace/trunk/readme.txt

    r3013680 r3013685  
    1 === Easy Search and Replace ===
     1=== Easy Search and Replace - Find and Replace url or anything or specific element ===
    22Contributors: easywpstuff
    33Tags: search, replace, find replace, search replace
    44Requires at least: 5.0
    5 Tested up to: 6.3
     5Tested up to: 6.4.2
    66Requires PHP: 5.6
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88License: GNU General Public License v2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
     11Real time search and replace without altering the files or database. find and replace inside specific HTML element with CSS Selector
     12
    1113== Description ==
    1214
    13 The **Easy Search and Replace** plugin allows you to perform real-time text replacements without altering the actual files. It includes an optional CSS selector feature, which allows you to perform replacements within specific CSS selectors like classes, IDs, or tags.
     15The **Easy Search and Replace** plugin allows you to perform real-time text, html or url replacements without altering the actual files. It includes an optional CSS selector feature, which allows you to perform replacements within specific CSS selectors like classes, IDs, or tags.
    1416
    1517== Features ==
    1618
    17 - Perform real-time text replacements without modifying original files.
     19- Perform real-time HTML, text or url replacements without modifying original files.
    1820- Specify text or code to find and replace.
    1921- Optional CSS selector support for targeted replacements within classes, IDs, or tags.
Note: See TracChangeset for help on using the changeset viewer.