Skip to content

Instantly share code, notes, and snippets.

@g000m
g000m / bedrockthis.sh
Last active October 5, 2021 20:01
For converting a standard WordPress install to composer-based WP
#!/bin/bash
### 1. check for requirements & set variables
# check for directory name as input
if [ -z $1 ]; then
echo "bedrock directory name must be passed in"
exit 1
fi
@g000m
g000m / custom-ajax-spotify.php
Created June 7, 2020 08:47 — forked from ivanlebanov/custom-ajax-spotify.php
Spotify API integration with WordPress
<?php
function ajax_enquiry_init(){
wp_register_script('jquery', 'https://code.jquery.com/jquery-1.11.2.min.js' );
wp_enqueue_script('jquery');
wp_register_script('main', get_template_directory_uri() . '/js/main.js', array('jquery') );
wp_enqueue_script('main');
wp_localize_script( 'main', 'ajax_auth_object', array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),