{"id":23387246,"url":"https://github.com/wp-forge/wp-options","last_synced_at":"2025-09-12T18:09:54.269Z","repository":{"id":57082028,"uuid":"466120590","full_name":"wp-forge/wp-options","owner":"wp-forge","description":"A WordPress helper class for managing plugin options.","archived":false,"fork":false,"pushed_at":"2024-05-10T14:57:56.000Z","size":4,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-12T20:49:29.626Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wp-forge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-03-04T12:47:57.000Z","updated_at":"2025-05-28T18:02:11.000Z","dependencies_parsed_at":"2025-04-11T05:09:20.507Z","dependency_job_id":"db591338-4e19-4511-8723-b35a2b29dfdf","html_url":"https://github.com/wp-forge/wp-options","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/wp-forge/wp-options","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-forge%2Fwp-options","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-forge%2Fwp-options/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-forge%2Fwp-options/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-forge%2Fwp-options/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wp-forge","download_url":"https://codeload.github.com/wp-forge/wp-options/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-forge%2Fwp-options/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274851379,"owners_count":25361570,"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","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"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":[],"created_at":"2024-12-22T01:15:23.876Z","updated_at":"2025-09-12T18:09:54.213Z","avatar_url":"https://github.com/wp-forge.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Options\n\nA WordPress helper class for managing plugin options.\n\n## Installation\n\n```shell\ncomposer require wp-forge/wp-options\n```\n\n## Usage\n\n### Setting Options\n\n```php\n\u003c?php\n\nuse WP_Forge\\Options\\Options;\n\n$options = new Options('my_plugin_options');\n\n// Pass the option name and option value as parameters.\n$options-\u003eset('name', 'value');\n```\n\n### Getting Options\n\n```php\n\u003c?php\n\nuse WP_Forge\\Options\\Options;\n\n$options = new Options('my_plugin_options');\n\n// Pass the option name and a default value as parameters.\n// If a default value is not provided, `null` will be the default return value.\n$options-\u003eget('name', 'default');\n```\n\n### Deleting Options\n\n```php\n\u003c?php\n\nuse WP_Forge\\Options\\Options;\n\n$options = new Options('my_plugin_options');\n\n// Pass the option name to be deleted as a parameter.\n$options-\u003edelete('name');\n```\n\n### Checking if an Option Exists\n\n```php\n\u003c?php\n\nuse WP_Forge\\Options\\Options;\n\n$options = new Options('my_plugin_options');\n\n// Pass the option name as a parameter.\n$options-\u003ehas('name');\n```\n\n### Saving Options\n\nBy default, options will save automatically on the `shutdown` hook.\n\nHowever, if you'd like to force a save, you can do it like this:\n\n```php\n\u003c?php\n\nuse WP_Forge\\Options\\Options;\n\n$options = new Options('my_plugin_options');\n\n// Pass the option name and option value as parameters\n$options-\u003esave();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-forge%2Fwp-options","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwp-forge%2Fwp-options","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-forge%2Fwp-options/lists"}