{"id":15292275,"url":"https://github.com/wpbones/actions-and-filters-js","last_synced_at":"2026-01-28T17:36:58.298Z","repository":{"id":57082146,"uuid":"72647315","full_name":"wpbones/actions-and-filters-js","owner":"wpbones","description":"WordPress actions and filters in Javascript","archived":false,"fork":false,"pushed_at":"2025-05-27T05:44:02.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-15T22:20:45.005Z","etag":null,"topics":["javascript","wordpress","wordpress-actions","wordpress-development","wp-bones","wp-bones-packages"],"latest_commit_sha":null,"homepage":"https://wpbones.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wpbones.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-11-02T14:22:50.000Z","updated_at":"2025-05-27T05:44:05.000Z","dependencies_parsed_at":"2024-10-24T21:10:43.667Z","dependency_job_id":"950721a0-d780-447f-9291-de1649fe28ce","html_url":"https://github.com/wpbones/actions-and-filters-js","commit_stats":{"total_commits":3,"total_committers":2,"mean_commits":1.5,"dds":"0.33333333333333337","last_synced_commit":"97608b8d0fa0c93c1e5b8e57ed97ce437dc6c917"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/wpbones/actions-and-filters-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpbones%2Factions-and-filters-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpbones%2Factions-and-filters-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpbones%2Factions-and-filters-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpbones%2Factions-and-filters-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpbones","download_url":"https://codeload.github.com/wpbones/actions-and-filters-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpbones%2Factions-and-filters-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28847916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: 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":["javascript","wordpress","wordpress-actions","wordpress-development","wp-bones","wp-bones-packages"],"created_at":"2024-09-30T16:17:11.540Z","updated_at":"2026-01-28T17:36:58.277Z","avatar_url":"https://github.com/wpbones.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress actions and filters implementation for Javascript\n\n\u003cdiv align=\"center\"\u003e\n\n[![Latest Stable Version](https://poser.pugx.org/wpbones/actions-and-filters-js/v/stable?style=for-the-badge)](https://packagist.org/packages/wpbones/actions-and-filters-js) \u0026nbsp;\n[![Latest Unstable Version](https://poser.pugx.org/wpbones/actions-and-filters-js/v/unstable?style=for-the-badge)](https://packagist.org/packages/wpbones/actions-and-filters-js) \u0026nbsp;\n[![Total Downloads](https://poser.pugx.org/wpbones/actions-and-filters-js/downloads?style=for-the-badge)](https://packagist.org/packages/wpbones/actions-and-filters-js) \u0026nbsp;\n[![License](https://poser.pugx.org/wpbones/actions-and-filters-js/license?style=for-the-badge)](https://packagist.org/packages/wpbones/actions-and-filters-js) \u0026nbsp;\n[![Monthly Downloads](https://poser.pugx.org/wpbones/actions-and-filters-js/d/monthly?style=for-the-badge)](https://packagist.org/packages/wpbones/actions-and-filters-js)\n\n\u003c/div\u003e\n\nA Javascript version of the actions and filters used in PHP in WordPress for WP Bones.\n\n## Requirements\n\nThis package works with a WordPress plugin written with [WP Bones framework library](https://github.com/wpbones/WPBones).\n\n## Installation\n\nYou can install third party packages by using:\n\n```sh copy\nphp bones require wpbones/actions-and-filters-js\n```\n\nI advise to use this command instead of `composer require` because doing this an automatic renaming will done.\n\nYou can use composer to install this package:\n\n```sh copy\ncomposer require wpbones/actions-and-filters-js\n```\n\nYou may also to add `\"wpbones/actions-and-filters-js\": \"^1.0\"` in the `composer.json` file of your plugin:\n\n```json copy filename=\"composer.json\" {4}\n  \"require\": {\n    \"php\": \"\u003e=7.4\",\n    \"wpbones/wpbones\": \"~0.8\",\n    \"wpbones/actions-and-filters-js\": \"~1.0\"\n  },\n```\n\nand run\n\n```sh copy\ncomposer install\n```\n\nAlternatively, you can get the single files `src/resources/assets/js/actions-and-filters.js` in your WP Bones plugin and compile it with `gulp`.\nAlso, you can get pre-compiled minified version `src/public/js/actions-and-filters.min.js`.\n\n## Enqueue for Controller\n\nYou can use the provider to enqueue the styles.\n\n```php copy\npublic function index()\n{\n  // enqueue the minified version\n  ActionsAndFiltersJSProvider::enqueueScripts();\n\n  // ...\n\n}\n```\n\n## ActionsAndFiltersJSProvider\n\nThis is a static class autoloaded by composer. You can use it to enqueue or get the styles path:\n\n```php copy\n// enqueue the minified version\nActionsAndFiltersJSProvider::enqueueScripts();\n\n// enqueue the flat version\nActionsAndFiltersJSProvider::enqueueScripts( false );\n\n// return the absolute path of the minified css\nActionsAndFiltersJSProvider::js();\n\n// return the absolute path of the flat css\nActionsAndFiltersJSProvider::js();\n```\n\n## Usage\n\nLet's an example:\n\n```js copy\n\nwpbones_add_action( 'my-action', function() { alert( \"Hello\" ) } );\n\n...\n\nwpbones_do_action( 'my-action' );\n\n```\n\nThis Javascript version works in the same way than PHP version in WordPress.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpbones%2Factions-and-filters-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpbones%2Factions-and-filters-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpbones%2Factions-and-filters-js/lists"}