Поиск записей, использующих вложение

Описание

Позволяет найти все записи, где используется то или иное вложение (изображение, видео и т.д.).

Добавляет колонку «Используется» в библиотеку файлов в режиме списка, а также в окно параметров файла.

Находит записи, использующие изображение (включая дополнительные размеры) в содержимом, а также в качестве изображения записи. Работает с произвольными типами записей.

Навеяно публикацией об изображениях на WP Tavern.

Скриншоты

  • Колонка «Используется» в библиотеке файлов.
  • Колонка «Используется» в окне параметров файла.

Установка

  1. Загрузите папку find-posts-using-attachment в /wp-content/plugins/.
  2. Активируйте плагин на странице «Плагины» в панели управления WordPress.

Отзывы

25.08.2019
The plugin let me find posts and pages associated with an image so I could delete duplicate images. To use on Multisite, I installed on the main site and activated on the subsite.
19.04.2019
Really useful for tracking down where attachments have been used. Only two drawbacks I've found is that (1) it seems to look quite narrowly at the contents of posts and their featured images, rather than across a site more broadly, (2) on my site (with over 8,000 images and over 10,000 posts, to be fair) it slows down the backend very considerably.
09.02.2019
The idea is very smart! It does not find all the pictures (for example it fails with those used in a landing page built with a third part plugin, or with images not loaded in a specific page, as the logo or the default title image uploaded in a theme-dependent location). But it works great for pictures actually loaded in a specific page or article, also (as of today 9.2.19) in WP-bakery elements. Thanks!
17.12.2018
I was pulling my hair out looking at raw database dumps lamenting the fact that WordPress does not bake in a way to see where each media asset is used. Then I thought, "There must be a plugin for that," and found this, which works great for me. One thing I notice is that it does not work on some early posts and imported posts. For me this was about 6-8 images out of 400. Those were easy enough to track down. There are a few more it won't find because they aren't in the database - the image on my custom 404 page, for example. Here again, I wish that WordPress would just do like Drupal and let you create a regular page and, in the settings, designate it as a 404 page (Drupal has methods for keeping the server load light for 404s even though they are full pages). But, since it's hardcoded and that info is not in the DB, obviously no plugin can figure that out. So to those who are saying it shows some or a lot of unused images, that's probably a result of the way your images are added to posts. When I looked at posts that I knew used images that where flagged as unused, all I had to do was add the image again, using the standard Add Media button and this plugin instantly picked it up. So, yes, it did not catch 100% of the images. Still, for me, this has been a huge time saver. And guys... it's free. Volunteer labor created this. Thanks Sergey!!
Посмотреть все 18 отзывов

Участники и разработчики

«Поиск записей, использующих вложение» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:

Участники

«Поиск записей, использующих вложение» переведён на 2 языка. Благодарим переводчиков за их работу.

Перевести «Поиск записей, использующих вложение» на ваш язык.

Заинтересованы в разработке?

Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.

Журнал изменений

1.0

  • Первая версия