Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View MZAWeb's full-sized avatar

Daniel Dvorkin MZAWeb

View GitHub Profile
<?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
<?php
add_filter( 'themes_api_args', 'wpe_ejemplo_api_themes' );
function wpe_ejemplo_api_themes( $args ) {
$args->author = 'wordpressdotorg';
return $args;
}
<?php
add_filter( 'themes_api_args', 'wpe_ejemplo_api_themes' );
function wpe_ejemplo_api_themes( $args ) {
print_r( $args );
die();
}
add_action( 'wp_ajax_' . $_GET['action'], 'wp_ajax_' . str_replace( '-', '_', $_GET['action'] ), 1 );
do_action( 'wp_ajax_' . $_REQUEST['action'] );
do_action( 'wp_ajax_' . $_REQUEST['action'] );
<script id="tmpl-theme" type="text/template">
....
</script>
@MZAWeb
MZAWeb / php.php
Created September 4, 2013 16:33
Testing Hall
<?php
echo "Let's see if this shit embeds gists somehow";
nmap <Leader>a) :Tabularize /)<CR>
vmap <Leader>a) :Tabularize /)<CR>
nmap <Leader>aa :Tabularize /array<CR>
vmap <Leader>aa :Tabularize /array<CR>
let g:spf13_no_indent_guides_autocolor=1
UnBundle 'vim-scripts/sessionman.vim'
UnBundle 'vim-indent-guides'
let g:gist_clip_command = 'pbcopy'
@MZAWeb
MZAWeb / functions.php
Created August 18, 2013 10:38
Playing with the new do_accordion_sections
<?php
add_action( 'edit_form_after_editor', 'testing_accordion_section' );
function testing_accordion_section() {
$screen = get_current_screen();
do_accordion_sections( $screen, 'normal', get_post() );