X

Add the “input hidden” field type to Easy Digital Download settings

Add input type="hidden" to the type of input fields avaiable when set up your plugin's EDD settings.


Code Snippet:


function edd_hidden_callback( $args ) {
global $edd_options;
if ( isset( $edd_options[ $args['id'] ] ) )
$value = $edd_options[ $args['id'] ];
else
$value = isset( $args['std'] ) ? $args['std'] : '';
$size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
$html = '<input type=''hidden'' class=''' . $size . '-text'' id=''edd_settings[' . $args['id'] . ']'' name=''edd_settings[' . $args['id'] . ']'' value=''' . esc_attr( stripslashes( $value ) ) . '''/>';
echo $html;
}

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!