Created
October 23, 2015 11:50
-
-
Save spivurno/aa5ffa48cb30728e0dd5 to your computer and use it in GitHub Desktop.
GP Unique ID // Gravity Perks // Change Input Type to Text
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 | |
/** | |
* 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