Created
December 8, 2018 21:42
-
-
Save KaineLabs/f7a673244d5076f6b1ba833875b5628e to your computer and use it in GitHub Desktop.
Edit Basic Info Widget Value.
This file contains 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 | |
/** | |
* Edit Basic Info Widget Value. | |
*/ | |
function yzc_edit_basic_info_value( $value, $data ) { | |
switch ( $data['id'] ) { | |
case 'email_address': | |
return '<a href="mailto:' . $value . '">' . $value. '</a>'; | |
case 'user_url': | |
return '<a href="' . esc_url( $value ) . '">' . $value. '</a>'; | |
default: | |
return $value; | |
} | |
} | |
add_filter( 'yz_basic_information_widget_item_value', 'yzc_edit_basic_info_value', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment