{"id":33985041,"url":"https://github.com/yardinternet/brave-hooks","last_synced_at":"2026-04-03T09:04:08.379Z","repository":{"id":328426198,"uuid":"891029761","full_name":"yardinternet/brave-hooks","owner":"yardinternet","description":"Brave default hooks","archived":false,"fork":false,"pushed_at":"2026-04-01T12:00:25.000Z","size":344,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-04-01T12:06:50.461Z","etag":null,"topics":["acorn","brave","wordpress"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yardinternet.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-19T15:51:09.000Z","updated_at":"2026-03-30T13:05:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"9352d3d9-8286-4298-b657-b557f00d0ec2","html_url":"https://github.com/yardinternet/brave-hooks","commit_stats":null,"previous_names":["yardinternet/brave-hooks"],"tags_count":34,"template":false,"template_full_name":"yardinternet/skeleton-package","purl":"pkg:github/yardinternet/brave-hooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yardinternet%2Fbrave-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yardinternet%2Fbrave-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yardinternet%2Fbrave-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yardinternet%2Fbrave-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yardinternet","download_url":"https://codeload.github.com/yardinternet/brave-hooks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yardinternet%2Fbrave-hooks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31344470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T08:03:20.796Z","status":"ssl_error","status_checked_at":"2026-04-03T08:00:37.834Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acorn","brave","wordpress"],"created_at":"2025-12-13T04:42:53.366Z","updated_at":"2026-04-03T09:04:08.358Z","avatar_url":"https://github.com/yardinternet.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Brave Hooks\n\n[![Code Style](https://github.com/yardinternet/brave-hooks/actions/workflows/format-php.yml/badge.svg?no-cache)](https://github.com/yardinternet/brave-hooks/actions/workflows/format-php.yml)\n\n## Features\n\n- [x] Register Hooks using php attributes\n- [x] Configure Hook registration using a config file\n- [x] Load plugin-specific hooks only when the plugin is active\n\n## Installation\n   \n1. Install this package with Composer:\n\n    ```sh\n    composer require yard/brave-hooks\n    ```\n\n2. Run the Acorn WP-CLI command to discover this package:\n\n    ```shell\n    wp acorn package:discover\n    ```\n\n3. Publish the config file with:\n\n   ```shell\n   wp acorn vendor:publish --provider=\"Yard\\Brave\\Hooks\\HookServiceProvider\"\n   ```\n\n5. Register all your project hooks in the published configuration file `config/hooks.php`.\n\n## Usage\n\nAdd your custom hook classes to the [hooks configuration file](./config/hooks.php). Any hooks defined within these\nclasses will be automatically registered with WordPress.\n\nThis plugin leverages [wp-hook-registrar](https://github.com/yardinternet/wp-hook-registrar) for hook registration. For\ndetailed information about the hook registration process, please refer to that package's documentation.\n\n### Plugin-specific Hooks\n\nSome classes contain hooks that should only be active when a specific WordPress plugin is active.\nTo achieve this, add the `#[Plugin]` attribute to the class containing hooks and provide the plugin's file path:\n\nThe plugin path should match the format required by the WordPress function [is_plugin_active()](https://developer.wordpress.org/reference/functions/is_plugin_active/)\n\n```php\n#[Plugin('advanced-custom-fields-pro/acf.php')]\nclass ACF\n{\n    ...\n}\n```\n## About us\n\n[![banner](https://raw.githubusercontent.com/yardinternet/.github/refs/heads/main/profile/assets/small-banner-github.svg)](https://www.yard.nl/werken-bij/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyardinternet%2Fbrave-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyardinternet%2Fbrave-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyardinternet%2Fbrave-hooks/lists"}