Skip to content

Commit

Permalink
unregisterPlugin: port old README docs to JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Mar 6, 2019
1 parent 45635b2 commit 47e366f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ registerPlugin( 'plugin-name', {

Unregisters a plugin by name.

**Usage**

```js
const { unregisterPlugin } = wp.plugins;
unregisterPlugin( 'plugin-name' );
```

**Parameters**

- **name** `string`: Plugin name.
Expand Down
6 changes: 6 additions & 0 deletions packages/plugins/src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ export function registerPlugin( name, settings ) {
*
* @param {string} name Plugin name.
*
* @example
* ```js
* const { unregisterPlugin } = wp.plugins;
* unregisterPlugin( 'plugin-name' );
* ```
*
* @return {?WPPlugin} The previous plugin settings object, if it has been
* successfully unregistered; otherwise `undefined`.
*/
Expand Down

0 comments on commit 47e366f

Please sign in to comment.