• Resolved detroitwidget

    (@detroitwidget)


    Hi Guys,

    How would I use the superpwa_manifest filter to change the display property from standalone to browser?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @

    Thanks for checking out SuperPWA. Very glad!

    Please add this to the functions.php of your active theme. Then deactivate and reactivate SuperPWA plugin.

    /**
     * Set display property in SuperPWA manifest as browser
     * 
     * @param (array) $manifest array containing the manifest members and its properties. 
     * 
     * @return (array) modified $manifest array.  
     *
     * @link https://superpwa.com/codex/superpwa_manifest/
     */
    function yourprefix_superpwa_change_display_to_browser( $manifest ) {
    	$manifest['display'] = 'browser';
    	
    	return $manifest;
    }
    add_filter( 'superpwa_manifest', 'yourprefix_superpwa_change_display_to_browser' );

    I hope that helps.

    The next release of SuperPWA will have this as a UI option. Once that is available, you can remove the snippet. Leaving it there will also not do any harm.

    Best regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to use superpwa_manifest filter’ is closed to new replies.