---
title: The Easiest Way to Discover do_action, add_action &amp; add_filter in Plugins
date: 2025-11-30T17:19:02Z
modified: 2026-09-22T19:51:44Z
permalink: "https://techarticles.co.uk/the-easiest-way-to-discover-do_action-add_action-add_filter-in-plugins/"
type: post
status: publish
excerpt: ""
wpid: 5786
categories:
  - Blog
  - Coding
  - SureMembers
  - Wordpress
timestamp: 2026-09-22T19:51:44Z
tags:
  - Blog
  - Coding
  - SureMembers
  - Wordpress
---

Learn how to quickly find all `do_action`, `add_action`, `apply_filter` and `add_filter` calls inside any WordPress plugin — even if you’re not a developer. I show two simple methods: searching with [Notepad++](https://notepad-plus-plus.org/) and using the command line with grep. Perfect for anyone trying to understand what hooks a plugin provides.

## Notepad++

This one is reasonably easy to do: download and install the application and then do a find in files Search -> Find in files ( CTRL + SHIFT + F)

![finding action hooks filters tutorial](https://techarticles.co.uk/wp-content/uploads/2025/11/finding-action-hooks-filters-tutorial.png)

1. What we are looking for in this case add\_action
2. file type \*.php
3. Where to look select the plugins base directory
4. Find all our Add\_actions

## Any Command Prompt with Grep available

This is simple, you can run these without these the . > do-action.txt if you want them output on the screen, but it’s easier if you do it on output toa text file to allow you to look through it easier.

grep -RIn --include="*.php" "do_action" . > do-action.txt
grep -RIn --include="*.php" "add_action" . > add-action.txt
grep -RIn --include="*.php" "add_filter" . > add-filter.txt
grep -RIn --include="*.php" "apply_filter" . > apply-filter.txt```
<span class="line"><span style="color: #E1E4E8">grep </span><span style="color: #F97583">-</span><span style="color: #E1E4E8">RIn </span><span style="color: #F97583">--</span><span style="color: #E1E4E8">include</span><span style="color: #F97583">=</span><span style="color: #9ECBFF">"*.php"</span><span style="color: #E1E4E8"> </span><span style="color: #9ECBFF">"do_action"</span><span style="color: #E1E4E8"> . </span><span style="color: #F97583">></span><span style="color: #E1E4E8"> </span><span style="color: #F97583">do-</span><span style="color: #E1E4E8">action.txt</span></span>
<span class="line"><span style="color: #E1E4E8">grep </span><span style="color: #F97583">-</span><span style="color: #E1E4E8">RIn </span><span style="color: #F97583">--</span><span style="color: #E1E4E8">include</span><span style="color: #F97583">=</span><span style="color: #9ECBFF">"*.php"</span><span style="color: #E1E4E8"> </span><span style="color: #9ECBFF">"add_action"</span><span style="color: #E1E4E8"> . </span><span style="color: #F97583">></span><span style="color: #E1E4E8"> add</span><span style="color: #F97583">-</span><span style="color: #E1E4E8">action.txt</span></span>
<span class="line"><span style="color: #E1E4E8">grep </span><span style="color: #F97583">-</span><span style="color: #E1E4E8">RIn </span><span style="color: #F97583">--</span><span style="color: #E1E4E8">include</span><span style="color: #F97583">=</span><span style="color: #9ECBFF">"*.php"</span><span style="color: #E1E4E8"> </span><span style="color: #9ECBFF">"add_filter"</span><span style="color: #E1E4E8"> . </span><span style="color: #F97583">></span><span style="color: #E1E4E8"> add</span><span style="color: #F97583">-</span><span style="color: #E1E4E8">filter.txt</span></span>
<span class="line"><span style="color: #E1E4E8">grep </span><span style="color: #F97583">-</span><span style="color: #E1E4E8">RIn </span><span style="color: #F97583">--</span><span style="color: #E1E4E8">include</span><span style="color: #F97583">=</span><span style="color: #9ECBFF">"*.php"</span><span style="color: #E1E4E8"> </span><span style="color: #9ECBFF">"apply_filter"</span><span style="color: #E1E4E8"> . </span><span style="color: #F97583">></span><span style="color: #E1E4E8"> apply</span><span style="color: #F97583">-</span><span style="color: #E1E4E8">filter.txt</span></span>
```JavaScript

![](https://i.ytimg.com/vi/2g1vbgesENI/maxresdefault.jpg)