This code how to replace the traditional radio-buttons, for custom images. You can do the same with checkboxes.
This file contains hidden or 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 | |
if (!class_exists('GFCPTAddonBase')) { | |
/* | |
* Base class for the GFCPT Addon. All common code is in here and differences per version are overrided | |
*/ | |
class GFCPTAddonBase { | |
protected $_has_tag_inputs = false; |
This file contains hidden or 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
function jk_move_textarea( $input = array () ) { | |
static $textarea = ''; | |
if ( 'comment_form_defaults' === current_filter() ) { | |
$textarea = $input['comment_field']; | |
$input['comment_field'] = ''; | |
return $input; | |
} | |
if ( is_singular( 'post' ) || is_page() ) { | |
print $textarea; |
NewerOlder