Skip to content

Instantly share code, notes, and snippets.

<?php
/*
Plugin Name: Microblog
Author: Josh Pollock
Version: 0.1.0
*/
/**
* Make sure theme supports aside post format
*/
@ideag
ideag / arunas-hides-plugins.php
Last active October 1, 2019 21:13
A simple proof-of-concept plugin to hide specific plugins from Plugins' list in WP Admin if it is a Multisite install and the user is not the Super Administrator.
<?php
/*
Plugin Name: Arunas Hides Plugins
Plugin URI: http://arunas.co/hidesplugins
Description: A simple proof-of-concept plugin to hide specific plugins from Plugins' list in WP Admin if it is a Multisite install and the user is not the Super Administrator.
Author: Arūnas Liuiza
Version: 0.2
Author URI: http://arunas.co/
*/
@remcotolsma
remcotolsma / wp-create-super-user.php
Last active June 7, 2017 05:30
WordPress create an multisite/network super user
<?php
// ADD NEW ADMIN USER TO WORDPRESS
// ----------------------------------
// Put this file in your Wordpress root directory and run it from your browser.
// Delete it when you're done.
require_once 'wp-load.php';
require_once 'wp-includes/registration.php';
$user_id = 5;
@bjorsq
bjorsq / p2_media_image_select.css
Last active April 4, 2022 06:16
Wordpress Media Library Image selection for Plugins/Themes
.media-selection-control,
.media-selection-button {
clear:both;
}
.media-selection-preview div.image-container {
padding:10px;
float:left;
cursor:move;
}
.media-selection-preview.multiple div.image-container {