String Locator

外掛說明

使用佈景主題及外掛時,使用者有時候會注意到某些字串可能採用硬式編碼方式撰寫在檔案中;這種字串需要修改時,卻不知道字串是屬於哪個佈景主題或外掛,自然也就不知道要搜尋哪個檔案。

這個外掛能搜尋網站上的佈景主題、外掛,甚至是核心程式,並在搜尋後會顯示檔案清單,其中會包含相符的文字及符合搜尋結果的檔案名稱及行號,之後只要點擊搜尋結果中的連結,便能快速進行編輯。

依照預設,檔案完成編輯後,便會進行一致性檢查,協助使用者尋找常常因故遺漏的大括弧、括弧及不一致之處,這可以大幅降低編輯操作對網站的風險。請注意,無法絕對保證安全。

在測試替代項目前,請先建立正式網站的副本,也就是 WordPress 預備環境網站。

螢幕擷圖

  • 搜尋字串「hello dolly」的畫面
  • 停用編輯功能的搜尋畫面
  • 點擊其中一個結果的連結,便會在瀏覽器中載入編輯器
  • 智慧型偵測偵測到大括弧使用的不一致

常見問題集

進行編輯時,智慧型掃描是否能保證網站安全無虞?

雖然這個外掛會偵測常用符號 (括弧、中括弧及大括弧), 的不正確使用方式,但無法保證能偵測到全部錯誤。最好的安全防護,是即使沒有進行編輯,也持續備份網站。

從 1.6 版開始,這個外掛會在完成編輯後檢查網站狀況。如果網站傳回網站停擺的錯誤代碼,這個外掛便會將編輯後發生錯誤的檔案還原至舊版的檔案。

搜尋失敗且系統告知搜尋的模式無效

這個錯誤僅會發生於使用規則運算式進行搜尋,並且與 PHP 讀取規則運算式字串的方式有關。

撰寫搜尋字串時,請務必使用正斜線 (/) 包含搜尋字串,並直接串接任何想要使用的修飾詞,例如不區分大小寫的 i

使用者評論

2025 年 6 月 24 日
I’ve used this plugin now a dozen times to track down plugins conflicts for my customers. Truly one of the best debug utilities, up there with Query Monitor!
2025 年 1 月 18 日
WarningThe maximum time your server allows a script to run (1) is too low for the plugin to run as intended, at startup 2 seconds have passed I reached out to my hosting and they said to reach out to you with the error. “the PHP max_execution_time is currently set to 120” no support
2024 年 11 月 24 日
A powerful addition to your debugging toolkit.
2024 年 10 月 2 日
Hello, this plugin saved lot my time to translate my website! Thank you for this amazing and very usefull plugin! :))))
閱讀全部 122 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈String Locator〉的開發相關工作。

參與者

〈String Locator〉外掛目前已有 17 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈String Locator〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

2.6.7 (2025-01-15)

  • Fixed secured unserialized data handling to prevent potential vulnerabilities.
  • Verified compatibility with WordPress 6.7

2.6.6 (2024-08-21)

  • Fixed missing URL input sanitization.
  • Verified compatibility with WordPress 6.6

2.6.5 (2024-03-12)

  • Verified compatibility with WordPress 6.5

2.6.4 (2024-03-12)

  • Verified compatibility with WordPress 6.4

2.6.3 (2023-08-10)

  • CSS/JS Loading bug fixes

2.6.2 (2023-08-10)

  • Added InstaWP integration.
  • WP ORG Support ticket fixes.

2.6.1 (2022-11-02)

  • Fixed a bug causing certain setups to be unable to perform searches when editing would also be unavailable.
  • Fixed a bug causing certain plugins to prevent the search results list from being displayed properly.
  • Verified compatibility with WordPress 6.1

2.6.0 (2022-07-20)

  • Added database search feature.
  • Added tools for quickly replacing data in the search results.
  • Added many more filters and actions.
  • Added hardening of file path checks.
  • Removed one-time donation notice.
  • Removed jQuery dependency in favor of vanilla JavaScript code.
  • Separated search class into a base class for extenders.
  • Fixed bug with code viewer sizes when resizing your window.
  • Fixed bug in the list view if special characters were in the search string.
  • Fixed a bug where RegEx search validation may have a false positive check for invalid patterns.
  • Fixed missing translator function if Javascript is missing.
  • Improved capability checks for displaying the search interface when editing is disabled.

Older entries

See changelog.txt for the version history.