Is there anyone who can help?
I’m also curious about your ideas for the pwabuilder.com site.
Hey there. This is possible today since all that seems required is modifying the Web App Manifest, and this can be done with the web_app_manifest
filter.
So using the example shortcuts from that Web.dev article, this is how they could be added to your manifest with the PWA plugin:
add_filter(
'web_app_manifest',
static function ( $manifest ) {
if ( ! isset( $manifest['shortcuts'] ) ) {
$manifest['shortcuts'] = array();
}
$manifest['shortcuts'] = array_merge(
$manifest['shortcuts'],
array(
array(
"name" => "Open Play Later",
"short_name" => "Play Later",
"description" => "View the list of podcasts you saved for later",
"url" => "/play-later?utm_source=homescreen",
"icons" => array( array( "src" => "/icons/play-later.png", "sizes" => "192x192" ) )
),
array(
"name" => "View Subscriptions",
"short_name" => "Subscriptions",
"description" => "View the list of podcasts you listen to",
"url" => "/subscriptions?utm_source=homescreen",
"icons" => array( array( "src" => "/icons/subscriptions.png", "sizes" => "192x192" ) )
)
)
);
return $manifest;
}
);
Sorry, I don’t have any experience with pwabuilder.com.
Thanks. It worked. I removed the description as I found it unnecessary.
The site I mentioned says that besides making PWA analysis, it can prepare PWA for stores and turn it into an application. But I haven’t tested it yet.