Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| 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); | |
| } | |
| } | 
| mkdir ~/bin | |
| mkdir ~/bin/wp-cli | |
| cd ~/bin/wp-cli | |
| curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
| chmod +x wp-cli.phar | |
| echo "export COLUMNS" >> ~/.bashrc | |
| echo "alias wp='php ~/bin/wp-cli/wp-cli.phar'" >> ~/.bashrc | |
| echo "alias php='/usr/bin/php'" >> ~/.bashrc | |
| source ~/.bashrc | |
| echo "PATH=$HOME/bin:$PATH" >> ~/.bashrc | 
| remove_action( 'setup_theme', array( 'CDN_Enabler_Engine', 'start' ) ); | |
| add_action( 'template_redirect', array( 'CDN_Enabler_Engine', 'start' ), 20 ); | 
| const { | |
| subscribe, | |
| select | |
| } = wp.data; | |
| /** | |
| * Add dark-mode class to block-editor based on selected page template | |
| */ | |
| wp.domReady( () => { | |
| const postType = select( 'core/editor' ).getCurrentPostType(); | 
| /** | |
| * 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'; | 
| /* | |
| * 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 ) => { | 
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| d |