• Resolved jimador

    (@jimador)


    Hello,

    Please provide us with a code example to add an entry to the Web App Manifest using the web_app_manifest filter. The idea is customizing manifest’s “icons” property as follows:

    {
      ...
      "icons": [
        ...
        {
          "src": "path/to/maskable_icon.png",
          "sizes": "196x196",
          "type": "image/png",
          "purpose": "maskable"
      ]
      ...
    }
    

    We are not completely sure if this customization has to be done at the get_icons() function level or using the web_app_manifest filter.

    Thanks in advance for your kind assistance.

Viewing 1 replies (of 1 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    The output of get_icons() is not filterable, so you’d need to use web_app_manifest.

    add_filter(
    	'web_app_manifest',
    	function( $manifest ) {
    		// Modify $manifest['icons'] here.
    		return $manifest;
    	}
    );
Viewing 1 replies (of 1 total)
  • The topic ‘Adding an entry to the Web App Manifest’ is closed to new replies.