Where is getSite selector defined?

I found it – it is dynamically injected as entity in gutenberg/packages/core-data/src/index.js, on line 22 const entitySelectors = rootEntitiesConfig.reduce( ( result, entity ) => { const { kind, name } = entity; result[ getMethodName( kind, name ) ] = ( state, key, query ) => selectors.getEntityRecord( state, kind, name, key, query ); result[ getMethodName( kind, … Read more

Remove placeholder from core/image in InnerBlocks template

Unfortunately, there is no easy solution. You could use editor.BlockEdit hook to change default core/image Edit component, and copy the code from current trunk version, and change there to not use MediaPlaceholder, but MediaUpload wrapped in MediaUploadCheck. However, that would create problem that all core/image blocks would be changed and it would not be futureproof, … Read more

Pass component name in onChange [closed]

Rather than passing handleChange directly to onChange, you can use an anonymous function to call it: <CheckboxControl key={index} checked={isChecked} label={element.title} help={element.description} name={element.name} onChange={(value) => { handleChange(element.name, value); }} /> Then your handleChange function can accept the name and value as its parameters. const handleChange = (name, value) => { setInputs(values => ({…values, [name]: value})); };

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)