Forked from spivurno/gp-unique-id-input-type-text.php
Created
September 5, 2016 04:24
-
-
Save phillipwilhelm/631fd6e8aeaa1642dc7a079be6916d76 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