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
<script id="tmpl-theme" type="text/template">
....
</script>
do_action( 'wp_ajax_' . $_REQUEST['action'] );
do_action( 'wp_ajax_' . $_REQUEST['action'] );
add_action( 'wp_ajax_' . $_GET['action'], 'wp_ajax_' . str_replace( '-', '_', $_GET['action'] ), 1 );
<?php
add_filter( 'themes_api_args', 'wpe_ejemplo_api_themes' );
function wpe_ejemplo_api_themes( $args ) {
print_r( $args );
die();
}
<?php
add_filter( 'themes_api_args', 'wpe_ejemplo_api_themes' );
function wpe_ejemplo_api_themes( $args ) {
$args->author = 'wordpressdotorg';
return $args;
}