# extendify/3.1.5/src/Shared/lib/wp.js

Extendify, version 3.1.5. 17 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.1.5/code/src/Shared/lib/wp.js
- Raw: https://pluginprobe.com/plugins/extendify/3.1.5/raw/src/Shared/lib/wp.js
- Modified: 2026-02-18T22:27:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/3.1.5/code/src/Shared/lib/wp.js#L10-L20`.

```javascript
import { select, subscribe } from '@wordpress/data';
export const whenEditorIsReady = () => {
	return new Promise((resolve) => {
		const unsubscribe = subscribe(() => {
			// This will trigger after the initial render blocking, before the window load event
			// This seems currently more reliable than using __unstableIsEditorReady
			if (
				select('core/editor').isCleanNewPost() ||
				select('core/block-editor').getBlockCount() > 0
			) {
				unsubscribe();
				resolve();
			}
		});
	});
};

```
