Changeset 3364324
- Timestamp:
- 09/19/2025 05:30:46 AM (6 months ago)
- File:
-
- 1 edited
-
hook-locator/tags/1.0/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hook-locator/tags/1.0/readme.txt
r3362969 r3364324 1 1 === Hook Locator === 2 2 Contributors: jdahir0789 3 Tags: hooks, debug, search, actions, filters3 Tags: hooks, woocommece, actions, filters, code analysis 4 4 Requires at least: 5.0 5 5 Tested up to: 6.8 … … 12 12 License URI: https://www.gnu.org/licenses/gpl-2.0.html 13 13 14 P rofessional WordPress hook analysis tool for developers. Search and analyze hook usage in plugins and themes with detailed code context.14 Powerful WordPress developer tool to search, analyze, and debug hooks (actions & filters) in plugins and themes. Perfect for plugin developers, theme authors, auditors, and site maintainers. 15 15 16 16 == Description == 17 17 18 **Hook Locator** is the ultimate WordPress development tool for analyzing hook usage across your plugins and themes. Built for developers, it provides a professional admin interface to search, analyze, and understand WordPress hook implementations. 18 **Hook Locator** is a professional WordPress development tool that helps you **search, analyze, and debug hooks (actions and filters)** across all plugins and themes. 19 20 Whether you’re building a custom plugin, analyzing a theme, or debugging site issues, Hook Locator makes it easy to find `add_action`, `add_filter`, `do_action`, `apply_filters`, and other hooks with complete code context. 21 22 Unlike runtime hook loggers, Hook Locator uses **static code analysis**, so it works faster, safer, and more accurately. You get a full picture of hook usage without slowing down your site. 23 24 ### Why Use Hook Locator? 25 26 * **Find WordPress hooks instantly** – Search any hook name (`init`, `wp_head`, `save_post`, or custom hooks) 27 * **Analyze plugins and themes** – Organized dropdowns for scanning specific directories 28 * **Debug faster** – View exact file paths, line numbers, and code context with highlighting 29 * **Optimize performance** – Detect unnecessary or conflicting hooks 30 * **Improve code quality** – Ensure proper usage of actions and filters 31 * **Developer-friendly UI** – Modern, professional, and follows WordPress admin design standards 19 32 20 33 ### Key Features 21 34 22 * **Advanced Hook Search** - Find any WordPress hook across all plugins and themes23 * ** Organized Directory Selection** - Separate dropdowns for plugins and themes with clean organization24 * ** Detailed Code Analysis** - View exact file locations with highlighted code context25 * ** Multiple Hook Types** - Supports add_action, add_filter, do_action, apply_filters, and more26 * **P rofessional Interface** - Clean, modern admin UI following WordPress design standards27 * ** Performance Optimized** - Efficient scanning with built-in safeguards and limits28 * ** Security First** - Proper nonce verification, sanitization, and capability checks29 * ** Developer Tools** - Click-to-copy code snippets, keyboard shortcuts, and export features35 * **Advanced Hook Search** – Quickly find hooks in plugins, themes, or the entire site 36 * **Detailed Code Analysis** – Highlighted code snippets with surrounding context 37 * **Multiple Hook Types** – Detects `add_action`, `add_filter`, `do_action`, `apply_filters`, and more 38 * **Secure & Reliable** – Nonce verification, sanitization, and admin-only access 39 * **Performance Optimized** – Smart scanning with limits to prevent timeouts 40 * **Export & Copy Tools** – Copy code snippets or export results for documentation 41 * **Accessibility Ready** – Works with keyboard navigation and screen readers 42 * **Translation Ready** – Full internationalization support 30 43 31 44 ### Perfect For 32 45 33 * **Plugin Developers** - Debug hook conflicts and understand plugin interactions34 * **Theme Developers** - Analyze theme hook implementations and customizations35 * ** Code Auditors** - Review hook usage patterns and security implementations36 * **WordPress Learners** - Understand how WordPress hooks work in real code37 * **Site Maintainers** - Debug issues and optimize hook performance46 * **Plugin Developers** – Debug hook conflicts and ensure compatibility 47 * **Theme Developers** – Analyze theme customization and hook usage 48 * **Auditors & Security Reviewers** – Check for unsafe or inefficient hook usage 49 * **WordPress Learners** – Understand how hooks work in real-world code 50 * **Site Maintainers** – Troubleshoot issues and optimize performance 38 51 39 52 ### How It Works 40 53 41 1. **Search Interface** - Enter any hook name and select search location 42 2. **Instant Results** - View all matching files with line numbers and hook types 43 3. **Code Context** - Click any result to see highlighted code with surrounding lines 44 4. **Analysis Tools** - Get insights about hook types, usage patterns, and best practices 54 1. Go to **Tools > Hook Locator** in your WordPress admin 55 2. Enter a hook name (e.g. `init`, `wp_head`, `save_post`) 56 3. Select a directory (all plugins, a specific plugin, or a theme) 57 4. Click **Search Hooks** 58 5. View results with file paths, line numbers, and hook types 59 6. Click any result for detailed highlighted code context 45 60 46 ### WordPress Standards Compliant 61 --- 47 62 48 * **PHPCS/WPCS Compatible** - Follows all WordPress coding standards 49 * **Secure Implementation** - Proper sanitization, nonces, and capability checks 50 * **Performance Optimized** - Efficient file scanning with resource limits 51 * **Accessibility Ready** - Keyboard navigation and screen reader compatible 52 * **Translation Ready** - Full internationalization support 63 ### Debug WordPress Hooks with Ease 64 65 Finding hooks in large WordPress sites can be overwhelming. Hook Locator gives developers a **fast, reliable, and professional way** to understand and debug how actions and filters are used—making development, optimization, and troubleshooting much easier. 66 67 --- 53 68 54 69 == Installation == 55 70 56 71 ### Automatic Installation 57 1. Go to **Plugins > Add New** in your WordPress admin58 2. Search for "Hook Locator"72 1. In WordPress admin, go to **Plugins > Add New** 73 2. Search for **Hook Locator** 59 74 3. Click **Install Now** and then **Activate** 60 75 61 76 ### Manual Installation 62 1. Download the plugin ZIP file 63 2. Go to **Plugins > Add New > Upload Plugin** 64 3. Choose the ZIP file and click **Install Now**65 4. Activate the plugin 77 1. Download the plugin ZIP file 78 2. Go to **Plugins > Add New > Upload Plugin** 79 3. Upload the ZIP and click **Install Now** 80 4. Activate the plugin 66 81 67 82 ### Getting Started 68 1. Navigate to **Tools > Hook Locator** in your WordPress admin 69 2. Enter a hook name (e.g., "init", "wp_head", "save_post") 70 3. Select search location (All, specific plugin, or theme) 71 4. Click **Search Hooks** to see results 72 5. Click **View Details** on any result for code analysis 83 1. Go to **Tools > Hook Locator** 84 2. Enter a hook name to search 85 3. Select plugins, themes, or all directories 86 4. Review results with file paths and code context 87 88 --- 73 89 74 90 == Frequently Asked Questions == 75 91 76 = Does this affect my site performance? = 92 = How do I find all hooks in a WordPress plugin? = 93 Simply choose the plugin from the dropdown, leave the search input blank, and Hook Locator will scan and list all actions and filters inside that plugin. 77 94 78 No! Hook Locator only runs in the WordPress admin when you actively search. There's no frontend code or background processing that affects your site's performance. 95 = Can I use Hook Locator to debug custom hooks? = 96 Yes. It works with both core WordPress hooks and custom hooks defined by plugins, themes, or your own code. 79 97 80 = What file types does it search? = 98 = Does Hook Locator slow down my site? = 99 No. The plugin only runs in the admin panel when you perform a search. It does not load on the frontend and does not affect site performance. 81 100 82 Hook Locator searches only PHP files (.php) since WordPress hooks are PHP-based. It automatically skips other file types for optimal performance. 101 = What is the difference between Hook Locator and runtime hook loggers? = 102 Hook Locator performs **static code analysis**. It scans the source code to detect all hook references, even those that might not run during a specific request. This makes it more complete and reliable compared to runtime loggers. 83 103 84 = Can I search for custom hooks? = 104 = Can it help me fix plugin conflicts? = 105 Yes. By showing you where hooks are added or triggered, Hook Locator helps identify conflicts between plugins or themes so you can resolve issues faster. 85 106 86 Absolutely! Hook Locator finds any hook name you specify, including custom hooks created by plugins, themes, or your own code. 107 = Does Hook Locator work with WordPress multisite? = 108 Yes. It works on multisite installations. Each site can independently use Hook Locator to analyze its plugins and themes. 87 109 88 = Is it safe to use on production sites? = 110 = Is Hook Locator safe to use on production sites? = 111 Absolutely. It only **reads** files; it never modifies code. All operations are restricted to administrators. 89 112 90 Yes, Hook Locator is completely safe for production use. It only reads files and never modifies any code. All operations are restricted to users with administrator privileges. 91 92 = Does it work with multisite? = 93 94 Yes, Hook Locator works perfectly with WordPress multisite installations. Each site can use it independently to analyze their specific plugins and themes. 95 96 = Can I export the search results? = 97 98 Currently, you can copy individual code snippets to your clipboard. Future versions may include CSV/JSON export functionality based on user feedback. 99 100 = What's the difference from other hook plugins? = 101 102 Hook Locator focuses on static code analysis rather than runtime hook capture. This makes it more accurate, secure, and performant while providing deeper code insights. 113 --- 103 114 104 115 == Screenshots == 105 116 106 1. **Main Search Interface** - Clean, modern search form with organized directory selection 107 2. **Search Results** - Professional table showing files, line numbers, hook types, and actions 108 3. **Code Analysis** - Detailed view with highlighted target line and surrounding context 109 4. **Hook Type Detection** - Color-coded badges showing different hook function types 110 5. **Mobile Responsive** - Works perfectly on all devices and screen sizes 117 1. Main Search Interface – Modern search form with plugin/theme selection 118 2. Search Results – Table view with file names, line numbers, and hook types 119 3. Code Analysis – Highlighted view of hook usage in context 120 4. Hook Type Detection – Color-coded badges for different hook functions 121 5. Mobile Responsive – Works on desktops, tablets, and mobile devices 122 123 --- 111 124 112 125 == Changelog == 113 126 114 127 = 1.0.0 = 115 * Separated plugins and themes in dropdown with optgroups 116 * Much clearer code highlighting with better contrast 117 * Modern, professional UI with better spacing and typography 118 * Full WordPress coding standards compliance (PHPCS/WPCS) 119 * Comprehensive nonce verification and sanitization 120 * Proper Yoda conditions throughout codebase 121 * Complete function and class documentation 122 * All margin and padding issues for consistent layout 123 * Optimized file scanning with better resource management 124 * Complete rewrite for admin-only operation 125 * Added file scanning for plugin/theme directories 126 * New professional search interface with directory selection 127 * Detailed code context view with syntax highlighting 128 * Performance optimizations and security improvements 129 * Better user interface with WordPress admin styling 128 * Initial release with full hook scanning and analysis 129 * Plugin and theme directory dropdowns with optgroups 130 * Improved code highlighting with better contrast 131 * Secure coding with nonce checks and sanitization 132 * Fully WordPress coding standards compliant (PHPCS/WPCS) 133 * Optimized file scanning with smart resource management 134 * Professional admin UI with WordPress styling 135 136 --- 130 137 131 138 == Advanced Usage == 132 139 133 140 ### Keyboard Shortcuts 134 * **Ctrl/Cmd + K** - Focus search input135 * **Ctrl/Cmd + Enter** - Submit search form136 * **Escape** - Clear search input137 * **Click code snippets** - Copy to clipboard141 * **Ctrl/Cmd + K** – Focus search input 142 * **Ctrl/Cmd + Enter** – Run search 143 * **Escape** – Clear search input 144 * **Click snippets** – Copy to clipboard 138 145 139 ### Hook Types Supported140 * `add_action()` - Register action hooks141 * `add_filter()` - Register filter hooks142 * `do_action()` - Trigger action hooks143 * `apply_filters()` - Apply filter hooks144 * `remove_action()` - Remove action hooks145 * `remove_filter()` - Remove filter hooks146 * `has_action()` - Check for action hooks147 * `has_filter()` - Check for filter hooks146 ### Supported Hook Types 147 * `add_action()` 148 * `add_filter()` 149 * `do_action()` 150 * `apply_filters()` 151 * `remove_action()` 152 * `remove_filter()` 153 * `has_action()` 154 * `has_filter()` 148 155 149 ### Performance Features 150 * **Smart Scanning** - Skips large files and non-PHP files 151 * **Resource Limits** - Maximum 1000 files per search to prevent timeouts 152 * **Efficient Parsing** - Optimized regex patterns for hook detection 153 * **Memory Management** - Careful memory usage to prevent server issues 156 --- 154 157 155 158 == Developer Information == 156 159 157 ### Code Standards 158 * **PHPCS/WPCS Compliant** - Passes all WordPress coding standards 159 * **Security First** - Proper sanitization, validation, and capability checks 160 * **Performance Optimized** - Efficient algorithms and resource management 161 * **Accessibility Ready** - Full keyboard navigation and screen reader support 162 * **Translation Ready** - Complete internationalization with proper text domains 160 * **Code Standards** – 100% PHPCS/WPCS compliant 161 * **Secure** – Proper validation, sanitization, and capability checks 162 * **Performance** – Smart scanning, resource limits, and memory management 163 * **Accessibility** – Screen reader and keyboard navigation support 164 * **Internationalization** – Fully translation ready 163 165 164 ### Technical Specifications 165 * **Minimum PHP:** 7.4 166 * **WordPress:** 5.0+ 167 * **File Size Limit:** 1MB per file 168 * **Scan Limit:** 1000 files per search 169 * **Memory Usage:** Optimized for shared hosting 170 171 ### Support & Development 172 * **GitHub:** Coming soon for issue reporting and contributions 173 * **Documentation:** Complete inline code documentation 174 * **Extensibility:** Action and filter hooks for customization 175 176 == Screenshots == 177 1. screenshot-1.png 178 2. screenshot-2.png 179 3. screenshot-3.png 166 --- 180 167 181 168 == Privacy == 182 169 183 Hook Locator respects your privacy and follows WordPress privacy best practices: 170 * No personal data collection 171 * No external API requests 172 * No analytics, tracking, or cookies 173 * Admin-only usage 184 174 185 * **No Data Collection** - No personal or usage data is collected or transmitted 186 * **Local Operation** - All scanning happens locally on your server 187 * **No External Requests** - No data is sent to external services 188 * **Admin Only** - Only users with administrator privileges can use the plugin 189 * **No Tracking** - No analytics, tracking pixels, or cookies are used 175 --- 190 176 191 177 == Support == 192 178 193 Need help with Hook Locator?179 Need help? 194 180 195 * **Documentation** - Check the built-in help and tooltips in the admin interface 196 * **WordPress Forums** - Ask questions in the WordPress.org support forums 197 * **GitHub Issues** - Report bugs and request features (coming soon) 198 * **Professional Support** - Premium support available for enterprise users 181 * WordPress.org support forums 182 * Inline documentation and tooltips in the admin panel 183 * GitHub issues (coming soon) 199 184 200 Hook Locator is actively maintained and supported. We're committed to keeping it updated with the latest WordPress versions and continuously improving its functionality based on user feedback.185 Hook Locator is actively maintained and tested with the latest WordPress releases. We welcome feedback and feature requests!
Note: See TracChangeset
for help on using the changeset viewer.