advanced shortcuts
-
Hello,
Editing the shortcut-related code as follows, do you think it would be possible for me to show different shortcuts for logged-in and non-logged-in users?add_filter( 'web_app_manifest', static function ( $manifest ) { if ( ! isset( $manifest['shortcuts'] ) ) { $manifest['shortcuts'] = array(); } if (is_user_logged_in()) { $manifest['shortcuts'] = array_merge( $manifest['shortcuts'], array( array( "name" => "Kullan?c? hesab?n?z? a??n", "short_name" => "Hesab?n?z", "url" => "/account/?utm_medium=pwa", "icons" => array( array( "src" => "https://cxxc.com/account.png", "sizes" => "192x192" ) ) ), array( "name" => "?deme i?lemlerinizi yap?n", "short_name" => "?deme", "url" => "/payment/?utm_medium=pwa", "icons" => array( array( "src" => "https://cxxc.com/payment.png", "sizes" => "192x192" ) ) ) ) ); } else { $manifest['shortcuts'] = array_merge( $manifest['shortcuts'], array( array( "name" => "Giri? yap?n", "short_name" => "Giri?", "url" => "/login/?utm_medium=pwa", "icons" => array( array( "src" => "https://cxxc.com/login.png", "sizes" => "192x192" ) ) ), array( "name" => "Kaydolun", "short_name" => "Kay?t", "url" => "/register/?utm_medium=pwa", "icons" => array( array( "src" => "https://cxxc.com/register.png", "sizes" => "192x192" ) ) ) ) ); } return $manifest; } );
One more thing, is it possible to add a shortcut related to search there and the user to type what they want to search without opening the application and redirect to the results page accordingly?
Like this ./?s=i+didn%27t+call+this
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘advanced shortcuts’ is closed to new replies.