Crafting Web Experiences
It will be enough running this once.
For testing/staging purposes, sometimes you need to create new block or content based pages before taking them fully live. To check or show them without making them publicly visible to visitors, you can add “stage-” prefix to that new private pages with the hook below. When you’re logged in, you’re automatically redirected to the new…
If you don’t want to use only 127.0.0.1 local IP address for your projects, you can expand that in your computer. Each alias must be added individually like this:
# Download using curl # Give the execution permissions # Install WordPress Coding Standards # Apply the new coding standards # Update the default standard # Install the VS Code Extension PHP Sniffer & Beautifier: https://marketplace.visualstudio.com/items?itemName=ValeryanM.vscode-phpsab # Add these settings to the settings.json file of VS Code
You need to install WP-ENV globally or project based first. Then, create a “.wp-env.json” file to the root folder which has “wp-content” folder in it. .wp-env.json: (Most optimized config, here for details) To Run Server: (might take long at first) To Import Existing DB: To Export DB: Rewrite Flush: (Not working. Enter Settings > Permalinks…
List all the commits with Indexes: (Format: <index> <commit-id> <commit-message>) List all the commits without numbers: (Format: <commit-id> <commit-message>) Reference:https://git-scm.com/docs/git-log
If you want to completely disable the trash: If you want trash to be emptied in 30 days:
If you want to determine a section height by it’s background image to fit it correctly, use the jQuery code below and put “.bg-sized” class into the section:
To print into a CSV file: References:https://git-scm.com/docs/git-loghttps://stackoverflow.com/a/27313500
script.sh: Usage: Or:
To filter by a port number:
In some cases, you might need to clone a multisite for testing or staging purposes, but you might want to use the same database on both clone and production websites. This can be needed not to deal with data synchronization between staging and production sites when it’s ready to take the changes live. It’s especially…