Skip to content

Instantly share code, notes, and snippets.

View MZAWeb's full-sized avatar

Daniel Dvorkin MZAWeb

View GitHub Profile
@MZAWeb
MZAWeb / 0_reuse_code.js
Created May 13, 2014 16:05
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
add_filter( 'pre_get_posts', 'cambia_queries', 10, 1 );
function cambia_queries( $query ) {
if ( $query->is_category( 31 ) && $query->is_main_query() ) {
$query->set( 'cat', array( 18, 31 ) );
$query->set( 'posts_per_page', - 1 );
}
return $query;
<?php
/* Plugin Name: Damn Vulnerable WordPress Plugin
* Description: Intentionally vulnerable plugin for plugin author education
* Version: 0.1
* Plugin URI: http://make.wordpress.org/plugins/2013/04/09/intentionally-vulnerable-plugin/
* Author: Jon Cave
* Author URI: http://joncave.co.uk
* License: GPLv2+
*
* DO NOT RUN THIS PLUGIN ON AN INTERNET ACCESSIBLE SITE