{"id":21675779,"url":"https://github.com/codebtech/wp-feature-flags","last_synced_at":"2026-02-13T02:01:47.135Z","repository":{"id":224931366,"uuid":"616065019","full_name":"codebtech/wp-feature-flags","owner":"codebtech","description":"Feature flags for WordPress plugins and themes","archived":false,"fork":false,"pushed_at":"2025-02-24T20:06:09.000Z","size":5889,"stargazers_count":1,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T18:00:56.410Z","etag":null,"topics":["block-editor","wordpress","wordpress-development","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://wordpress.org/plugins/feature-flags/","language":"TypeScript","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/codebtech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-19T14:12:33.000Z","updated_at":"2024-09-21T11:10:53.000Z","dependencies_parsed_at":"2024-04-29T15:26:04.761Z","dependency_job_id":"f6e91a55-62d5-426e-be42-1b28e9d202eb","html_url":"https://github.com/codebtech/wp-feature-flags","commit_stats":null,"previous_names":["codebtech/wp-feature-flags"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/codebtech/wp-feature-flags","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebtech%2Fwp-feature-flags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebtech%2Fwp-feature-flags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebtech%2Fwp-feature-flags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebtech%2Fwp-feature-flags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codebtech","download_url":"https://codeload.github.com/codebtech/wp-feature-flags/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebtech%2Fwp-feature-flags/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29392767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T00:53:09.511Z","status":"online","status_checked_at":"2026-02-13T02:00:10.076Z","response_time":78,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["block-editor","wordpress","wordpress-development","wordpress-plugin"],"created_at":"2024-11-25T14:10:38.410Z","updated_at":"2026-02-13T02:01:47.091Z","avatar_url":"https://github.com/codebtech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Feature Flags\n\n[![PHP lint \u0026 test](https://github.com/codebtech/wp-feature-flags/actions/workflows/php.yml/badge.svg)](https://github.com/codebtech/wp-feature-flags/actions/workflows/php.yml)\n[![JS lint \u0026 test](https://github.com/codebtech/wp-feature-flags/actions/workflows/js.yml/badge.svg)](https://github.com/codebtech/wp-feature-flags/actions/workflows/js.yml)\n[![E2E Tests](https://github.com/codebtech/wp-feature-flags/actions/workflows/e2e.yml/badge.svg)](https://github.com/codebtech/wp-feature-flags/actions/workflows/e2e.yml)\n[![codecov](https://codecov.io/github/codebtech/wp-feature-flags/graph/badge.svg?token=QNUWGCRJGR)](https://codecov.io/github/codebtech/wp-feature-flags)\n\nStable tag: 0.3.2\nRequires at least: 6.2\nTested up to: 6.8\nRequires PHP: 8.1\n\nWordPress Feature flags plugin allow developers to configure features in plugins/themes behind the feature flags on both\nthe server (PHP) and client (JS/TS) side.\n\n## Installation\n\n`composer require codeb/wp-feature-flags`\n\nPackagist: https://packagist.org/packages/codeb/wp-feature-flags\n\n## Hooks\n\n### PHP filters\n\n#### `codeb_feature_flags_max_allowed`\n\nFilter to define the maximum number of allowed flags. It is recommended to keep this to default value, which is 20.\n\nExample usage:\n\n```php\nadd_filter(\n\t'codeb_feature_flags_max_allowed',\n\tstatic function () {\n\t\treturn 10;\n\t}\n);\n```\n\n### JS filters\n\n##### `codebFeatureFlags.newFlag.defaultStatus`\n\nThe filter controls whether the new flag is enabled by default or not. Default `true`\n\nExample usage:\n\n```js\naddFilter(\n\t'codebFeatureFlags.newFlag.defaultStatus',\n\t'codeb-feature-flags',\n\t() =\u003e {\n\t\treturn false;\n\t}\n);\n```\n\n## Development setup\n\nTo build the plugin\n\nPHP setup\n\n- `composer install`\n\nJS setup\n\n- `yarn install`\n- `yarn build` to create the build\n- `yarn start` to start the watch mode\n\n### wp-env\n\nThis plugin uses `wp-env` setup to for local environment.\n\n- `wp-env start` to start the containers\n- `wp-env stop` to stop the containers\n\nMore details on how to access local environment can be\nfound [here](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/#quick-tldr-instructions).\n\n## Linting and formatting\n\nPHP\n\n- `composer lint`\n- `composer lint:fix` to auto fix PHP linting errors.\n\nJS\n\n- `yarn lint:js`\n- `yarn lint:js:fix` to auto fix JS linting errors.\n\nCSS\n\n- `yarn lint:css`\n- `yarn lint:css:fix` to auto fix CSS linting errors.\n\n## Testing\n\n### PHP\n\nThe WordPress unit and integration tests depends on `wp-env` setup. Ensure you run `yarn wp-env:coverage` before running\nthe tests.\n\n- To run unit tests `yarn php:unit`\n- To run integrations tests `yarn php:integration`\n- To run integrations tests as multisite `yarn php:multisite`\n\n### JS\n\n- Run `yarn test:js` to run all Jest and React Testing Library tests\n\n### E2E\n\nThe E2E tests depends on `wp-env` setup. Ensure you run `wp-env start` before running the tests.\n\n- Run `yarn test:e2e` to run all Playwright e2e tests.\n\n## Contributing\n\nCode contributions, feedback, issue reporting and feature suggestions are welcome.\nSee [CONTRIBUTING.md](https://github.com/codebtech/wp-feature-flags/blob/main/CONTRIBUTING.md) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebtech%2Fwp-feature-flags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodebtech%2Fwp-feature-flags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebtech%2Fwp-feature-flags/lists"}