A hand crafted markdown document contains all major Javascript topics covered, taken from different sources. Brush Up your JS memory.
Single line comments start with //
. For multi-line commands, you use /* ... */
// This is a single line comment
<?php | |
add_action( 'pre-upload-ui', 'get_the_post_type' ); | |
function get_the_post_type() { | |
$post_type = isset( $_REQUEST['post_type'] ) ? $_REQUEST['post_type'] : 'post'; | |
set_transient( 'attached_post_type', $post_type ); | |
} | |
add_filter( 'intermediate_image_sizes_advanced', 'add_image_size_for_post_type', 10 ); | |
function add_image_size_for_post_type( $sizes ) { |