Skip to content

Instantly share code, notes, and snippets.

@spivurno
Created October 23, 2015 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save spivurno/aa5ffa48cb30728e0dd5 to your computer and use it in GitHub Desktop.
Save spivurno/aa5ffa48cb30728e0dd5 to your computer and use it in GitHub Desktop.
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;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment