[ SYSTEM ]: Linux wordpress 6.1.0-44-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
[ SERVER ]: Apache/2.4.66 (Debian) | PHP: 8.2.30
[ USER ]: www-data | IP: 172.19.30.54
GEFORCE FILE MANAGER
/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
presto-player
/
src
/
admin
/
blocks
/
hooks
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 apply-popup-button-trigger-ui.js
2,062 B
SET
[ EDIT ]
|
[ DEL ]
📄 apply-popup-image-trigger-placeholder.js
3,338 B
SET
[ EDIT ]
|
[ DEL ]
📄 apply-popup-preview-toggle.js
958 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: apply-popup-preview-toggle.js
import { addFilter } from "@wordpress/hooks"; import { createHigherOrderComponent } from "@wordpress/compose"; import Context from "../blocks/popup/context/context"; import PreviewToggle from "../blocks/popup/components/PreviewToggle"; /** * Higher order component to add tab switcher to blocks in popup context */ const WithPopupPreviewToggle = createHigherOrderComponent((BlockEdit) => { return (props) => ( <Context.Consumer> {(contextValue) => { const { open, setOpen } = contextValue || {}; return ( <> {contextValue && <PreviewToggle open={open} setOpen={setOpen} />} <BlockEdit {...props} /> </> ); }} </Context.Consumer> ); }, "withPopupPreviewToggle"); /** * Custom hook to initialize the popup tab switcher */ // Apply the filter to all block edits addFilter( "editor.BlockEdit", "presto-player/popup-preview-toggle", WithPopupPreviewToggle );