內容簡介
```html
<ul>
<li>外掛可像本地應用程序一樣運作,可以註冊以在此啟動器中顯示。</li>
</ul>
```
**問題與答案:**
1. 什麼樣的外掛可以在此啟動器中註冊?
- 外掛可像本地應用程序一樣運作的外掛可以在此啟動器中註冊。
2. 在提供的程式碼示例中,哪三個關鍵是必須的?
- 必須有 "name"、"icon_url" 和 "url" 這三個關鍵。
3. 如果要將一個名為 "Friends" 的應用程式添加到陣列中,應該如何設置?
- 在陣列中新增一個名為 "friends" 的項目,並設定該應用程式的名稱、圖示URL和連結URL。
外掛標籤
開發者團隊
原文外掛簡介
This plugin adds a /my-apps/ route to your WordPress so that it can act as your personal apps launcher.
You can use your own WordPress as the place where you host apps in form of plugins. It can be hard to launch them since you have to navigate wp-admin. This adds a dashboard like an mobile phone launcher to your WordPress.
Plugin “Apps” can register their own icons but you can add your own links.
Code Example
`php
add_filter( ‘my_apps_plugins’, function ( $apps ) {
// Add your app to the array. These three keys are mandatory:
$apps[‘friends’] = array(
// Name: The name that will be displayed.
‘name’ => __( ‘Friends’, ‘friends’ ),
// The icon as a URL. You can also use a local URL inside a plugin, using plugins_url().
‘icon_url’ => ‘https://ps.w.org/friends/assets/icon-256×256.png’,
// The URL this should link to.
‘url’ => home_url( ‘/friends/’ ),
);
return $apps;
} );
`
