spivurno
10/23/2015 - 11:50 AM

GP Unique ID // Gravity Perks // Change Input Type to Text

GP Unique ID // Gravity Perks // Change Input Type to Text

<?php
/**
 * GP Unique ID // Gravity Perks // Change Input Type to Text
 * http://gravitywiz.com/documentation/gp-unique-id/
 *
 * Updates the input HTML from "hidden" (default) to "text".
 */
add_filter( 'gpui_input_html_options', function ( $options ) {
		if( rgget( 'view' ) == 'entry' && rgget( 'edit' ) ) {
			$options['input_type'] = 'text';
		}
		return $options;
} );