2018-02-15 08:35:31 -05:00
|
|
|
/**
|
|
|
|
* Generates the XHTML Friends Network 'rel' string from the inputs.
|
|
|
|
*
|
|
|
|
* @deprecated 3.5.0
|
2018-06-27 22:30:15 -04:00
|
|
|
* @output wp-admin/js/xfn.js
|
2018-02-15 08:35:31 -05:00
|
|
|
*/
|
2021-03-18 15:01:03 -04:00
|
|
|
jQuery( function( $ ) {
|
2013-11-14 16:58:10 -05:00
|
|
|
$( '#link_rel' ).prop( 'readonly', true );
|
2021-02-16 15:25:03 -05:00
|
|
|
$( '#linkxfndiv input' ).on( 'click keyup', function() {
|
2013-11-14 16:58:10 -05:00
|
|
|
var isMe = $( '#me' ).is( ':checked' ), inputs = '';
|
|
|
|
$( 'input.valinp' ).each( function() {
|
|
|
|
if ( isMe ) {
|
|
|
|
$( this ).prop( 'disabled', true ).parent().addClass( 'disabled' );
|
2012-08-22 20:04:18 -04:00
|
|
|
} else {
|
2013-11-14 16:58:10 -05:00
|
|
|
$( this ).removeAttr( 'disabled' ).parent().removeClass( 'disabled' );
|
|
|
|
if ( $( this ).is( ':checked' ) && $( this ).val() !== '') {
|
|
|
|
inputs += $( this ).val() + ' ';
|
|
|
|
}
|
2012-08-22 20:04:18 -04:00
|
|
|
}
|
|
|
|
});
|
2013-11-14 16:58:10 -05:00
|
|
|
$( '#link_rel' ).val( ( isMe ) ? 'me' : inputs.substr( 0,inputs.length - 1 ) );
|
2012-08-22 20:04:18 -04:00
|
|
|
});
|
|
|
|
});
|