Skip to content

Instantly share code, notes, and snippets.

@bjorsq
bjorsq / p2_media_image_select.css
Last active Oct 25, 2015
Wordpress Media Library Image selection for Plugins/Themes
View p2_media_image_select.css
.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 {
@Fab1en
Fab1en / custom_media_menu.js
Created Jan 21, 2013
Draft plugin example to add a javascript menu into the WP3.5 Media Library popup. Answer to this Wordpress stackexchange question : http://wordpress.stackexchange.com/questions/76980/add-a-menu-item-to-wordpress-3-5-media-manager/
View custom_media_menu.js
// for debug : trace every event
/*var originalTrigger = wp.media.view.MediaFrame.Post.prototype.trigger;
wp.media.view.MediaFrame.Post.prototype.trigger = function(){
console.log('Event Triggered:', arguments);
originalTrigger.apply(this, Array.prototype.slice.call(arguments));
}*/
// custom state : this controller contains your application logic
wp.media.controller.Custom = wp.media.controller.State.extend({
@Viper007Bond
Viper007Bond / watermark-image-uploads.php
Created Sep 1, 2011
Watermark WordPress Image Uploads
View watermark-image-uploads.php
<?php
/*
* Plugin Name: WordPress.com Watermark Image Uploads
* Author: Alex Mills
* Author URI: http://automattic.com/
*/
class WPcom_Watermark_Uploads {
public $watermark;
You can’t perform that action at this time.