This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: WordPress MU Domain Mapping | |
Plugin URI: http://ocaoimh.ie/wordpress-mu-domain-mapping/ | |
Description: Map any blog on a WordPress website to another domain. | |
Version: 0.5.5 | |
Author: Donncha O Caoimh | |
Author URI: http://ocaoimh.ie/ | |
*/ | |
/* Copyright Donncha O Caoimh (http://ocaoimh.ie/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/<[^>]*>|&.*?;/g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$.fn.changeElementType = function(newType) { | |
var attrs = {}; | |
$.each(this[0].attributes, function(idx, attr) { | |
attrs[attr.nodeName] = attr.nodeValue; | |
}); | |
this.replaceWith(function() { | |
return $("<" + newType + "/>", attrs).append($(this).contents()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- delete any usermeta specific to the other subsites | |
delete from wp_usermeta where meta_key regexp '^wp_([0-9]+)_'; | |
-- duplicate the wp_usermeta structure in a working data table, | |
-- but add a unique index for filtering out duplicates | |
create table _fix_usermeta like wp_usermeta; | |
alter table _fix_usermeta add unique(user_id, meta_key); | |
-- copy the site-specific usermeta, keeping only the last of each duplicate | |
insert into _fix_usermeta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delete from u, um | |
using wp_users u | |
left join wp_usermeta um on um.user_id = u.ID | |
where u.user_login like '\_%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
site:wordpress.org/support/ "exact plugin name" keywords to search for |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var del = require('del'); | |
var uglify = require('gulp-uglify'); | |
var gulpif = require('gulp-if'); | |
var exec = require('child_process').exec; | |
var notify = require('gulp-notify'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Gulpfile.js file for the tutorial: | |
Using Gulp, SASS and Browser-Sync for your front end web development - DESIGNfromWITHIN | |
http://designfromwithin.com/blog/gulp-sass-browser-sync-front-end-dev | |
Steps: | |
1. Install gulp globally: | |
npm install --global gulp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// expands/collapses section subpage lists | |
$(".pil_subMenuHeader").click( function(){ | |
$(".submenu", this).slideToggle(); | |
$(this).toggleClass('rotate'); | |
}); |