What you need:
- WP-CLI
- WAMP
- A WordPress instance
- Notepad++ or any other text editor
Open a Command Prompt window and write the following command:
ipconfig all
# Your snippets | |
# | |
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
# expand the prefix into a larger code block with templated values. | |
# | |
# You can create a new snippet in this file by typing "snip" and then hitting | |
# tab. | |
# | |
# An example CoffeeScript snippet to expand log to console.log: | |
# |
<?php | |
/* CHECK FOR BOOTSTRAP (or other scripts) | |
There is no foolproof way to do this check. For this to work, I've assumed that the handles or at least the file names | |
of the enqueued scripts contain the string we need to check for. | |
*/ | |
function check_dependencies() { |
# How to install a new WordPress site from scratch using WP-CLI. | |
# We are going to assume that you have installed WP-CLI with all of the needed dependencies (composer, mysql, php) and added them to the global system/user path. | |
# Commands that you need to use in the CLI are marked with a ">" at the start of the row (you don't need to add that to the command). | |
# Create a new empty directory in your /www path. You can do that from the CLI directly. We are going to do a local install using WAMP software stack. | |
# Either go to the /www directory through explorer and create a new folder or use the following command in the CLI (you have to change your current directory to '/wamp/www' first). | |
> mkdir wordpress |
sass --watch sass:css --style compressed --sourcemap=none | |
#Styles | |
:nested | |
:compact | |
:expanded | |
:compressed |
git remote add upstream https://github.com/owner/repo.git | |
git fetch upstream | |
git rebase upstream/development | |
/* Solve conflicts */ | |
git add conflicted-files.extension |
What you need:
Open a Command Prompt window and write the following command:
ipconfig all
/** | |
* My Account | |
*/ | |
.woocommerce-account .woocommerce-MyAccount-navigation { | |
width: 20%; | |
} | |
.woocommerce-account .woocommerce-MyAccount-content { | |
display: inline-block; |
@ECHO OFF | |
php "c:/Environment/wp-cli/wp-cli.phar" %* |
@echo off | |
set /p wpInstance= Local WordPress instance name: & echo. | |
set dbName=%wpInstance% | |
set dbUser=root | |
set dbPass= | |
rem change this if you want to personalize installs. | |
set user=andrei | |
set pass=andrei |
$(document).mouseup(function (e) | |
{ | |
var container = $("YOUR CONTAINER SELECTOR"); | |
if (!container.is(e.target) // if the target of the click isn't the container... | |
&& container.has(e.target).length === 0) // ... nor a descendant of the container | |
{ | |
container.hide(); | |
} | |
}); |