This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
| <?php | |
| /** | |
| * SOURCE: https://stackoverflow.com/questions/52937409/create-programmatically-a-product-using-crud-methods-in-woocommerce-3 | |
| */ | |
| /* THE CODE FUNCTION */ | |
| // Custom function for product creation (For Woocommerce 3+ only) | |
| function create_product( $args ){ | |
| global $woocommerce; |
| #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
| ; #Warn ; Enable warnings to assist with detecting common errors. | |
| SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
| SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
| F12::ToggleTerminal() | |
| ShowAndPositionTerminal() | |
| { | |
| WinShow ahk_class CASCADIA_HOSTING_WINDOW_CLASS |
| <?php | |
| ######################## | |
| // GET FIELD NAMES AND VALUES FROM ACF GROUP | |
| // | |
| // created by craig@jucra.com on 27/8/2019 | |
| // | |
| // This script will do the following: | |
| // 1. Loop through the fields in a specific ACF Group | |
| // 2. Create an array called $array_of_field_names | |
| // so you can easily print out a list of the field names |
Why?
This:
.action {
@extend .ml-3;
}| "use strict"; | |
| // Load plugins | |
| const autoprefixer = require("autoprefixer"); | |
| const browsersync = require("browser-sync").create(); | |
| const cp = require("child_process"); | |
| const cssnano = require("cssnano"); | |
| const del = require("del"); | |
| const eslint = require("gulp-eslint"); | |
| const gulp = require("gulp"); |
| if ($('.swiper-container').length > 0) { //some-slider-wrap-in | |
| let swiperInstances = []; | |
| $(".swiper-container").each(function(index, element){ //some-slider-wrap-in | |
| const $this = $(this); | |
| $this.addClass("instance-" + index); //instance need to be unique (ex: some-slider) | |
| $this.parent().find(".swiper-pagination").addClass("pagination-" + index); | |
| $this.parent().find(".swiper-button-prev").addClass("prev-" + index); //prev must be unique (ex: some-slider-prev) | |
| $this.parent().find(".swiper-button-next").addClass("next-" + index); //next must be unique (ex: some-slider-next) | |
| swiperInstances[index] = new Swiper(".instance-" + index, { //instance need to be unique (ex: some-slider) | |
| // your settings ... |
| wp_enqueue_script( 'my-ajax-request', get_template_directory_uri() . '/js/main.js' ); | |
| wp_localize_script( 'my-ajax-request', 'myajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) ); | |
| add_action('wp_ajax_woo_quickview', 'woo_quickview'); | |
| add_action('wp_ajax_nopriv_woo_quickview', 'woo_quickview'); | |
| function woo_quickview() { | |
| global $post, $product, $woocommerce; |
| #!/bin/bash | |
| iatest=$(expr index "$-" i) | |
| ####################################################### | |
| # SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me | |
| ####################################################### | |
| # Source global definitions | |
| if [ -f /etc/bashrc ]; then | |
| . /etc/bashrc |