mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-10-30 01:36:27 +01:00
Search pages by slug and folder name too (#1183)
In search bar to search pages not only by title and content, but by slug and folder name too.
This commit is contained in:
committed by
Andy Miller
parent
eb3c0d7ac1
commit
7f5cae8b47
@@ -1479,6 +1479,7 @@ class AdminController extends AdminBaseController
|
||||
foreach ($queries as $query) {
|
||||
$query = trim($query);
|
||||
if (stripos($page->getRawContent(), $query) === false && stripos($page->title(),
|
||||
$query) === false && stripos($page->slug(), \Grav\Plugin\Admin\Utils::slug($query)) === false && stripos($page->folder(),
|
||||
$query) === false
|
||||
) {
|
||||
$collection->remove($page);
|
||||
|
||||
Reference in New Issue
Block a user