內容簡介
WordPress 3.7 中「name_like」參數被更改為符合包含「name__like」字串的詞彙。如果你想要和 3.7 之前的版本一樣,只匹配以「name__like」字串開始的詞彙,請使用此外掛或在自己的(子)佈景主題中使用外掛檔案中的相關函數。
這個外掛可逆轉此 Trac 票所作的更改。
https://core.trac.wordpress.org/ticket/8214
「search」參數幾乎做了和「name__like」參數現在 (在 3.7 版本) 一模一樣的事情,唯一的差別是它還搜尋詞彙的別名。若要取得你想要的詞彙,請使用兩個參數 (就像 3.7 版本之前的一樣)。
請參閱:https://codex.wordpress.org/Function_Reference/get_terms#Parameters
注意:此外掛僅會在 WordPress 3.7 及以上版本的網站前端逆轉此更改。
外掛標籤
開發者團隊
原文外掛簡介
The “name_like” parameter was changed in WordPress 3.7 to match terms that contain the “name__like” string. Use this plugin or use the function from the plugin file in your own (child) theme if you want it to only match terms that begin with the “name__like” string as it was prior to 3.7.
This reverses the changes made in this trac ticket.
https://core.trac.wordpress.org/ticket/8214
The “search” parameter does almost exactly what the “name__like” parameter does now (in 3.7), the difference being it also searches in term slugs. Use both parameters (as it was before 3.7) to get the terms you want.
See: https://codex.wordpress.org/Function_Reference/get_terms#Parameters
Note: this plugin only reverses it on the front end of your website for WordPress versions 3.7 and up.
