This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Wrap all ACF Blocks in Disabled block to disable all links in edit view | |
*/ | |
const { createHigherOrderComponent } = wp.compose; | |
const { Fragment } = wp.element; | |
import { Disabled } from '@wordpress/components'; | |
const withDisabledCompontent = createHigherOrderComponent( ( BlockEdit ) => { | |
return ( props ) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* BLOCK: string-list-block | |
* | |
* Registering a basic block with Gutenberg. | |
* Simple block, renders and saves the same content without any interactivity. | |
*/ | |
// Import CSS. | |
import './style.scss'; | |
import './editor.scss'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function removeStylesFromHtmlMarkup($markup) { | |
function removeElementsByTagName($tagName, $document) { | |
$nodeList = $document->getElementsByTagName($tagName); | |
for ($nodeIdx = $nodeList->length; --$nodeIdx >= 0; ) { | |
$node = $nodeList->item($nodeIdx); | |
$node->parentNode->removeChild($node); | |
} | |
} |
OlderNewer