clone from: https://github.com/yardinternet/wp-webmanifest
wordpress
PHP 98.5%
Other 1.5%
111 1 0

Clone this repository

https://tangled.org/cat-soft.nl/wp-webmanifest https://tangled.org/did:plc:kdo7wh6tgqhc7s5c3u2xff6a/wp-webmanifest
git@tangled.org:cat-soft.nl/wp-webmanifest git@tangled.org:did:plc:kdo7wh6tgqhc7s5c3u2xff6a/wp-webmanifest

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

wp-webmanifest#

Code Style PHPStan Tests Code Coverage Badge Lines of Code Badge

This package for WordPress (Sage & Acorn) automatically generates a manifest.webmanifest JSON file. It also creates maskable versions of the favicon that will be used as the icons.

Requirements#

Installation#

To install this package using Composer, follow these steps:

  1. Install this package with Composer:

    composer require yard/webmanifest
    
  2. Run the Acorn WP-CLI command to discover this package:

    wp acorn package:discover
    

You can publish the config file with:

wp acorn vendor:publish --provider="Yard\Webmanifest\WebmanifestServiceProvider"

Usage#

In theory you don't have to do anything, the Webmanifest works out of the box. This packages uses the favicon set in the theme to generate icons.

But you can alter behavior via the configuration.

Manually configuring icons#

You can do this by adding them to the icons array in the config

'icons' => [
  [
    'src' => 'path/to/icon.png',
    'sizes' => '192x192',
    'type' => 'image/png',
  ],
],

Theme settings#

You can set the background and theme color by changing the config values below.

'background_color' => '#add8eb',
'theme_color' => '#ffffff',

Icon sizes#

'iconSizes' => [192, 384, 512, 1024],

Webmanifest URL path#

'url' => '/manifest.webmanifest',

Webmanifest icons url#

'iconUrl' => '/webmanifest/icon',

About us#

banner