How can I show a Slot/Fill in the block editor

By wrapping everything in a <SlotFillProvider> and rendering MyTestFill it works, here is the code: const { Fill, Slot } = createSlotFill( ‘MyFill’ ); const TestFill = () => <Fill>My item in the editor</Fill>; export default function Edit() { return ( <p { …useBlockProps() }> <SlotFillProvider> <Slot /> { __( ‘Fill Test – hello from … Read more

How to detect if we are in the Site Editor part of the Block Editor (as opposed to editing a Page/Post) in JavaScript?

The Block Editor, in both the context of the editing pages or the Site Editor, actually does provide some simple variables in JavaScript similar to the data that is available via get_current_screen in PHP. Sample variables in Page Editor: var ajaxurl=”/mysite/wp-admin/admin-ajax.php”, pagenow = ‘page’, typenow = ‘page’, adminpage=”post-new-php”, thousandsSeparator=”,”, decimalPoint=”.”, isRtl = 0; Sample variables … Read more

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