{"id":21931335,"url":"https://github.com/themeplate/hook","last_synced_at":"2026-02-18T07:31:47.922Z","repository":{"id":57068274,"uuid":"251038450","full_name":"ThemePlate/Hook","owner":"ThemePlate","description":"Advanced wrapper for filters","archived":false,"fork":false,"pushed_at":"2025-03-02T16:28:56.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T16:35:38.718Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThemePlate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-29T13:27:46.000Z","updated_at":"2025-03-02T16:28:51.000Z","dependencies_parsed_at":"2025-03-02T16:28:11.274Z","dependency_job_id":"ec71a83b-8cc4-4c6d-af19-6bd204ad3423","html_url":"https://github.com/ThemePlate/Hook","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThemePlate%2FHook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThemePlate%2FHook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThemePlate%2FHook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThemePlate%2FHook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThemePlate","download_url":"https://codeload.github.com/ThemePlate/Hook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244959454,"owners_count":20538628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-28T23:13:33.193Z","updated_at":"2026-02-18T07:31:47.916Z","avatar_url":"https://github.com/ThemePlate.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ThemePlate Hook\n\n## Usage\n\n```php\n\nuse ThemePlate\\Hook;\n\n// Hook::\u003cACTION\u003e( \u003cTAG\u003e, \u003cVALUE\u003e )\nHook::append( 'sample_filter', 'ing' );\nHook::prepend( 'sample_filter', 're-' );\nHook::return( 'sample_filter', 'this!' );\nHook::pluck( 'sample_filter', 'i' );\nHook::replace( 'sample_filter', '!', '...' );\nHook::insert( 'sample_filter', 'u', 2 );\nHook::once( 'sample_filter', array( 'pluck', 'th' ) );\n```\n\n\u003e ^Line by line output with initial value **test**\n\n| ACTION  | VALUE          | RESULT #1  | RESULT #2  |\n|---------|----------------|------------|------------|\n|  append | ing            |    testing |    testing |\n| prepend | re-            | re-testing | re-testing |\n|  return | this!          |      this! |      this! |\n|   pluck | i              |       ths! |       ths! |\n| replace | [\"!\",\"...\"]    |     ths... |     ths... |\n|  insert | [\"u\",2]        |    thus... |    thus... |\n|    once | [\"pluck\",\"th\"] |      us... |    thus... |\n\n```php\n// apply_filters( \u003cTAG\u003e, \u003cINITIAL\u003e );\napply_filters( 'sample_filter', 'test' ); // \u003cRESULT #1\u003e\napply_filters( 'sample_filter', 'test' ); // \u003cRESULT #2\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemeplate%2Fhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthemeplate%2Fhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemeplate%2Fhook/lists"}