{"id":15175150,"url":"https://github.com/dartmoon-io/wordpress-disable-editor","last_synced_at":"2026-02-26T16:38:56.917Z","repository":{"id":167260656,"uuid":"642856282","full_name":"dartmoon-io/wordpress-disable-editor","owner":"dartmoon-io","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-18T10:02:48.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-03T20:51:39.095Z","etag":null,"topics":["wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/dartmoon-io.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":"2023-05-19T13:53:16.000Z","updated_at":"2023-08-22T12:56:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"c386479e-d508-4afb-af15-560070c372bc","html_url":"https://github.com/dartmoon-io/wordpress-disable-editor","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"29930e99191da7f1fc1ba5768ead3bd4a51acd16"},"previous_names":["alessandro1105/wordpress-disable-editor"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/dartmoon-io/wordpress-disable-editor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dartmoon-io%2Fwordpress-disable-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dartmoon-io%2Fwordpress-disable-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dartmoon-io%2Fwordpress-disable-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dartmoon-io%2Fwordpress-disable-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dartmoon-io","download_url":"https://codeload.github.com/dartmoon-io/wordpress-disable-editor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dartmoon-io%2Fwordpress-disable-editor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283879576,"owners_count":26910246,"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-11-11T02:00:06.610Z","response_time":65,"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":["wordpress","wordpress-plugin"],"created_at":"2024-09-27T12:03:50.266Z","updated_at":"2025-11-11T16:02:14.011Z","avatar_url":"https://github.com/dartmoon-io.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Disable Editor\n\nThis plugin allows you to disable the editor for some CPTs, templates or specific pages.\n\n## Installation\n\n### If you use a Roots Bedrock or a composer-based WordPress installation\n\n```bash\ncomposer require dartmoon/wordpress-disable-editor\n```\n\n## If you use a normal WordPress installation\n\n1. Download and install a MU plugin loader that lets you use MU plugins that reside inside folders. For example you could use [Bedrock Autoloader](https://github.com/roots/bedrock-autoloader).\n\n2. [Download the latest release](https://github.com/dartmoon-io/wordpress-disable-editor/releases) of this plugin and extract it inside the mu-plugins folder of your WordPress installation.\n\n## Usage\n\n### Disable Gutenberg\n\n```php\nadd_filter('drtn/disable_gutenberg', function ($can_edit, $post_id, $post_type) {\n    /**\n     * Post types for which to enable Gutenberg\n     */\n    if ($post_type == 'post') {\n        return true;\n    }\n\n    /**\n     * Templates for which we need to disable Gutemberg\n     */\n    $excludedTemplates = [\n        // \n    ];\n\n    /**\n     * Specific Post IDs for which we need to disable Gutenberg\n     */\n    $excludedIds = [\n        //\n    ];\n\n    // Retrieve the template of the current post id\n    $template = basename(get_page_template());\n    return !(in_array($post_id, $excludedIds) || in_array($template, $excludedTemplates));\n}, 10, 3);\n```\n\n### Disable classic editor\n\n```php\nadd_filter('drtn/disable_editor', function ($can_edit, $post_id, $post_type) {\n    /**\n     * Post types for which to enable the classic editor\n     */\n    if ($post_type == 'post') {\n        return true;\n    }\n\n    /**\n     * Templates for which we need to disable the classic editor\n     */\n    $excludedTemplates = [\n        // \n    ];\n\n    /**\n     * Specific Post IDs for which we need to disable the classic editor\n     */\n    $excludedIds = [\n        //\n    ];\n\n    // Retrieve the template of the current post id\n    $template = basename(get_page_template());\n    return !(in_array($post_id, $excludedIds) || in_array($template, $excludedTemplates));\n}, 10, 3);\n```\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE.md file for details","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdartmoon-io%2Fwordpress-disable-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdartmoon-io%2Fwordpress-disable-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdartmoon-io%2Fwordpress-disable-editor/lists"}