This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A video button with parameters | |
QTags.VideoButton = function() { | |
QTags.TagButton.call(this, 'Video', 'video', '', '', 'm' ); | |
}; | |
QTags.VideoButton.prototype = new QTags.TagButton(); | |
QTags.VideoButton.prototype.callback = function(e, c, ed) { | |
// The different parameters and their default value | |
var src = prompt( 'Enter URL for video', 'http://' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Format: box | |
*/ | |
if ( 'box' == $format ) : | |
$meta = get_post_meta( $id, 'download', true ); | |
$count_meta = get_post_meta( $id, 'download_count', true ); | |
// Start content | |
ob_start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Custom "Download" custom type for tutorial on Jayj.dk | |
* | |
* @link http://jayj.dk/2011/download-cpt-wordpress | |
*/ | |
add_action( 'init', 'jayj_create_download_post_type' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Custom "Download" custom type metabox for tutorial on Jayj.dk | |
* | |
* @link http://jayj.dk/ | |
*/ | |
/** | |
* Adds the download meta box for the download post type | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Register all the javascript and css we need to accompany those scripts | |
add_action( 'wp_enqueue_scripts', 'html5press_register_scripts' ); | |
add_action( 'wp_print_styles', 'html5press_register_styles' ); | |
function html5press_register_scripts() { | |
/** | |
* Modernizr enables HTML5 elements & feature detects | |
* For optimal performance, use a custom Modernizr build: www.modernizr.com/download/ | |
*/ |
NewerOlder