PHPackages                             yard/config-expander - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. yard/config-expander

ActivePackage[Utility &amp; Helpers](/categories/utility)

yard/config-expander
====================

Adds necessary security, defaults and settings to this site.

v1.4.2(2mo ago)01.2k↓32.1%[1 PRs](https://github.com/yardinternet/package-config-expander/pulls)MITPHPPHP &gt;=8.2CI passing

Since Aug 16Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/yardinternet/package-config-expander)[ Packagist](https://packagist.org/packages/yard/config-expander)[ RSS](/packages/yard-config-expander/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (40)Used By (0)

Yard Config Expander
====================

[](#yard-config-expander)

[![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)[![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)[![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)[![Code Coverage Badge](https://github.com/yardinternet/package-config-expander/raw/badges/coverage.svg)](https://github.com/yardinternet/package-config-expander/blob/badges/coverage.svg)[![Lines of Code Badge](https://github.com/yardinternet/package-config-expander/raw/badges/lines-of-code.svg)](https://github.com/yardinternet/package-config-expander/blob/badges/lines-of-code.svg)

This 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.

Installation
------------

[](#installation)

To install this package using Composer, follow these steps:

1. Add the following to the `require` section of your `composer.json`:

    ```
    {
      "yard/config-expander": "*"
    }
    ```
2. Run the following command to install the package:

    ```
    composer update
    ```

You can publish the config file with:

```
wp acorn vendor:publish --provider="Yard\ConfigExpander\ConfigExpanderServiceProvider"
```

Configuration
-------------

[](#configuration)

After the configuration file has been published, you can customize the package settings by overwriting them. The location of the published configuration file is: 'web/app/themes/{theme-name}/config/yard-config-expander.php

### Calling Service Providers

[](#calling-service-providers)

Service providers are defined in a configuration file `yard-config-expander.php`. Each provider has an `enabled` flag to indicate whether it should be invoked.

#### Example Configuration for Service Providers

[](#example-configuration-for-service-providers)

```
$config = [
  'providers' => [
    'Yard\ConfigExpander\ACF\ACFServiceProvider' => [
      'enabled' => true,
    ],
    'Yard\ConfigExpander\BranchViewer\BranchViewerServiceProvider' => [
      'enabled' => true,
    ],
    'Yard\ConfigExpander\Protection\ProtectionServiceProvider' => [
      'enabled' => true,
    ],
    'Yard\ConfigExpander\Disable\DisableServiceProvider' => [
      'enabled' => true,
    ],
    'Yard\ConfigExpander\Cleanup\CleanupServiceProvider' => [
      'enabled' => true,
    ],
    'Yard\ConfigExpander\Licenses\LicensesServiceProvider' => [
      'enabled' => true,
    ],
    'Yard\ConfigExpander\LoginScreenCustomization\LoginScreenCustomizationServiceProvider' => [
      'enabled' => true,
    ],
  ]
];
```

### Settings

[](#settings)

Additional settings are also defined in the same configuration file `yard-config-expander.php`. These settings can be customized to fit your specific needs.

```
$config = [
  'defaults' => [
    'admin' => [
      'AUTOMATIC_UPDATER_DISABLED' => true,
      'AUTOSAVE_INTERVAL' => 900,
      'DISABLE_COMMENTS' => true,
      'DISABLE_POSTS' => true,
      'DISALLOW_FILE_EDIT' => true,
      'DISABLE_ADMIN_NOTICES_FOR_NON_ADMINS' => true,
      'UNSET_ADMIN_ROLE_FOR_NON_ADMINS' => true,
      'WP_CACHE' => false,
    ],
    'api' => [
      'DISABLE_REST_API_USERS' => true,
      'DISABLE_REST_API_OEMBED' => true,
    ],
      'public' => [
      'FEEDS_ENABLED' => false,
      'XMLRPC_ENABLED' => false,
      'XMLRPC_ALLOWED_METHODS' => [],
      'CLEANUP_HEADERS' => true,
      'DISABLE_EMOJICONS' => true,
    ],
  ],
];
```

### Plugin defaults

[](#plugin-defaults)

Considering the following section of the configuration file `yard-config-expander.php`:

```
$config = [
  'cleanup' => [
    'plugins' => [
      Yard\ConfigExpander\Cleanup\Plugins\Stream::class,
      Yard\ConfigExpander\Cleanup\Plugins\SearchWP::class
    ]
  ]
]
```

The provided classes are designed to manage the settings and cleanup tasks for various plugins within a WordPress environment. These classes must extend the common base class `BaseAbstract` and include methods to handle both single-site and multi-site configurations.

Hooks
-----

[](#hooks)

The hooks are divided by sections based on the package directories.

### Clean-up

[](#clean-up)

#### Allow 'unfiltered\_html' capability for administrators, superusers and editors only

[](#allow-unfiltered_html-capability-for-administrators-superusers-and-editors-only)

```
add_filter('yard::config-expander/cleanup/allow-unfiltered-html', '__return_true');
```

### Login screen customization

[](#login-screen-customization)

#### Overwrite the stylesheet file (URL)

[](#overwrite-the-stylesheet-file-url)

```
add_filter('yard::config-expander/login/style-file', function(string $source) {
  return $source;
}, 10, 1);
```

#### Overwrite the logo above the login form (URL)

[](#overwrite-the-logo-above-the-login-form-url)

```
add_filter('yard::config-expander/login/logo', function(string $logo){
  return $logo;
}, 10, 1);
```

#### Customize the URL of the anchor around the logo

[](#customize-the-url-of-the-anchor-around-the-logo)

```
add_filter('yard::config-expander/login/logo-url', function(string $logo){
  return $logo;
}, 10, 1);
```

#### Overwrite the title of the link (value inside the anchor)

[](#overwrite-the-title-of-the-link-value-inside-the-anchor)

```
add_filter('yard::config-expander/login/logo-name', function(string $logo){
  return $logo;
}, 10, 1);
```

About us
--------

[](#about-us)

[![banner](https://raw.githubusercontent.com/yardinternet/.github/refs/heads/main/profile/assets/small-banner-github.svg)](https://www.yard.nl/werken-bij/)

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance86

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~18 days

Recently: every ~40 days

Total

32

Last Release

83d ago

PHP version history (3 changes)1.0.1PHP ^8.0

1.2.0PHP &gt;=8.1

v1.3.0PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/62775?v=4)[Anton Zhuravsky](/maintainers/Yard)[@yard](https://github.com/yard)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (27 commits)")[![Rovasch](https://avatars.githubusercontent.com/u/166744617?v=4)](https://github.com/Rovasch "Rovasch (22 commits)")[![ictbeheer](https://avatars.githubusercontent.com/u/14947039?v=4)](https://github.com/ictbeheer "ictbeheer (13 commits)")[![SimonvanWijhe](https://avatars.githubusercontent.com/u/41121933?v=4)](https://github.com/SimonvanWijhe "SimonvanWijhe (10 commits)")[![robertbossaert](https://avatars.githubusercontent.com/u/4972135?v=4)](https://github.com/robertbossaert "robertbossaert (5 commits)")[![rivanuff](https://avatars.githubusercontent.com/u/16398970?v=4)](https://github.com/rivanuff "rivanuff (4 commits)")[![FreakyWizard](https://avatars.githubusercontent.com/u/114140418?v=4)](https://github.com/FreakyWizard "FreakyWizard (3 commits)")[![yard-bot](https://avatars.githubusercontent.com/u/66111179?v=4)](https://github.com/yard-bot "yard-bot (2 commits)")[![mvdhoek1](https://avatars.githubusercontent.com/u/11852816?v=4)](https://github.com/mvdhoek1 "mvdhoek1 (1 commits)")[![YvetteNikolov](https://avatars.githubusercontent.com/u/48315669?v=4)](https://github.com/YvetteNikolov "YvetteNikolov (1 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/yard-config-expander/health.svg)

```
[![Health](https://phpackages.com/badges/yard-config-expander/health.svg)](https://phpackages.com/packages/yard-config-expander)
```

###  Alternatives

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[tonysm/rich-text-laravel

Integrates Trix content with Laravel

46577.8k1](/packages/tonysm-rich-text-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[spatie/laravel-screenshot

Take screenshots of web pages in Laravel apps

7615.9k2](/packages/spatie-laravel-screenshot)[joaopaulolndev/filament-world-clock

Show hours around the world by timezone

3111.9k](/packages/joaopaulolndev-filament-world-clock)[tonegabes/filament-better-options

Filament form components for better radio and checkbox options.

155.2k](/packages/tonegabes-filament-better-options)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
