├── .gitignore ├── CHANGELOG.md ├── README.md ├── assets ├── banner-772x250.png ├── screenshot-1.png └── screenshot-2.png ├── composer.json ├── css ├── markup.css └── styles.css ├── genesis-visual-hook-guide.php └── readme.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac OS X 2 | .DS_Store 3 | 4 | # PHPStorm 5 | .idea 6 | 7 | # PHPunit config 8 | phpunit.xml 9 | 10 | # NPM 11 | .sass-cache 12 | bower_components 13 | node_modules 14 | logs 15 | *.log 16 | 17 | # General 18 | NOTES.md -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to this project will be documented in this file. 3 | 4 | ## [Unreleased] 5 | ### Added 6 | - No added features yet 7 | 8 | ### Changed 9 | - No other changes yet 10 | 11 | ## [1.0.0] - 2017-4-8 12 | ### Added 13 | - Activated notice. 14 | - Automating the locating of hooks (props salcode) 15 | 16 | ### Changed 17 | - Main file name updated from `g-hooks.php` to `genesis-visual-hook-guide.php` to match plugin slug. Due to this, plugin will need to be reactivated after updating. 18 | - Query strings to display hooks, filters, and markup are now gvhg_hooks, gvhg_filters and gvhg_markup. 19 | - Escapes output of add_query_arg 20 | - Filter hooks genesis_seo_title and genesis_seo_description names were displayed wrong. 21 | - Action hooks no longer have descriptions. This will be re-added in a later release. 22 | 23 | ## [0.9.5] - 2014-12-31 24 | - Added: Clear menu item to disable all active displayed views. (Props salcode) 25 | - Fixed: Don't add actions onto genesis' hooks unless displaying. (Props jb510) 26 | - Fixed: The textual value echod from gvhg_ping_author_says_text function was incorrect. 27 | - Updated: Simplified filter hook callbacks. (Props garyj) 28 | 29 | ## 0.9.0 - 2013-5-16 30 | - Added: New Hooks from Genesis 2.0 (HTML5): 31 | genesis_before_entry, 32 | genesis_entry_header, 33 | genesis_before_entry_content, 34 | genesis_entry_content, 35 | genesis_after_entry_content, 36 | genesis_entry_footer, 37 | genesis_after_entry, 38 | genesis_before_post, 39 | - Added: New markup containers and classes for Genesis 2.0 (HTML5): 40 | - Fixed: Added filter for genesis_footer_creds_text. 41 | 42 | ## 0.8.3 43 | - Fixed: get_theme_data() deprecated in WP 3.4 / replaced with wp_get_theme(). 44 | 45 | ## 0.8.2 46 | - Fixed: Error messages when WP_DEBUG is enabled. 47 | 48 | ## 0.8.1 49 | - Added: Discription for genesis_header_right() 50 | - Fixed: Removed wp_print_styles in favor of wp_enqueue_scripts. 51 | 52 | ## 0.8 53 | - Added: Missing descriptions for the rest of the hooks. 54 | - Added: More filters: 55 | genesis_comments_closed_text, 56 | genesis_no_comments_text, 57 | genesis_no_pings_text 58 | 59 | ## 0.7b 60 | - Added: More descriptions to a few of the hooks. 61 | - Added: More filters: 62 | genesis_post_info, 63 | genesis_post_meta, 64 | genesis_post_title_text, 65 | genesis_noposts_text, 66 | genesis_search_text, 67 | genesis_search_button_text, 68 | genesis_nav_home_text 69 | - Fix: Formatting of Document Head hook comments. Now followed by a carriage return. 70 | 71 | ## 0.6b 72 | - Bug fix: Fixes an issue in which the path to the stylesheets required to style the hooks was incorrect. 73 | 74 | ## 0.5b 75 | - Initial Beta Release 76 | 77 | [Unreleased]: https://github.com/christophercochran/Genesis-Visual-Hook-Guide/compare/0.9.5...HEAD 78 | [1.0.0]: https://github.com/christophercochran/Genesis-Visual-Hook-Guide/compare/0.9.5...1.0.0 79 | [0.9.5]: https://github.com/christophercochran/Genesis-Visual-Hook-Guide/compare/0.9.0...0.9.5 80 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Genesis Visual Hook Guide 2 | ![Find that hook you need!](assets/banner-772x250.png) 3 | 4 | Find Genesis hooks (action and filter hooks) quick and easily by seeing their actual locations inside your theme. 5 | 6 | ## Description 7 | 8 | Once a tool for myself the Genesis Visual Hook guide has slowly evolved into what it is today. I finally welcome the plugin version of the popular [Visual Genesis Hooks and Filters Guide](http://genesistutorials.com/visual-hook-guide) from [Genesis Tutorials](http://genesistutorials.com). 9 | 10 | Once installed this plugin adds a drop down menu to the admin bar to select between three views (Hook, Filter, and Markup). Select an option or all three to see the hooks in their actual locations on your current theme. 11 | 12 | Great companion to [Genesis Simple Hooks](https://wordpress.org/plugins/genesis-simple-hooks/). 13 | 14 | **Genesis Theme Framework required.** 15 | 16 | 17 | ## Screenshots 18 | 19 | ![Plugin in action on the default Sample Child Theme.](assets/screenshot-1.png) 20 | _Screenshot 1: Markup using Custom Menu widget. Note the `aside`, `section` and `div` parents to `nav`._ 21 | 22 | --- 23 | 24 | ![Hooks in Document Head.](assets/screenshot-2.png) 25 | _Screenshot 2: Markup using this plugin. `nav` is a sibling element to the title area `div`._ 26 | 27 | ## Installation 28 | 29 | ### Upload 30 | 31 | 1. Download the latest tagged archive (choose the "zip" option). 32 | * Go to the __Plugins__ → __Add New__ screen and click the __Upload__ tab. 33 | * Upload the zipped archive directly. 34 | * Go to the Plugins screen and click __Activate__. 35 | 36 | ### Manual 37 | 38 | 1. Download the latest tagged archive (choose the "zip" option). 39 | * Unzip the archive. 40 | * Copy the folder to your `/wp-content/plugins/` directory. 41 | * Go to the Plugins screen and click __Activate__. 42 | 43 | Check out the Codex for more information about [installing plugins manually](https://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation). 44 | 45 | ### Git 46 | 47 | In a terminal, browse to your `/wp-content/plugins/` directory and clone this repository: 48 | 49 | ~~~sh 50 | git clone git@github.com:christophercochran/Genesis-Visual-Hook-Guide.git 51 | ~~~ 52 | 53 | Then go to your Plugins screen and click __Activate__. 54 | 55 | 56 | ## FAQ 57 | ### I have my admin bar disable, can I still view the hooks without it? 58 | 59 | Sure! The views are triggered by a query string. Simply add ?gvhg_markup=show ?gvhg_hooks=show or ?gvhg_filters=show to the end the url. 60 | 61 | 62 | ## Change Log 63 | 64 | See the [change log](CHANGELOG.md). 65 | 66 | ## Credits 67 | 68 | Built by [Christopher Cochran](https://twitter.com/tweetsfromchris) 69 | -------------------------------------------------------------------------------- /assets/banner-772x250.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christophercochran/Genesis-Visual-Hook-Guide/ea4bd2eed1fc5fe0252e90d2774c2398fd9feec7/assets/banner-772x250.png -------------------------------------------------------------------------------- /assets/screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christophercochran/Genesis-Visual-Hook-Guide/ea4bd2eed1fc5fe0252e90d2774c2398fd9feec7/assets/screenshot-1.png -------------------------------------------------------------------------------- /assets/screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/christophercochran/Genesis-Visual-Hook-Guide/ea4bd2eed1fc5fe0252e90d2774c2398fd9feec7/assets/screenshot-2.png -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "christophercochran/Genesis-Visual-Hook-Guide", 3 | "description": "Find Genesis hooks (action and filter hooks) quick and easily by seeing their actual locations inside your theme.", 4 | "keywords": ["genesis", "hooks", "filters"], 5 | "type": "wordpress-plugin", 6 | "homepage": "https://github.com/christophercochran/Genesis-Visual-Hook-Guide", 7 | "license": "GPLv2", 8 | "authors": [ 9 | { 10 | "name": "Christopher Cochran", 11 | "homepage": "http://christophercochran.me", 12 | "role": "Developer" 13 | } 14 | ], 15 | "support": { 16 | "issues": "https://github.com/christophercochran/Genesis-Visual-Hook-Guide/issues", 17 | "source": "https://github.com/christophercochran/Genesis-Visual-Hook-Guide" 18 | }, 19 | "require": { 20 | "composer/installers": "~1.0" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /css/markup.css: -------------------------------------------------------------------------------- 1 | .site-container, 2 | .wrap, 3 | #wrap, 4 | #header, 5 | .title-area, 6 | #tite-area, 7 | .widget-area, 8 | .widget, 9 | .widget-wrap, 10 | .nav-primary, 11 | #nav, 12 | .nav-secondary, 13 | #subnav, 14 | .site-inner, 15 | #inner, 16 | .content-sidebar-wrap, 17 | #content-sidebar-wrap, 18 | main.content, 19 | #content, 20 | article, 21 | header, 22 | footer, 23 | .sidebar-primary, 24 | #sidebar, 25 | .sidebar-secondary, 26 | #sidebar-alt, 27 | #footer, 28 | .gototop, 29 | .creds { 30 | position: relative; 31 | padding: 30px 3px; 32 | border: 1px dotted #aaa; 33 | overflow: hidden; 34 | } 35 | .site-container:before, 36 | #wrap:before, 37 | .wrap:before, 38 | .site-container:before, 39 | header.site-header:before, 40 | #header:before, 41 | .title-area:before, 42 | #title-area:before, 43 | .widget-area:before, 44 | .widget:before, 45 | .widget-wrap:before, 46 | nav.nav-primary:before, 47 | #nav:before, 48 | nav.nav-secondary:before, 49 | #subnav:before, 50 | .site-inner:before, 51 | #inner:before, 52 | .content-sidebar-wrap:before, 53 | #content-sidebar-wrap:before, 54 | main.content:before, 55 | #content:before, 56 | article:before, 57 | header:before, 58 | footer:before, 59 | aside.sidebar-primary:before, 60 | #sidebar:before, 61 | aside.sidebar-secondary:before, 62 | #sidebar-alt:before, 63 | footer.site-footer:before, 64 | #footer:before, 65 | .gototop:before, 66 | .creds:before { 67 | position: absolute; 68 | top: 0; left: 0; 69 | padding: 2px 5px; 70 | text-transform: lowercase; 71 | background: #F89E43; 72 | z-index: 9999; 73 | } 74 | 75 | .site-container:before { content: ".site-container" } 76 | 77 | #wrap:before { content: "#wrap" } 78 | 79 | 80 | .wrap:before { content: ".wrap" } 81 | 82 | 83 | header.site-header:before { content: "
.site-header" } 84 | 85 | #header:before { content: "#header" } 86 | 87 | .title-area:before { content: ".title-area" } 88 | 89 | #title-area:before { content: "#title-area" } 90 | 91 | 92 | 93 | nav.nav-primary:before { content: "