{"id":18177343,"url":"https://github.com/mmirus/simple-members-only","last_synced_at":"2025-07-29T03:34:21.675Z","repository":{"id":96865415,"uuid":"89257908","full_name":"mmirus/simple-members-only","owner":"mmirus","description":"Secure parts of your WordPress site for logged-in users only.","archived":false,"fork":false,"pushed_at":"2018-12-19T21:34:40.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-24T15:33:04.245Z","etag":null,"topics":["security","wordpress-plugin"],"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/mmirus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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}},"created_at":"2017-04-24T15:37:46.000Z","updated_at":"2021-02-20T14:09:54.000Z","dependencies_parsed_at":"2023-07-17T07:01:11.595Z","dependency_job_id":null,"html_url":"https://github.com/mmirus/simple-members-only","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mmirus/simple-members-only","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmirus%2Fsimple-members-only","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmirus%2Fsimple-members-only/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmirus%2Fsimple-members-only/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmirus%2Fsimple-members-only/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmirus","download_url":"https://codeload.github.com/mmirus/simple-members-only/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmirus%2Fsimple-members-only/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267623078,"owners_count":24117125,"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-07-29T02:00:12.549Z","response_time":2574,"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":["security","wordpress-plugin"],"created_at":"2024-11-02T17:12:54.734Z","updated_at":"2025-07-29T03:34:21.621Z","avatar_url":"https://github.com/mmirus.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-members-only\n\nSecure parts of your WordPress site for logged-in users only.\n\nThis plugin becomes useful as part of a more complete security/members system when combined with:\n\n1. Custom roles (created however you prefer).\n2. Role checks where needed in your templates (for example, in your header file to display alternative menus based on the user's role).\n\nNote: this plugin requires the Advanced Custom Fields plugin.\n\n## Features\n\n- Option to specify required user roles for pages.\n- Show message and login form when security check fails.\n- Login page template can be overwritten in your theme (create the file my-theme/smo/login.php).\n\nAdditionally:\n\n- You can invoke the has_permitted_role(\\$permitted_roles) method in your theme. It accepts an array of permitted roles (e.g., array('editor')) and returns true if access should be permitted and false if not.\n- You can clone the included \"Permitted Roles\" field for use in your own ACF field sets (e.g., if you wish to lock down some content added with ACF).\n\n## Enabling Additional Post Types\n\nOut of the box, the plugin is set up for use with pages. You can enable it for use with additional post types with two steps:\n\n1. Tell SMO to run security checks on your post type: hook onto the filter `SMO\\post_types`, returning an array of all post types SMO should check, e.g., `return array('page');`.\n2. Edit the ACF field group and add additional location rules as needed for the extra post types.\n\n## Filtering default permitted roles\n\nBy default, admins pass all permitted roles checks. If you want to filter this to remove admins or add other roles, you can use the `SMO\\permitted_roles` filter. For example:\n\n```php\n// add editor to SMO permitted roles\nadd_filter('SMO\\\\permitted_roles', function ($roles) {\n    $roles[] = 'editor';\n    return $roles;\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmirus%2Fsimple-members-only","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmirus%2Fsimple-members-only","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmirus%2Fsimple-members-only/lists"}