{"id":37262008,"url":"https://github.com/yardinternet/package-config-expander","last_synced_at":"2026-05-08T09:02:32.107Z","repository":{"id":330148617,"uuid":"814369709","full_name":"yardinternet/package-config-expander","owner":"yardinternet","description":"Adds necessary security, defaults and settings to this site.","archived":false,"fork":false,"pushed_at":"2026-02-17T09:52:31.000Z","size":378,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-17T14:37:05.636Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yardinternet.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-12T22:01:09.000Z","updated_at":"2026-01-30T22:04:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yardinternet/package-config-expander","commit_stats":null,"previous_names":["yardinternet/package-config-expander"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/yardinternet/package-config-expander","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yardinternet%2Fpackage-config-expander","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yardinternet%2Fpackage-config-expander/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yardinternet%2Fpackage-config-expander/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yardinternet%2Fpackage-config-expander/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yardinternet","download_url":"https://codeload.github.com/yardinternet/package-config-expander/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yardinternet%2Fpackage-config-expander/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29780604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T10:45:18.109Z","status":"ssl_error","status_checked_at":"2026-02-24T10:45:09.911Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2026-01-15T23:14:03.297Z","updated_at":"2026-05-08T09:02:31.952Z","avatar_url":"https://github.com/yardinternet.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yard Config Expander\n\n[![Code Style](https://github.com/yardinternet/package-config-expander/actions/workflows/format-php.yml/badge.svg?no-cache)](https://github.com/yardinternet/package-config-expander/actions/workflows/format-php.yml)\n[![PHPStan](https://github.com/yardinternet/package-config-expander/actions/workflows/phpstan.yml/badge.svg?no-cache)](https://github.com/yardinternet/package-config-expander/actions/workflows/phpstan.yml)\n[![Tests](https://github.com/yardinternet/package-config-expander/actions/workflows/run-tests.yml/badge.svg?no-cache)](https://github.com/yardinternet/package-config-expander/actions/workflows/run-tests.yml)\n![Code Coverage Badge](https://github.com/yardinternet/package-config-expander/blob/badges/coverage.svg)\n![Lines of Code Badge](https://github.com/yardinternet/package-config-expander/blob/badges/lines-of-code.svg)\n\nThis repository provides a scaffold for creating an Acorn package. For more detailed information, please refer to the [Acorn Package Development](https://roots.io/acorn/docs/package-development/) documentation.\n\n## Installation\n\nTo install this package using Composer, follow these steps:\n\n1. Add the following to the `require` section of your `composer.json`:\n\n    ```json\n    {\n      \"yard/config-expander\": \"*\"\n    }\n    ```\n\n2. Run the following command to install the package:\n\n    ```sh\n    composer update\n    ```\n\nYou can publish the config file with:\n\n```shell\nwp acorn vendor:publish --provider=\"Yard\\ConfigExpander\\ConfigExpanderServiceProvider\"\n```\n\n## Configuration\n\nAfter the configuration file has been published, you can customize the package settings by overwriting them.\nThe location of the published configuration file is: 'web/app/themes/{theme-name}/config/yard-config-expander.php\n\n### Calling Service Providers\n\nService providers are defined in a configuration file `yard-config-expander.php`. Each provider has an `enabled` flag to indicate whether it should be invoked.\n\n#### Example Configuration for Service Providers\n\n```php\n$config = [\n  'providers' =\u003e [\n    'Yard\\ConfigExpander\\ACF\\ACFServiceProvider' =\u003e [\n      'enabled' =\u003e true,\n    ],\n    'Yard\\ConfigExpander\\BranchViewer\\BranchViewerServiceProvider' =\u003e [\n      'enabled' =\u003e true,\n    ],\n    'Yard\\ConfigExpander\\Protection\\ProtectionServiceProvider' =\u003e [\n      'enabled' =\u003e true,\n    ],\n    'Yard\\ConfigExpander\\Disable\\DisableServiceProvider' =\u003e [\n      'enabled' =\u003e true,\n    ],\n    'Yard\\ConfigExpander\\Cleanup\\CleanupServiceProvider' =\u003e [\n      'enabled' =\u003e true,\n    ],\n    'Yard\\ConfigExpander\\Licenses\\LicensesServiceProvider' =\u003e [\n      'enabled' =\u003e true,\n    ],\n    'Yard\\ConfigExpander\\LoginScreenCustomization\\LoginScreenCustomizationServiceProvider' =\u003e [\n      'enabled' =\u003e true,\n    ],\n  ]\n];\n```\n\n### Settings\n\nAdditional settings are also defined in the same configuration file `yard-config-expander.php`.\nThese settings can be customized to fit your specific needs.\n\n```php\n$config = [\n  'defaults' =\u003e [\n    'admin' =\u003e [\n      'AUTOMATIC_UPDATER_DISABLED' =\u003e true,\n      'AUTOSAVE_INTERVAL' =\u003e 900,\n      'DISABLE_COMMENTS' =\u003e true,\n      'DISABLE_POSTS' =\u003e true,\n      'DISALLOW_FILE_EDIT' =\u003e true,\n      'DISABLE_ADMIN_NOTICES_FOR_NON_ADMINS' =\u003e true,\n      'UNSET_ADMIN_ROLE_FOR_NON_ADMINS' =\u003e true,\n      'WP_CACHE' =\u003e false,\n    ],\n    'api' =\u003e [\n      'DISABLE_REST_API_USERS' =\u003e true,\n      'DISABLE_REST_API_OEMBED' =\u003e true,\n    ],\n      'public' =\u003e [\n      'FEEDS_ENABLED' =\u003e false,\n      'XMLRPC_ENABLED' =\u003e false,\n      'XMLRPC_ALLOWED_METHODS' =\u003e [],\n      'CLEANUP_HEADERS' =\u003e true,\n      'DISABLE_EMOJICONS' =\u003e true,\n    ],\n  ],\n];\n```\n\n### Plugin defaults\n\nConsidering the following section of the configuration file `yard-config-expander.php`:\n\n```php\n$config = [\n  'cleanup' =\u003e [\n    'plugins' =\u003e [\n      Yard\\ConfigExpander\\Cleanup\\Plugins\\Stream::class,\n      Yard\\ConfigExpander\\Cleanup\\Plugins\\SearchWP::class\n    ]\n  ]\n]\n```\n\nThe provided classes are designed to manage the settings and cleanup tasks for various plugins within a WordPress environment.\nThese classes must extend the common base class `BaseAbstract` and include methods to handle both single-site and multi-site configurations.\n\n## Hooks\n\nThe hooks are divided by sections based on the package directories.\n\n### Clean-up\n\n#### Allow 'unfiltered_html' capability for administrators, superusers and editors only\n\n```php\nadd_filter('yard::config-expander/cleanup/allow-unfiltered-html', '__return_true');\n```\n\n### Login screen customization\n\n#### Overwrite the stylesheet file (URL)\n\n```php\nadd_filter('yard::config-expander/login/style-file', function(string $source) {\n  return $source;\n}, 10, 1);\n```\n\n#### Overwrite the logo above the login form (URL)\n\n```php\nadd_filter('yard::config-expander/login/logo', function(string $logo){\n  return $logo;\n}, 10, 1);\n```\n\n#### Customize the URL of the anchor around the logo\n\n```php\nadd_filter('yard::config-expander/login/logo-url', function(string $logo){\n  return $logo;\n}, 10, 1);\n```\n\n#### Overwrite the title of the link (value inside the anchor)\n\n```php\nadd_filter('yard::config-expander/login/logo-name', function(string $logo){\n  return $logo;\n}, 10, 1);\n```\n\n## About us\n\n[![banner](https://raw.githubusercontent.com/yardinternet/.github/refs/heads/main/profile/assets/small-banner-github.svg)](https://www.yard.nl/werken-bij/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyardinternet%2Fpackage-config-expander","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyardinternet%2Fpackage-config-expander","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyardinternet%2Fpackage-config-expander/lists"}